agent memory
Agent memory is the stored knowledge from which the AI agent can later retrieve what it learned, what it did, and what you asked of it.
In plain terms
A language model is naturally forgetful: it starts every new conversation with a clean slate. It is like an excellent specialist who wakes up every morning remembering nothing from the previous day. Agent memory is their appointment book and notebook: they write down what is worth remembering in it and read it back when needed.
It is worth distinguishing two types of memory. Short-term is what the agent keeps in mind while running the current task: what you asked, what it tried, what the result was. Long-term is what remains after the conversation ends: your habits, previous decisions, proven solutions.
This is what turns an agent from a one-time responder into a colleague. You do not need to explain who you are and what you want every time, and it can continue work lasting several days where it left off.
How it works
- While working, the agent keeps what it needs in the model's context window: this is short-term memory. It is finite, and if it fills up, older parts are dropped or the system summarizes them.
- Information deemed important is written out by the agent or the surrounding system to an external store: a text file, a database, or a vector database that can be searched by meaning.
- For a new task, the system looks up relevant memories in the store and inserts them into the model's prompt, so it answers as if it remembered.
- Memories must be maintained: the system periodically compresses, updates, or deletes them so that outdated and contradictory entries do not mislead the agent.
- With many user products, you can view and delete what the agent has remembered about you, but this is not the case in every system.
An everyday example
You ask your assistant to book a table for Friday evening without adding that you are vegetarian and prefer a window seat. It remembered this from a previous conversation and now takes it into account automatically.
Who is affected
A common misconception
Limits and risks
- The agent may remember something incorrectly or inaccurately, and later confidently build on that faulty memory.
- Stored memories may contain personal and business data, so it is worth regularly reviewing what the system keeps about you.
- Memory is vulnerable: a malicious website or document can inject a false 'memory' into an agent, influencing its behavior later.
- More memory does not automatically mean better results: outdated or irrelevant memories can confuse the agent.
Similar, but not the same
- context window – The context window is the finite amount of text the model sees at once; memory is broader, as it retains information beyond the conversation.
- retrieval-augmented generation – RAG typically searches through ready-made documents written by others, while agent memory is written and updated by the agent itself from its own experiences.
- fine-tuning – Fine-tuning continues to train the model itself, while memory is a note stored outside the model and deletable at any time.
Related concepts
AI-agent, agent architecture
short-term memory, long-term memory, episodic memory, semantic memory
A brief history
Memory for language model-based agents became an independent research topic in 2023, notably with the "Generative Agents" study by researchers at Stanford and Google, and the MemGPT system developed at Berkeley. OpenAI announced the ChatGPT memory feature in February 2024, which was extended to cover past conversations in 2025; thus, the concept reached everyday users.
Where things stand
At the end of 2026, most major chat assistants and coding agents offer some form of persistent memory. There is no unified approach to what should be remembered and what forgotten, and reliability and security remain open questions.
Also known as
agent memory · agent memory · AI agent memory · agent memory · persistent memory · memory layer
Sources
- Park et al.: Generative Agents: Interactive Simulacra of Human Behavior (arXiv, 2023)
- Packer et al.: MemGPT: Towards LLMs as Operating Systems (arXiv, 2023)
- Sumers et al.: Cognitive Architectures for Language Agents (arXiv, 2023)
This entry was machine-edited and has undergone machine expert review; the “In the news” section updates automatically from Agent Age stories.