← the late compiler
C_000016 · ai agents · foundation

Agent Memory Systems

The stores an agent reads and writes across turns — working context, episodic history, semantic facts and procedural skills.

Step 1 of 4

In words

What it is, why it matters, and what it is like.

Why am I learning this?

You are going to build AI agents — systems that don't just answer one question but carry on a conversation, call tools, and act over several steps. Without memory, every turn starts from zero: the agent forgets what you said two messages ago, loses the fact that it already looked up the train schedule, and cannot learn from its own mistakes. This concept gives you the vocabulary and the architecture to design agents that remember what matters and forget what doesn't. It unlocks: Agentic Workflows (where memory is what lets a multi-step plan survive), Multi-Agent Systems (where agents share what they know), and AI Security (where memory is what an attacker can poison or steal).

The idea, in plain terms

Imagine you are a waiter at a busy restaurant. A table orders food, then asks for water, then asks for the bill — you need to remember the whole exchange to serve them correctly. Your memory is not one single thing. You hold in your working memory what they just asked for and what you are in the middle of doing. You have episodic memory of this particular table: they were here last week and complained about the slow service, so you check on them. You have semantic memory of facts that are always true: the restaurant only accepts card payments, the chef is vegetarian. And you have procedural memory of how to do things: how to carry a tray, how to write a bill. A computer agent that talks to people and acts in the world needs exactly the same four kinds of memory, but stored in a way a program can read and write. When you ask an AI to 'remember that I prefer window seats', that fact has to go somewhere. When an agent is halfway through booking a flight, the partially-filled form has to live somewhere. When the agent calls a weather API, the result has to be kept so it can use it in the next turn. All of that is agent memory, and designing it well is the difference between an agent that feels thoughtful and one that feels like it has amnesia.

An analogy

Think of a chef in a busy kitchen. The chef has a printed recipe card for the dish they are cooking right now — that's working memory: what the current task needs, held close and discarded when the plate is plated. The chef also has a notebook of special requests from regular customers ('Mr. Gupta likes his biryani extra spicy') — that's semantic memory: facts about the world that persist across visits. The chef remembers that yesterday a new oven was installed and the cooking times are now shorter — that's episodic memory: events from the past that can inform what to do today. And the chef knows, without thinking, how to make a roux or julienne a carrot — that's procedural memory: skills that were once learned and are now automatic. For a computer agent, the analogies map directly: working memory is the context window of a single conversation turn, semantic memory is a database of facts the agent has been told or has learned, episodic memory is a log of past interactions and tool results, and procedural memory is a set of skills or code routines the agent can call. The analogy breaks down in a key way: a human chef's memory is stored in a brain that is always attached and always refreshed. A computer agent's memory is often stored in separate files or databases, and the agent has to explicitly decide what to write down and what to read back. If the designer forgets to save something, it's gone forever. If they save everything, the agent drowns in irrelevant details. The art of agent memory is the retention policy: what to keep, what to forget, and when to bring something back.

Definition

Agent memory is the set of stores an agent reads from and writes to across turns, typically divided into working context (what is needed right now), episodic history (what happened in the past), semantic facts (general knowledge), and procedural skills (how to do things).

Where this sits

This concept sits directly under AI Agents. Your notes on the Agent Loop describe the decision–act–observe cycle; memory is what provides the 'context' for the next iteration. It also depends on Tool Use, because the results of tool calls are exactly the kind of episodic memory that needs storing. It leads naturally to Agentic Workflows (where memory is what makes a long-running task coherent) and to Multi-Agent Systems (where agents share memory via communication protocols). You have also noted in your library that memory is a central component of agent systems, not an add-on — and that the retention policy (what to keep and what to forget) is the key design decision.

Signal from the Frontier

Get the next essay on mind, machine, and meaning

Essays at the intersection of AI, philosophy, and Indian governance. No promotional content.

We'll send a one-click sign-in link to confirm. No password needed.

Views expressed are personal and do not represent the Government of India or the Government of Uttarakhand.