Agent Memory
What is Agent Memory?
In one sentence: Agent memory is how an AI agent stores and recalls information across steps or sessions.
Short-term memory holds the current task's details in context; long-term memory saves facts, past results or preferences in a database for later.
What does Agent Memory look like?
An agent remembering that you prefer aisle seats when booking flights next month uses agent memory.
Why does Agent Memory matter?
Memory lets agents learn from past work and act more personally.
Agent Memory vs. Context Window
The context window is temporary working RAM for the current conversation turn, whereas agent memory persists facts, preferences, and past episodes across sessions in external storage.
| Dimension | Agent Memory | Context Window |
|---|---|---|
| Lifespan | Persists across days, sessions, and tasks | Cleared when you start a new chat |
| Capacity | Practically unlimited in a database or files | Bounded (e.g., 128K–1M tokens) and billed per turn |
| Human analogy | Your notebook and long-term memory | What you hold in short-term attention right now |
Last updated · Fact-checked by The AI Math
Linking to this page from a lesson or article? <a href="https://getaimath.com/dictionary/agent-memory/">Agent Memory, explained simply</a> (The AI Math Dictionary)