Skip to content
AI|Course
← Engineer Persistent Memory for AI Agents

Lesson 2 of 7 · 1 hr

A taxonomy of agent memory

Before you build anything, you need shared vocabulary. Agent-memory literature borrows its categories from cognitive science; they are useful because each category suggests a different storage and retrieval design.

Watch

IBM describes four types of memory an AI agent needs. Compare it with the taxonomy in this lesson.

Watch on YouTube (opens in a new tab)Video by IBM Technology. The player loads only when you press play.

The four kinds

KindWhat it holdsExampleTypical storage
WorkingThe current task state inside the context windowThe plan so far, tool results this turnThe prompt itself
EpisodicSpecific past experiences"Last Tuesday the deploy failed because of a missing env var"Timestamped event log, searchable
SemanticFacts and knowledge, detached from when they were learned"The user prefers TypeScript"Key-value profile, vector store or graph
ProceduralHow to do things: rules, skills, instructions"Always run tests before opening a PR"System prompt, rule files, learned skills

The CoALA paper organizes language agents around a working memory plus long-term episodic, semantic and procedural stores. LangChain's docs map the same categories onto the stores you can use in practice.

Short-term vs long-term

A second, simpler split is by lifetime:

  • Short-term: lives within one conversation or task thread. Managed by trimming, summarizing and checkpointing.
  • Long-term: survives across threads and sessions. Managed by explicit write, read and update operations in a store.

Most production designs combine both, and use the taxonomy above to decide what kind of long-term record each fact is.

Using the taxonomy to design

For any piece of information, ask three questions:

  1. Who owns it? One user, one team, one agent, or global?
  2. How long is it true? A preference lasts months; a build error lasts minutes.
  3. How will it be asked for? By exact key ("the user's name"), by similarity ("what did we try last time?"), or by relationship ("who works with whom?").

The answers pick the store: a profile row, a vector index, or a graph.

Common mistake

Putting everything into one vector index. Facts about the user, a log of past episodes and standing rules have different update patterns and deserve different handling, even if they share infrastructure.

Resources

PaperarXiv
Cognitive Architectures for Language Agents (CoALA) (opens in a new tab)

The source of the working, episodic, semantic and procedural framing. Read the memory section.

DocsLangChain docs
Memory concepts (opens in a new tab)

Maps the human memory categories to agent techniques.

ArticleNeo4j Developer Blog
Modeling agent memory (opens in a new tab)

How the categories look when stored as a graph.

Check yourself

  1. Take the ten items from lesson 1 and label each as working, episodic, semantic or procedural.
  2. For each, answer owner, lifetime and access pattern.
  3. Propose a storage choice per item and note where two items can share one store.

Found a broken link or a mistake? Report it (opens in a new tab).