DEV Community

Cover image for The Four Types of AI Agent Memory, Explained
PromptMaster
PromptMaster

Posted on

The Four Types of AI Agent Memory, Explained

Agents need four distinct kinds of memory: working (what it's doing now), episodic (what happened), semantic (what it knows), and procedural (how it does things).

They map onto human cognition because the same constraints produce the same solutions. Confusing them is the single most common memory design mistake — almost every design question is really "which of these four am I talking about?"

Why one word isn't enough

"Give the agent memory" sounds like one feature. It's four. Working, episodic, semantic, and procedural memory each have a different job, a different lifetime, and a different place to live. Treating them as one undifferentiated thing is why so many memory systems end up muddled — storing the wrong things, retrieving badly, and growing into noise.

The vocabulary comes straight from cognitive science, and that's not decoration. A mind that had to hold every experience in immediate awareness would be paralyzed, so human cognition evolved separate systems. An agent faces the same pressure, and arrives at the same answer.

Working memory

Working memory is what the agent is holding right now — the current task, the last few turns, intermediate results. It maps directly onto the context window: fast, immediate, and small, wiped when the task ends. This is the memory an agent already has by default. Everything else is the memory it doesn't.

Episodic memory

Episodic memory is the record of specific past events — what happened, when, in which session. "The user reported this bug last Tuesday." "We tried this approach and it failed." It's memory of experiences, tied to time and context, and it's what lets an agent refer back to particular past interactions rather than starting fresh each time.

Semantic memory

Semantic memory is general knowledge distilled from experience, stripped of when or where it was learned. "This user prefers concise answers." "The refund window is thirty days." Where episodic memory remembers the event, semantic memory remembers the fact the event taught. Much of building memory is turning episodes into durable semantic facts.

Episodic remembers the event.
Semantic remembers what it taught.

Free Agent Memory Quick-Start — the four kinds of memory and the whole loop (store, retrieve, reflect, forget) on a few pages. Download it free.

Procedural memory

Procedural memory is how to do things — the skills, routines, and patterns an agent follows. In practice this often lives in the agent's instructions, tools, and learned workflows rather than a fact store. It's the least discussed of the four and the one most often baked into the system rather than stored dynamically.

The distinction that saves you

Almost every memory design question resolves to "which of these four am I talking about?" Storing a user preference? Semantic. Recording what happened in a session? Episodic. Managing the current conversation? Working. Teaching a repeatable skill? Procedural. Naming the kind tells you where it lives, how long it should last, and how to retrieve it.


Going deeper? AI Agent Memory: The Complete Guide is the full reference — 41 pages, 15 chapters, 5 appendices, with a worked support-agent example and a 30-day adoption path. Get the guide.

FAQ

What are the four types of AI agent memory?

Working (the current task, held in the context window), episodic (specific past events tied to time), semantic (general facts distilled from experience), and procedural (how to do things — skills and workflows).

What's the difference between episodic and semantic memory?

Episodic memory records specific events — what happened, when. Semantic memory records the general fact an event taught, stripped of when it was learned. Ten episodic sessions of a user asking for brevity become one semantic fact: 'prefers concise answers.'

Is the context window the same as working memory?

Effectively yes. Working memory is what the agent holds right now — the current task and recent turns — which lives in the context window. It's fast and immediate but small and wiped when the task ends.

Where does procedural memory live?

Usually in the agent's instructions, tools, and learned workflows rather than a separate fact store. It's the 'how to do things' memory, and it's most often baked into the system rather than stored and retrieved dynamically.

Why does the type of memory matter?

Because each kind has a different lifetime, retrieval pattern, and storage need. Naming the kind tells you where a memory should live and how to handle it — and confusing them is the most common memory design mistake.

Top comments (0)