The Four Types of Agent Memory
Working, short-term, long-term, and org-wide memory — what each type stores, its lifetime, and implementation.
Last updated
The Four Types of Agent Memory
An LLM is stateless — it forgets everything the instant a request returns. “Memory” is the engineering you bolt on to fake continuity. Two lenses on it: where memory lives (operational layers) and what it stores (cognitive types).
The model has no memory. None. Every impression of an agent that “remembers you” is your system re-assembling the right information into the context window on each turn. So agent memory is really a context-engineering problem: given a finite, expensive window, what do you load, from where, and when? Get this wrong in one of two directions and the agent either has amnesia (forgets what matters) or dementia (drowns in stale context). The four-layer model below is how you get it right — each layer tuned to a different lifetime and latency.
Two lenses — don’t confuse them
“Memory” gets used for two orthogonal ideas, and interviewers listen for whether you can separate them:
Operational layers — WHERE it lives
Related
More in LLM & Agentic
LLM Lifecycle
PreviewComplete lifecycle of large language models from pre-training through fine-tuning, RLHF, and deployment — with architecture diagrams and production considerations.
How LLMs Call Tools
PreviewHow LLMs use function calling and tool use — the mechanics behind tool-calling agents, from prompt engineering to structured output.
When to Fine-Tune: The Decision Framework
PreviewShould you fine-tune at all? A structured decision framework for prompt engineering vs RAG vs fine-tuning.
LoRA, QLoRA & PEFT Methods
PreviewHow LoRA works inside transformer layers, QLoRA for memory-efficient training, and the full PEFT method comparison with code examples.
Get full access to all 87+ sections with code examples, diagrams, and interactive animations.
Unlock Premium