AI glossary · Basic · Agents
Agent memory
Agent memory is a mechanism that lets an AI agent store information needed for the current conversation or task, along with what it learned in past conversations and tasks, and retrieve it when needed. The model itself remembers nothing once a conversation ends, so memory is managed separately outside the model.
About this term
- Level
- Basic · Technical terms you often meet in AI news
- Category
- Perception & action
- Fields
- Agents
- Added
- 2026-10-08
How it works
It is usually split into two layers. Short-term memory is the content that fits in the context window the model reads at once; the current conversation history and intermediate task results live here. Long-term memory is records kept in external storage such as files or a vector DB, storing things like user preferences, summaries of previous tasks and learned tips. During a task, the agent selects, organizes and saves what is worth remembering, and when a new task comes in, it searches for relevant memories and puts them back into the context.
Why it matters
Without memory, an agent has to hear the same explanations again every time, as if meeting someone for the first time. In long tasks, the context window can also fill up so that the agent forgets what it did earlier. Well-designed memory enables personalized responses and lets the agent continue tasks that span several days. That is why, in context engineering, what to remember and what to discard has become an important design topic.
Things to know
More memory is not always better. Outdated or incorrect memories that get recalled can actually spoil an answer, and irrelevant memories taking up the context hurt both performance and cost. Because personal information is stored, users should be able to see what is remembered and delete it. Also, if malicious content gets mixed into the memory store, it can become a channel for prompt injection.
Example
Several AI chatbot services offer a 'memory' feature that remembers things the user has shared, such as their occupation or preferred response tone, and reflects them in later conversations. Coding agents write project rules or cautions learned from previous tasks in a separate memory file and read that file first when starting a new task so they do not repeat the same mistakes.