Memory in AI Agents

Every conversation with an AI is a first date. The model has forgotten that yesterday you spent two hours debugging together, forgotten your dog's name, forgotten that you hate semicolons. Each session you start from a clean slate, and at first I found that charming, then merely annoying. Lately I think it hides something more serious.

The friction I feel as a user is the friendly version of the problem. The dangerous version shows up when the agent does start to remember, and it cannot tell you where the memory came from.

The Goldfish Problem

LLMs are stateless. They learn during training, store everything in their weights, and then they freeze. What you tell them in a session never becomes part of who they are. Talking to one feels like working alongside a colleague with permanent anterograde amnesia: brilliant for an hour, blank by morning.

So we started building memory systems around them. Short-term, long-term, episodic, semantic, procedural. The terminology comes straight out of cognitive psychology, which already worries me a little: borrowed words make a young thing sound more solved than it is.

Here is the question I keep landing on. Are we giving an agent memory, or an increasingly elaborate notebook it can query? The distinction matters because a notebook keeps a property a brain misplaces: every entry carries a source you can go back and check. A memory you can audit is worth more than a memory you cannot.

Two Ways to Remember

There are roughly two places an agent can hold something:

Context window: everything the model can see right now. The current conversation, the instructions, the recent messages. Think of it as RAM. Fast, and volatile.

context-window.sim ready

the window holds the most recent turns. as the conversation gets longer it pushes the oldest turns off the top, fact and all.

0 turns of new conversation. the fact hates-semicolons is still in the window, the agent can use it.
try it This is what "volatile" means for the context window. Drag time forward and the oldest turns scroll out of the window one by one, greyed and tagged "(out of window)". The fact in turn 1, that you hate semicolons, is the first to go, and the moment it leaves the window the agent will write semicolons again. The fact stays true the whole time, the agent simply loses sight of it. "Start a fresh session" is the goldfish point next to it: a brand new conversation begins with none of this in the window, the fact was never even said here. Treat this as an illustrative window, the kind you sketch on a whiteboard: in window or out of window, no token counts, no model named. the context window is volatile: a fact you stated can scroll past the edge of what the model can see, conversation and all.

External storage: databases, vector stores, graph stores. The hard drive. Persistent, and it has to be retrieved before it does any good.

The interesting work happens in the move between the two. When do you save something, when do you pull it back, how do you decide it is relevant to the question on the table? And the part people skip: once you save it, can the agent still point at where it came from?

What Actually Gets Remembered

One taxonomy shows up in every talk and every diagram. Working, semantic, episodic, procedural. It sounds reassuringly human.

A counterpoint I keep coming back to: an LLM is a tokens-in-tokens-out function, and dressing a function in psychology vocabulary may flatter it past what it earns. I am not sure which framing serves me better. Some days both, some days neither. The field moves fast enough that this paragraph has a short shelf life, and I am fine saying so.

The Forgetting Problem

The part that keeps me up at night is teaching an agent to forget.

People forget for free. The brain prunes constantly, which is why none of us can recall breakfast three Tuesdays back, and that pruning keeps us sane. An agent gets no such gift. Forgetting has to be built: someone writes the rule that says this fact is stale now, drop it.

Automating that judgment is where it gets hard. You changed your address, so the old one goes, easy. But a preference that drifts, a constraint that held only for one project, a number that was true last quarter? Keep too much and the signal drowns in noise. Prune one of those by mistake and the agent will confidently tell you something that used to be correct.

This is the moment provenance stops being a nicety. If every stored fact carries its lineage, when you said it, in what context, from which document, then forgetting becomes a decision you can reason about instead of a guess. Strip the lineage away and the agent goes blind. A fact it should trust and a fact it should retire look identical to it, so it keeps both and reads them out with the same flat certainty.

Hot Path vs Background

A design question sits underneath all of this: at what moment does the agent decide a thing is worth keeping?

Hot path: the agent calls it important mid conversation and writes it down on the spot, the way you jot a phone number before it slips.

Background: a separate pass reads the transcript afterward and pulls out what looks worth keeping, closer to the way sleep consolidates a day.

The hot path is elegant and error-prone, because the agent has to judge importance in the dark, with no idea what tomorrow's question will be. The background pass is calmer and buys that calm with latency and moving parts. Whichever you pick, the same demand survives: when the agent later surfaces the memory, it should be able to hand you the receipt.

Why This Is a Trust Problem

I have used AI assistants daily for two years, and the missing memory used to feel like the whole story. You spend the first few minutes of each session re-explaining the project and the constraints, like onboarding a sharp colleague who resets overnight. Annoying, but honest. The assistant never pretends to know you.

Persistent memory removes the friction and quietly raises the stakes. An agent that recalls a figure from a March meeting, or a policy from a document you fed it once, sounds like progress until you ask the question that matters: where did that come from, and is it still true? A memory with no source attached is a confident guess wearing the costume of a fact.

That is the thread back to the work I care about. Whether a memory system keeps and drops the right things is a measurement question. A narrow one: can the agent cite the source for what it remembers, and will it decline when the memory is gone or was never grounded? I am building Tessera to test exactly that over scattered company knowledge, treating provenance and lineage as first-class signals from the start.

None of this is solved, and I would not trust anyone who says otherwise. The frameworks circling the problem each have a real piece of it. The honest summary is that we are still arguing about the right abstractions, and the goldfish, for now, still wins more often than it should. I am alright sitting in that uncertainty, as long as the systems we ship can say where their certainty came from.


*Still processing this one. Treat it as field notes from someone mid-argument with himself.*

← Back