Agents105 · Module I · Lesson 03 of 13
Article · 12 min

Memory

Short-term, long-term, and the difference from context.

Summary

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.

Objectives
  • 01Name the three kinds of memory.
  • 02Match each to a storage layer.
  • 03State why context ≠ memory.
The Lesson

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.

Key Ideas
  • Context is not memory; long-term memory is external storage.
  • Working memory (scratchpads) is often the missing piece.