How agent memory works

The card that never got stamped

You told your agent the deploy target changed. Twelve sessions later it hands you the old one, and it sounds completely sure. Nothing broke. Here is the machine that did it.

01

Every note becomes a row of numbers

An index card feeds into a small machine and comes out the other side as a paper tape covered in rows of abstract square marks.

The system chops your conversation into chunks. Each chunk goes through a machine that turns it into a long row of numbers, called an embedding. Two chunks about the same subject come out with similar rows.

The numbers describe what a chunk is about. That is the only thing they describe.

02

A question grabs whatever sits closest

A question card on the left connects by three threads to cards standing in a drawer. The thread to the middle card is thick and red, the other two are thin and slack.

Ask a question and it becomes a row of numbers too. The system hands back the chunks whose numbers sit nearest to it. That is the whole trick. Nothing else is happening.

03

The out-of-date note usually wins

A balance scale tipped heavily toward a thick yellowed index card dense with marks, while a small crisp white slip carrying only a few marks floats high on the raised pan.

The first time you explain something, you explain it properly. The correction comes later as one clipped sentence at the end of an unrelated thread.

So the dead fact is longer, richer and more on-topic than the live one. It looks like a better match, because by the only measure being taken, it is.

04

Nothing marks a fact as retired

A split comparison. On the left, a filing card carries a small stone grave marker with a used red rubber stamp beside it. On the right, an identical card sits completely bare, with only a faint empty ring where a stamp never landed.

Databases solved this decades ago. They have UPDATE. They have DELETE. They have tombstones, little markers meaning a record used to be here and is gone now.

The store underneath most memory products can add a chunk and find a chunk. That is the entire vocabulary. There is no way to say retired, and no button you could press to say it.

The whole problem in one line

Being overturned isn't a topic

Nothing in a row of numbers moves when a fact stops being true. The correction does not reach back and change the original. It just sits somewhere else in the drawer, quieter and shorter, waiting to lose.

What you told it Session 1 "Deploy target is Vercel." Explained in full. Long. Session 3 "Actually it's Fly now." stored stored similarity index add a chunk find a chunk Session 12 "Where do we deploy?" asks ranks Vercel, superseded closer Fly, current weaker Returned answer: Vercel Stated with full confidence.
Both facts live in the same index. The superseded one is longer and more on-topic than the one-line correction that replaced it, so it ranks as the closer match and comes back as the answer. Bar lengths are illustrative.

How often do these systems return the currently-true version?

StateMemBench, August 2026. 234 multi-session scenarios where facts get revised partway through. Two underlying models.

SystemQwen-3.5-9BDeepSeek-V4-Flash
Long context0.1490.149
Mem00.1490.177
A-Mem0.1270.199
LightMem0.0190.012
MemoryOS0.0250.025
StateMem0.2330.363
The best score from a system you can go and install is A-Mem at 0.199, roughly one revised fact in five. StateMem is the paper authors' own method, so discount it accordingly. Two products score below stuffing the raw transcript into the context window and using no memory layer at all. The scenarios are synthetic.