Short answer
Agent memory is the information an AI agent keeps beyond the current conversation, such as your preferences, ongoing projects and past decisions, stored outside the model and brought back when relevant. A well-designed memory is limited in scope, visible and editable by the user, and lets old or sensitive items expire.
Follow-up question What should it forget?
A language model on its own has no memory between conversations. Everything it "knows" about you during a chat sits in its context window, the stretch of text it can see at once. Close the chat and that text is gone. Agent memory is the layer builders add on top: a store of notes about you and your work, kept outside the model, from which the right pieces are copied back into the context when they are needed.
Both major chat assistants now work this way. ChatGPT began testing memory in February 2024, and Anthropic added memory to Claude for business plans in September 2025, then for Pro and Max subscribers in October. If you are building your own agent, you face the same design choices they did: what to keep, for how long, and who controls it.
How memory actually works
A research team led by Charles Packer described one influential approach in October 2023, called MemGPT. They borrowed an idea from computer operating systems, which give programs the illusion of more memory by moving data between a small fast area and a large slow one. In MemGPT, the context window is the fast area and an external store is the slow one; the system decides what to pull in and what to page out, so an agent can remember across many sessions without an infinite context.
Most practical designs use three layers:
- Short-term memory: the current conversation, held in the context window. It is detailed and temporary.
- Long-term memory: a small set of durable facts and preferences, saved to a database and retrieved in later sessions.
- Reference material: documents and past conversations that can be searched when a question needs them, rather than loaded every time.
A worked memory design
Here is a design for an illustrative agent that helps a freelance translator manage clients and deadlines. Each row is a category of memory, with a rule for how it is kept.
| Memory type | Example | Where kept | Who can edit | Expires |
|---|---|---|---|---|
| Session notes | "Working on the Dupont contract today" | Context window | Automatic | End of session |
| Preferences | "Prefers Canadian French spelling; replies in short bullet points" | Long-term store | User, any time | Never, unless changed |
| Project facts | "Dupont project: 12,000 words, due March 20" | Long-term, scoped to the project | User and agent | 30 days after the project closes |
| Episodic summary | "On March 2 we agreed to split the job in two" | Searchable archive | User can delete | 6 months |
| Sensitive items | Health, finances, other people's personal details | Not stored by default | Only if the user asks explicitly | Shortest possible |
Three principles are built into that table, and both commercial systems reflect them.
Make memory visible and editable. OpenAI lets users ask ChatGPT what it remembers, tell it to forget something, or turn memory off in settings. Claude keeps a memory summary that users can read and change. An agent that remembers silently is one users cannot correct.
Scope memory to the job. Claude keeps a separate memory for each project, so that work for one client does not leak into another. In the table, project facts belong to their project and disappear after it ends.
Offer a way out. Both products have a mode that neither uses nor saves memory: Temporary Chat in ChatGPT, Incognito chat in Claude. Your agent should offer something similar for one-off or delicate tasks.
Here is a system instruction a builder might give the agent to enforce the design:
You have a long-term memory tool. Save a memory only when the user states a lasting preference or a project fact they will need again. Never save health, financial or third-party personal details unless the user explicitly says "remember this". Before saving, tell the user in one line what you are saving. When asked "what do you remember about me?", list every stored memory with its project and date.Try it: If you use ChatGPT or Claude with memory on, ask "What do you remember about me?" Read the list carefully. Delete one item that is out of date and one you would rather it didn't keep.
What should it forget?
Forgetting is a feature, not a failure. A memory that never forgets becomes cluttered, out of date and risky, so plan deletion from the start.
Anything stale. Old deadlines, finished projects and preferences you have changed. An agent that still thinks you live in your old city or work for your old employer gives worse help. Expiry dates, like those in the table, handle most of this automatically.
Sensitive details it did not need. OpenAI says it steers ChatGPT away from proactively remembering things like health details unless the user asks. A good rule for any agent: if a fact would be harmful in the wrong hands and is not needed for the task, don't store it.
Other people's information. Your agent may hear about colleagues, clients or family members. Their details were not theirs to give the agent, and they cannot see or delete them. Keep only what a task strictly requires.
Everything, on request. Users must be able to wipe memory completely and trust that it is gone. Note a subtlety OpenAI documents: deleting a chat does not delete memories saved from it; the memory must be removed separately. Builders should make that link clear, or make deletion cascade.
There is also a quieter reason to forget. Anthropic says it tested whether memory could reinforce harmful patterns or lead to over-accommodation, meaning an assistant that bends too far to please the person it knows. An agent that remembers less, and asks more, keeps the user in charge of what it believes about them.
Sources
- Memory and new controls for ChatGPT — OpenAI, February 13, 2024
- Bringing memory to Claude — Anthropic, September 11, 2025
- MemGPT: Towards LLMs as Operating Systems — arXiv (Packer, Fang, Patil, Lin, Wooders, Gonzalez), October 12, 2023