Skip to main content
ModelTerms

Agents & Tools · intermediate

Conversational Memory (chat history management)

Conversational memory is the strategy for carrying chat history across turns within a single session — append all, sliding window, summarization, or hybrid retrieval over past messages.

Explanation

The simplest strategy is "append every prior turn" — works fine until you hit the context window or the budget. Real systems use one or more of: sliding window (keep last N turns), summarization buffer (summarize older turns into a compact paragraph), entity memory (track key facts across the conversation), or retrieval over past messages (fetch only relevant prior turns).

LangChain and Llama-Index ship pre-built memory classes for each pattern; OpenAI's Assistants API handles it implicitly via threads.

Bad conversational memory is the leading cause of "the bot forgot what we talked about" complaints in chat apps.

Examples

  • A customer-service bot: last 10 turns verbatim + a running summary of older turns inserted into the system prompt.
  • A long-running planning conversation that retrieves only the 5 most relevant prior turns instead of all of them.

Frequently asked

What is Conversational Memory?

Conversational memory is the strategy for carrying chat history across turns within a single session — append all, sliding window, summarization, or hybrid retrieval over past messages.

What is an example of conversational memory?

A customer-service bot: last 10 turns verbatim + a running summary of older turns inserted into the system prompt.

How is Conversational Memory related to Agent Memory?

Conversational Memory and Agent Memory are both agents & tools concepts. Agent memory is the mechanism that lets an agent carry information across turns or sessions — short-term (current conversation context) or long-term (persistent facts about the user or world).

Is Conversational Memory considered intermediate?

Conversational Memory is generally considered intermediate-level material in the AI and LLM space.

Side-by-side comparisons

Sources