Skip to content

What is Agent Memory?

Agent memory is the component in AI agents that stores and retrieves information from past interactions, enabling recall of context, facts, or experiences to inform future actions.

It functions as a persistent or temporary store that the agent can query during its reasoning loop. Common implementations use buffers for recent messages, vector databases for semantic search, or structured logs of actions and observations.

Key ideas include separating short-term working memory (limited context) from long-term memory (retrievable knowledge), and using retrieval mechanisms to overcome token limits in large language models.

This allows agents to maintain coherence across multi-turn tasks and learn from prior outcomes without retraining the underlying model.

Example

A travel-planning agent remembers that a user prefers window seats and avoids early flights from a conversation two days ago, then uses that stored preference when booking a new itinerary.

Why it matters

Memory turns stateless language models into capable, stateful agents that can handle complex, long-running tasks and deliver personalized experiences in real-world applications.

Frequently asked questions

Short-term memory holds recent conversation turns or working context, while long-term memory stores retrievable facts or experiences across sessions, often using external databases.