
The 4 Types of AI Memory (With a Table)
AI memory is how an artificial agent retains and reuses information across time. It spans four types adapted from human cognition: working memory (the live context window), episodic memory (specific past events), semantic memory (general facts), and procedural memory (learned skills and routines). The first is temporary; the other three persist across sessions.
The four types at a glance
The taxonomy isn't invented for AI. It comes straight from cognitive psychology, Tulving's 1972 split between episodic and semantic memory, and the later distinction between declarative and procedural knowledge. The CoALA paper (Sumers, Yao, Narasimhan & Griffiths, 2023; arXiv:2309.02427) is what mapped that cognitive taxonomy onto LLM agents, and most modern memory systems build on it.
| Type | What it stores | Example | Where it lives | Lifespan |
|---|---|---|---|---|
| Working | The information the agent is actively reasoning over right now | The current chat turn, the task in progress | The context window | Temporary, resets between sessions |
| Episodic | Specific past events, tied to a time and context | "On June 2, the user chose Postgres over Mongo" | Vector DB / event log | Persistent, but decays in salience |
| Semantic | General facts and knowledge, detached from any single event | "The user's stack is FastAPI + React" | Vector DB / knowledge graph | Persistent, long-lived |
| Procedural | Learned skills, routines, and how-to patterns | "When deploying, run migrations before restart" | Prompts, code, skill stores | Persistent, refined over time |
Working memory: the context window
In an LLM, working memory is the context window. It holds what the model is actively attending to, the current conversation, the documents you pasted in, the task at hand. It has two defining properties: it's token-bounded (limited capacity, like human working memory) and it resets between sessions.
This is why "do LLMs have memory by default?" has an uncomfortable answer: not really. A raw model only has working memory. Close the session, and everything is gone. The other three types are what you add to make an agent that actually remembers, which is the whole point of an AI memory layer.
Episodic memory: what happened
Episodic memory stores specific events anchored in time and context, the user asked X on Tuesday; the agent shipped Y last sprint. It's autobiographical. When you ask an assistant "what did we decide last week," you're querying episodic memory.
The defining feature is that each entry is a discrete experience, not a generalized fact. That distinction, event versus fact, is the line between episodic and semantic, and it's the single most important one to get right when designing a memory system. We cover it in depth in episodic vs semantic memory.
Semantic memory: what's known
Semantic memory holds general facts stripped of the specific moment they were learned. "Paris is the capital of France" is semantic, you don't remember the exact instant you learned it, just the fact. For an agent, semantic memory is the stable knowledge base: the user's stack, their preferences, the architecture of the system, decisions that hold across time.
Semantic facts are the most reusable type. They're what surfaces when someone asks "how does X work" rather than "when did I do X."
Procedural memory: how to do things
Procedural memory is learned skills and routines, the how, not the what. For a human it's riding a bike; for an agent it's a reliable multi-step workflow: how to deploy, how to format a report, the sequence that reliably resolves a class of bug.
This is the least mature type across shipping products. Most memory products do episodic and semantic well, and treat procedural as an afterthought, the frontier most systems haven't fully built out.
Storage tiers vs. memory that learns
Here's the gap the four-type table hides. Most memory systems implement these types as storage tiers, four different places to put a fact. You write an episode here, a semantic fact there, and retrieval picks the relevant ones at query time. That's useful, but it's static. Nothing moves.
Human memory doesn't work that way. Episodic experiences get consolidated into semantic facts; repeated procedures get compressed into skills; what stops mattering fades. That movement between types, consolidation, is what turns storage into learning.
iCog is organized around that movement as a first-class operation. It implements all four standard types 1:1:
| Standard type | iCog taxonomy |
|---|---|
| Working / in-context | session context window |
| Episodic | episodic (events, sessions, what happened) |
| Semantic | semantic (facts, architecture, decisions) |
| Procedural | procedural (how-tos, coding patterns) |
But it adds the layer most products treat as early-stage: memory that moves between types over time. Episodic experiences are consolidated into semantic facts, recurring procedures are extracted as skills, and salience-weighted decay prunes what stops mattering, a deterministic consolidation process ("dream") that runs offline, not at retrieval time. The promotion and decay logic are algorithmic; the LLM only renders the language at the end. This grounds iCog in the same Tulving and CoALA lineage the whole taxonomy comes from, it takes the textbook seriously rather than bolting fact-storage onto a context window. More on the mechanics in memory consolidation for AI agents.
A note on the benchmark wars: vendors actively dispute accuracy numbers in this space, and published scores are frequently revised, contested, or recomputed under different conditions. Treat every reported figure as vendor-reported and contested. The durable way to evaluate a memory system isn't a single disputed number, it's the architecture: does it just store the four types, or does it learn across them?
Frequently asked questions
What are the four types of AI memory? Working memory (the live context window), episodic memory (specific past events), semantic memory (general facts), and procedural memory (learned skills and routines). The taxonomy is adapted from cognitive psychology via the CoALA framework.
What is the difference between episodic and semantic memory in AI? Episodic memory stores specific events tied to a time and context ("the user chose Postgres on June 2"). Semantic memory stores general facts detached from any single event ("the user's database is Postgres"). Episodes are experiences; semantics are knowledge.
What is working memory vs long-term memory in an AI agent? Working memory is the context window, token-bounded and wiped between sessions. Long-term memory (episodic, semantic, procedural) persists across sessions in external stores like vector databases, knowledge graphs, or skill libraries.
What is procedural memory in AI agents? Procedural memory holds learned skills and routines, reliable multi-step workflows, the how rather than the what. It's the least-developed type across products, often treated as an afterthought.
Do LLMs have memory by default? No. A raw LLM only has working memory, the context window, which resets between sessions. Persistent episodic, semantic, and procedural memory must be added through a dedicated memory layer.
Try memory that learns
The four types are table stakes. The question that separates memory systems is whether they store those types or learn across them, consolidating episodes into facts, extracting skills from procedures, and letting salience decide what survives. That consolidation engine is iCog's architecture, not a benchmark claim. Try iCog and give your agents memory that moves.