readingmemorypart 3

The Four Types of Memory

Agent Memory, Made Clear · Part 3 · 6 min read

Ask “does this agent have memory?” and you have asked a bad question - like asking “does this restaurant have food?” The useful question is: which kinds?

The field has converged on a taxonomy borrowed from a hundred years of cognitive science - how psychologists classify human memory - and formalized for AI agents in a research framework called CoALA (Cognitive Architectures for Language Agents). Practically every serious memory system today describes itself in these terms. There are four types. Let’s make each one unmistakable.

The running example

Meet Maya, a software engineer, and her coding agent, which she has used daily for six months. One morning she says: “Add rate limiting to our payments API.”

A great response draws on four completely different kinds of remembered things:

  1. The current conversation and the files just opened - what is happening right now.
  2. That two months ago, a similar change broke staging because a config flag was missed - a past experience.
  3. That Maya’s stack is Python/FastAPI, and the payments service lives in services/payments/ - stable facts.
  4. That in this codebase you always write the test first, and Maya prefers small commits with plain-English messages - how to behave.

Those four are the four types. Now, precisely.

Type 1: Working memory - what I am thinking about right now

Working memory is the active context of the current task: the conversation so far, the open files, the latest tool results.

We covered its mechanics in Blog 2 - it lives in the context window, it is fast and rich, and it is temporary. Human analogy: what is in your head mid-conversation. You don’t “retrieve” your last sentence; it is simply still present.

Working memory is special in the taxonomy: it is the stage where the other three types perform. Episodic, semantic, and procedural memories only affect the model when copied onto this stage. (And the stage is small - which is why the other three exist at all.)

Type 2: Episodic memory - what happened

Episodic memory stores experiences: specific events, tied to a time and a situation.

Human analogy: remembering your last birthday - not facts about birthdays, but that particular evening. “Episode” = one specific occurrence.

For Maya’s agent: “On June 3rd, we deployed a middleware change; staging broke because RATE_CONFIG wasn’t set; rollback took an hour; the fix was adding the flag to the deploy checklist.” That is not a general fact about the world. It is a story - this happened, then that - and stories carry lessons. When today’s task smells like June 3rd, recalling that episode is what stops history repeating.

Typical contents: session transcripts and their summaries, task outcomes (what was tried, what worked, what failed), decisions and their reasons, notable user interactions. Blog 4 is all about this type.

Type 3: Semantic memory - what is true

Semantic memory stores facts: statements about the world, the user, the domain - detached from when they were learned.

Human analogy: you know Paris is the capital of France, but you almost certainly cannot remember the moment you learned it. The fact survived; the episode around it evaporated. That detachment is the signature of semantic memory.

For Maya’s agent: “Maya’s stack is Python/FastAPI.” “The payments service lives in services/payments/.” “The team deploys Fridays.” “Maya is allergic to over-clever one-liners.” Each is a clean, timeless statement, probably distilled from some long-forgotten conversation.

Note the relationship between types 2 and 3: semantic memories are often extracted from episodic ones. The conversation (episode) contained “by the way, we moved to FastAPI last month”; the extraction step turned it into a stored fact and let the episode fade. Human memory does the same - psychologists call it consolidation. Blog 5 covers this type and the machinery of keeping facts current when they change.

Type 4: Procedural memory - how to act

Procedural memory stores skills and rules of behavior: how to do things, not descriptions of things.

Human analogy: riding a bicycle. Your balance is not a fact you recall; it is baked into how you act. Knowing that versus knowing how.

For an agent, procedural memory shows up in two forms:

Its superpower: it changes behavior without being asked. Semantic memory answers when queried; procedural memory acts - the agent just does write the test first. Blog 6 covers it, including agents that edit their own instructions.

One event, four memories

The types click when you watch one event fan out. Maya says: “Ugh, you pushed without running tests again and broke the build. Always run tests before pushing.”

Four different lifetimes, four different uses, from one sentence. A system with only one of the four would either forget it, or know it but not act on it.

Why bother classifying?

Because each type wants different engineering - different storage, different retrieval trigger, different update policy:

Type Question it answers Lives in Typical failure if missing
Working What’s happening now? Context window Incoherent within a session
Episodic What happened before? Log/summary store Repeats past mistakes
Semantic What is true? Fact store / profile / graph Asks your name every day
Procedural How should I act? Instructions / skill library Ignores corrections forever

When you evaluate any memory product - or design your own - the first move is always the same: ask which of the four types it actually implements, and which it quietly lacks.

Quick recap

Next: deep into episodic memory - how agents store, summarize, and actually learn from what happened.

← Part 2Part 4 →