Agent Memory

The seven types of memory an agent can have — and when each one earns its place.

Goal

Know the kinds of memory an agent can have, what each one is, and — most importantly — when each one earns its place. Memory is the most over-engineered part of agent design: every type you add is state to store, retrieve, secure, and keep fresh. Each type has its own page; this is the map.

Start from one fact

The model itself remembers nothing between calls — its only “memory” is whatever the harness puts in the context window this turn. Working memory is that window; the other six types are strategies for persisting things outside the model and loading them back in when relevant.

flowchart LR
    subgraph Persisted[Persisted outside the model]
      SM[Semantic - facts]
      EM[Episodic - past events]
      PM[Procedural - how-to]
      XM[External - documents]
      PR[Prospective - to-do later]
    end
    Persisted -->|retrieve when relevant| W[Working memory - the context window]
    Param[Parametric - baked in weights] --> LLM[Model call]
    W --> LLM

The seven types

TypeIn one lineAdd it when…
WorkingThe active context windowAlways — the baseline
SemanticDurable facts and preferencesUsers repeat themselves across sessions
EpisodicPast events and outcomesThe agent repeats old mistakes
ProceduralHow to do tasksIt re-derives the same procedure every run
ExternalDocuments in a vector DB (RAG)Knowledge is large and changes often
ParametricKnowledge baked into the weightsNever at runtime — it’s always there
ProspectiveThings to do laterLong-horizon jobs that resume after interruption

Symptom → memory

Work backwards from failure, not forwards from the taxonomy:

SymptomWhat’s missing
Forgets instructions mid-taskWorking memory management (trim/summarize), not more storage
Asks the user the same thing every sessionSemantic
Repeats a mistake it made last weekEpisodic
Solves a routine task differently (and worse) each timeProcedural
Doesn’t know your documentsExternal (RAG)
Knowledge is outdatedParametric limit — RAG or fine-tune, no runtime fix
Loses the thread of a long, interrupted jobProspective

Example — a support agent’s memory stack

Turn 1 of a session: the harness loads the ticket thread (working), the customer’s plan and language (semantic), a note that this customer’s last issue was mis-escalated (episodic), the refund runbook (procedural), and retrieves the relevant policy passages (external). Five types, one context window — each loaded because a past failure demanded it, not because the diagram had a box for it.

Strengths & limitations

  • Strengths — continuity across sessions is what separates an assistant from a stateless chatbot; episodic + procedural memory is how agents get better instead of starting from zero each run.
  • Limitations — stored memories go stale and confidently wrong (a moved customer, a changed policy); retrieval can surface the wrong memory, which poisons the turn; personal facts raise privacy and retention duties (see Responsible AI); every store is infrastructure to run and sync.

Start with working memory only. Add one type at a time, when a real symptom appears — never all seven because a diagram showed seven.

Sources