How AI Memory Works
The Types of Agent Memory (And Which One You Actually Need)
The first ten minutes of every session
You open a fresh chat with an agent you've used for weeks — and you spend the first ten minutes re-explaining who you are, what you're working on, and the decisions you already made. The agent isn't stupid. It's missing the right kind of memory — and that's the useful way to think about this subject. The types of agent memory sound more exotic than they are. An agent's memory falls into five kinds: working memory (the context window, right now), three kinds of long-term memory — episodic (what happened), semantic (what is true), and procedural (how we do things) — and reflective memory (what it has learned about you over time). You don't need all five. You need the two or three that match what your agent is actually for.
Working memory: the window
Every agent has working memory — the context window it's reasoning over this very second. It holds the current conversation, the files or instructions in front of it, and whatever was just retrieved. It's fast, it's what makes the agent feel alive, and it's gone the moment the session ends.
Working memory is not a type of long-term memory; it's the stage the others perform on. Anything that wants to be used has to pass through it. When people complain an agent "forgot," they usually mean something didn't make it from the long-term store into the working window at the right moment. The mechanics of that hand-off are the heart of how AI memory works.
Episodic memory: what happened
Episodic memory is the record of events — past sessions, past tasks, the arc of your work together.
- For a coding agent: what was changed yesterday, which files were touched, what the previous session was working on.
- For a companion: what you talked about last week, the stories you've shared, the running thread of your relationship.
- For an assistant: the history of a project across many conversations.
Episodic memory is what makes an agent feel continuous — like it was there, not like it's meeting you for the first time every morning. Without it, every session starts blank and you spend the first ten minutes re-explaining. That's the continuation problem in its purest form.
The honest trade-off: raw episodic records are noisy. If the agent stores everything verbatim, retrieval has to dig through trivia to find signal. If it stores summaries instead, it drifts — each compression loses a little, until the "memory" is a game of telephone played with itself.
Semantic memory: what is true
Semantic memory holds stable facts about the world, the user, and the project — the kind of thing that's true until it isn't.
- About you: your name, your role, your preferences, the things you care about.
- About the project: the architecture, the domain, the decisions that are settled.
- About the world: the knowledge the agent needs to do its job.
This is what chatbot "memory features" store — a list of facts the vendor's AI decides (or you tell it) are worth keeping. It's the most widely deployed type of agent memory, and also the shallowest: facts are post-it notes, not histories. A semantic memory can know you're renovating a house without knowing anything about Tuesday's conversation about the tiles. Useful, but not continuity.
Procedural memory: how we do things
Procedural memory is memory of method — the conventions, skills, and instructions that shape how the agent works. For an AI, this is almost always written down:
CLAUDE.mdandAGENTS.mdfiles that tell a coding agent the project's architecture, conventions, and constraints.- Custom instructions that tell an assistant the format, tone, and guardrails you want.
- Rules files, style guides, and standing operating procedures.
This is the quiet workhorse of agent memory. A coding agent with a good instruction file feels dramatically more competent than one without, because it stops re-learning the project's conventions every session. It's procedural memory, loaded fresh each time — the pattern behind AI memory for coding agents.
Reflective memory: what I've learned about you
The newest and most interesting type: memory about the memory. Reflective memory is the agent's periodically synthesised understanding of you — your goals, your patterns, your growth — built by reviewing the episodic and semantic record, not just storing it.
Where semantic memory says "Daniel prefers answers with sources," reflective memory says "Daniel's questions have moved from basics to architecture over the last three months — he's learning fast and responds to challenge." It's the difference between an agent that stores facts about you and one that understands you. For companions especially, this layer is what separates a clever chatbot from something that feels like it actually knows you. It's also where the companion memory conversation gets genuinely interesting.
Which ones you actually need
Here's the pragmatic table. Match your use case to the memory types that earn their keep — the rest is optional:
| Use case | Working | Episodic | Semantic | Procedural | Reflective |
|---|---|---|---|---|---|
| Coding agent | Always | Valuable | Yes | Essential | Rarely |
| Work assistant | Always | Nice | Essential | Useful | Optional |
| AI companion | Always | Essential | Essential | Optional | What makes it feel real |
| Research agent | Always | Useful | Yes | Useful | Optional |
The default recommendation: start with semantic + procedural. They're cheap, transparent, and deliver ninety percent of the value — a fact list for who you are, an instruction file for how you want work done. Add episodic when your work spans sessions and you're tired of re-explaining. Add reflective when you want the agent to know you rather than merely remember facts about you. That progression maps almost exactly onto the journey from chatbot to assistant to companion — and to long-term memory for AI agents as a field.
A note on tools and labels
Vendors blur these lines constantly. A "memory" feature might really be semantic storage. A "long-term memory" product might be episodic records with semantic search bolted on. A "personalisation" layer is reflective memory wearing marketing clothes. When you read a product's claims, translate them into these categories and ask: what does it store, and what will it actually pull back in? The label tells you less than the architecture. And if the answer is "a summary of what I said," you already know the drift problem is coming.
The bottom line
The types of agent memory: working memory is the stage; episodic memory is what happened; semantic memory is what's true; procedural memory is how we do things; reflective memory is what I've learned about you. Most projects only need semantic and procedural to start — and only need the deeper layers when the goal stops being answers and becomes continuity. Choose by use case, not by buzzword.
Read next: how does AI memory work, and RAG vs fine-tuning vs memory.
Tired of re-explaining is the symptom.
SeamlessContext ships the episodic and semantic layers that end it. Start with facts and history — get continuity without the build.
Get SeamlessContext