Core Term

Memory

Memory enables agents to retain information across interactions—maintaining task context (short-term) and accumulating knowledge (long-term).

Definition

Memory in agent systems refers to mechanisms for storing and retrieving information across time. Unlike stateless systems where each request is independent, agents with memory can:

  • Remember what happened earlier in a task
  • Recall information from previous sessions
  • Build cumulative knowledge over time
  • Maintain consistent behavior based on history

Types of Memory

Short-term (Working) Memory Information relevant to the current task: conversation history, intermediate results, current state. Typically implemented as context that persists within a session but not across sessions.

Long-term Memory Information persisting across sessions: user preferences, learned facts, past interaction summaries. Typically implemented through external storage (databases, vector stores) with retrieval mechanisms.

Episodic Memory Records of specific past events or interactions. Useful for "remember when we discussed X" scenarios.

Semantic Memory General knowledge accumulated over time, abstracted from specific episodes. Useful for building expertise.

Why It Matters

Memory is essential for:

Complex tasks: Multi-step workflows require remembering earlier steps and their outcomes.

Personalization: Agents that remember preferences provide better experiences.

Efficiency: Avoiding redundant work by recalling previous results.

Coherence: Maintaining consistent behavior across a long interaction.

Without memory, agents treat each interaction as novel, leading to repetition, inconsistency, and inability to build on prior work.

Common Misconceptions

"Context window is memory" Context provides short-term memory, but it's limited and ephemeral. True long-term memory requires external storage.

"More memory is better" Irrelevant memories create noise and confusion. Memory systems need curation—deciding what to remember and what to forget.

"Memory is automatic" Effective memory requires design: what to store, how to retrieve, when to update, how to handle conflicts.