Home › Glossary › Generative AI › Memory (AI agents)

Advanced · Generative AI

Memory (AI agents)

Visual diagram · (in preparation) · Math · (in preparation) · Worked example · 3 difficulty levels.

TL;DR. Persistent state that lets an AI agent retain information across turns or sessions.

Technical Definition

Persistent state that lets an AI agent retain information across turns or sessions.

How it works

Short-term memory lives in the context window; long-term memory uses external stores like vector databases, key-value stores, or knowledge graphs. Effective memory systems decide what to write, when to retrieve, and how to summarize — turning a stateless LLM into a continuous assistant.

Related Concepts

  • Vector Database — A specialized database optimized for storing, indexing, and querying high-dimensional embedding vectors using similarity search.
  • Context Window — The maximum number of tokens a model can process in a single input, determining information capacity.
  • AI Agent — An AI system that autonomously plans, uses tools, and takes actions to accomplish goals through iterative reasoning.