Agent memory: how an AI agent remembers
Agent memory covers everything that lets an AI agent keep information beyond a single request: the state of the current task, but also facts, preferences or past experiences it can look up later. A language model on its own remembers nothing between two calls.
Data as of October 22, 2026
Key figures
| Level | Advanced |
|---|---|
| Origin | 2023 |
| Introduced by | Sumers et al. (CoALA) |
The starting problem
A large language model is stateless: each call starts from scratch, knowing only what fits in its context window. For an agent to work on a task for hours, or pick up a case a week later, its memory has to live outside the model, and the agent must decide at each step what to read from it and what to write to it.
The main types of memory
The “Cognitive Architectures for Language Agents” framework (CoALA, Sumers et al., September 2023) offers a vocabulary borrowed from cognitive science that has been widely adopted:
- Working memory: the information active for the current decision (goal, latest observations). In practice it is the context.
- Episodic memory: records of past experiences (“last time, this API rejected that format”).
- Semantic memory: knowledge about the world or the user, often kept in a vector database and retrieved with RAG.
- Procedural memory: know-how, held both in the model’s weights and in the agent’s code or instructions.
Other papers shaped the field: Park et al.’s “Generative Agents” (April 2023), which keep a stream of memories and distil them into higher-level reflections, and MemGPT (Packer et al., October 2023), which manages context the way an operating system juggles RAM and disk.
A concrete example
A customer-support agent handles a ticket. Its working memory holds the ticket and today’s messages. It queries semantic memory for the product documentation, and episodic memory reminds it that the same customer reported a similar issue last month, fixed by an update. When it is done, it saves a short summary of the case for next time.
Why it matters, and the pitfalls
Memory is what turns a one-off assistant into a collaborator with continuity. It is also a context engineering problem: recall too much and the useful facts drown; recall too little and the agent loses the thread. The context window tool helps you see what does and does not fit in a single request.
Common myths
- “The agent learns like a person.” It rereads notes; it does not change its model.
- “Remembering everything is better.” Unsorted memory piles up errors and stale facts.
- “Agent memory and assistant memory are the same thing.” The latter is a product feature; the former is an architectural building block.
Related terms
- AI memory · A feature that lets an AI assistant remember facts about you from one conversation to the next.
- Context window · The maximum amount of text (in tokens) a model can read and produce at once, including its own answer.
- RAG (retrieval-augmented generation) · A technique that first retrieves relevant passages from your documents, then hands them to the model so its answer is based on them.
- Vector database · A database that stores embeddings and quickly finds the ones closest to a query, which means the most relevant pieces of content.
- Context engineering · The practice of deciding what goes into a model's context window at each step: instructions, tools, documents, memory and history.
- Embedding · A list of numbers (a vector) that captures the meaning of a text or image, so content can be compared by how close in meaning it is.
Try it
Full glossary
Frequently asked questions
Does agent memory change the model itself?
Usually not. The model's weights stay the same: memory is stored alongside it (files, a database) and fed back into the context at the right moment. The model “remembers” because it is shown the information again.
How is this different from ChatGPT or Claude memory?
Memory in consumer assistants is a specific feature designed to keep your preferences from one chat to the next. Agent memory is a broader design term: it also covers task state, intermediate results and domain knowledge.
Doesn't a big context window replace memory?
Not entirely. It holds more during a session, but everything vanishes at the end, and a very full context is expensive and can dilute the model's attention. Good memory design picks what is worth recalling.
What are the risks of agent memory?
It can keep personal data longer than intended, or store false or malicious information that then shapes later tasks. You need to be able to inspect, correct and delete what an agent has retained.
Data sources
Data as of October 22, 2026
Report an error
Does a figure, a date or a fact look wrong? Tell us: every report is checked.