# Agent Memory

- **Canonical URL:** https://getaimath.com/dictionary/agent-memory/
- **Topics:** [AI Agents & Agentic AI](https://getaimath.com/dictionary/category/ai-agents-and-agentic-ai/)
- **Last updated:** 2026-11-25

## 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.

![Chatbot vs. AI Agent: Giving Advice vs. Doing the Chore — Simple cartoon comparing a Chatbot (gives you a recipe and stops) with an AI Agent (plans steps, uses tools like your calendar and browser, checks if it worked, and finishes the job).](https://getaimath.com/diagrams/ai-agents-and-agentic-ai.png)
*Napkin Diagram (AI Agents & Agentic AI): A regular chatbot just talks back; an AI agent has hands (tools) and loops until the chore is actually finished.*

## What is an example of Agent Memory?

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](https://getaimath.com/dictionary/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 |

## Related Concepts

- [Tool Execution](https://getaimath.com/dictionary/tool-execution/): Tool execution is the step where the app actually runs the tool the model asked for and returns the result.
- [Agent State](https://getaimath.com/dictionary/agent-state/): Agent state is everything that describes where an agent is in its task right now: its goal, progress, data and pending steps.
- [Tool Schema](https://getaimath.com/dictionary/tool-schema/): A tool schema is a structured description of a tool, telling the model its name, what it does and what inputs it needs.
- [Task Decomposition](https://getaimath.com/dictionary/task-decomposition/): Task decomposition is breaking a big task into smaller, easier sub-tasks.
- [Tool Use](https://getaimath.com/dictionary/tool-use/): Tool use is an AI's ability to use external tools to do things it cannot do well alone.
- [Goal Planning](https://getaimath.com/dictionary/goal-planning/): Goal planning is turning a high-level goal into a concrete plan of actions an agent can follow.

---
Source: The AI Math Dictionary (https://getaimath.com/dictionary/agent-memory/)
