Memory is what an agent retains across turns and across sessions. Short-term (context window), working (scratchpad), and long-term (external store) each solve different problems. The distinction matters because 'memory' means all three, and most agent bugs come from confusing them.
- 01Name the three kinds of memory.
- 02Match each to a storage layer.
- 03State why context ≠ memory.
Short-term
Recent turns in the context window. Free, ephemeral, capped by context length. Every model has this; nothing to build.
Working memory
A scratchpad or todo list the agent maintains during a task. Usually a structured note in context. Prevents losing track during long tasks.
Long-term
External storage the agent reads and writes: vector store for semantic memory, KV store for facts, database for structured records. Persists across sessions. Most agent products live or die on long-term memory design.
- Context is not memory; long-term memory is external storage.
- Working memory (scratchpads) is often the missing piece.