Agent memory
How an AI agent keeps information beyond one conversation: notes, facts and preferences it saves and reads back later.
Short-term memory is the current conversation in the context window. Long-term memory is a store, often files or a database the agent writes to and searches, that survives across sessions. The hard parts are deciding what is worth keeping, correcting memories that turn out wrong, and keeping one user’s memory away from another. A wrong memory is worse than none, because the agent repeats it with confidence.
Related terms
- Context engineering: Deciding what goes into the model’s context, in what order and when, across a whole task.
- Compaction: Replacing the older part of a long conversation with a summary so the agent can keep going.
- RAG (retrieval-augmented generation): Finding relevant documents first and putting them into the prompt, so the model answers from them.
