Skip to content
Sign in

What is Memory?

In AI agents, memory refers to the component that stores and retrieves information from past interactions or experiences, enabling the agent to maintain context and make better decisions over time.

Memory works by saving key details such as conversation history, user preferences, or task outcomes in a structured way. The agent can then query this stored information during future steps to avoid repeating mistakes or forgetting important context.

Common approaches include short-term memory (limited to the current session, often using buffers) and long-term memory (persisted across sessions via databases or vector stores for retrieval).

This allows agents to simulate human-like recall without relying solely on the model's built-in context window.

Example

A personal assistant agent remembers that a user prefers morning meetings and avoids scheduling them after 5 PM based on past conversations stored in its memory module.

Why it matters

Memory turns stateless language models into coherent, adaptive agents capable of handling multi-turn tasks and learning from experience, which is essential for real-world applications like chatbots and autonomous systems.

Frequently asked questions

The context window is the model's temporary input limit, while memory is an external system that can persist and selectively retrieve information beyond that limit.