Building a useful agent · Memory
How a conversation becomes a memory
July 21, 2026 · 6 min läsning
Some experiences stay with you for life. Others disappear almost as soon as they happen. We built our agents' memory to work the same way.
When you talk to an AI model, everything relevant has to go in with what you say. The model is stateless: it has no memory of its own, so each time, the context comes entirely from you. And there is a limit to how much fits, so you have to be selective about what goes in.
There is more than one way to deal with that, and which one fits depends on the task. It is often a combination.
For a long-running agent, it means remembering the details that mattered, no matter when they happened. Memories are exactly that: compact, relevant information that appears when we experience something familiar. But to be able to recall a memory, it has to be created first.
Of everything you experience in a day, only some of it becomes a memory. Two parts of your brain decide that. The hippocampus creates the memory, the what, the when, the who. The amygdala decides how strong it is.
For an agent, that experience is the conversations you have with it and the work it does.
Conversation becomes memory
The memories you keep of things that happened are episodic memories: what happened, when, and who said it. Someone tells you there's a meeting Wednesday, and that's what you keep. An agent makes the same kind of memory out of a conversation.
It runs in the background, not mid-reply. Once a conversation goes quiet, the hippocampus reads a window of recent messages in one pass. It's a single model call. Out come episodes: one per distinct thing that happened, tagged with what kind of moment it was, each linked back to the conversation it came from.
Some memories outrank others
Not every episode counts the same. The agent has your meeting down for Wednesday. Tell it no, it moved to Thursday, and you're correcting a fact it already had, not adding a new one. Capture marks that as its own kind of thing.
That kind is called an act, and who did what decides how much it carries. A correction from you sets the record straight, the highest authority there is. The agent taking back something it said matters too, but that's the agent fixing itself, not you. Yours wins.
Who said it changes what it's worth.
Later on, that's how conflicts get settled. So the tag had better be right.
What the memory weighs
How much an episode is worth comes from two things. The act sets a floor: a correction stays heavy even said flatly, a routine lookup starts near nothing. The other is intensity, how forcefully you said it, judged against your own usual tone. A normally terse person who suddenly types in capitals is a spike; the same words from someone who always writes that way are just their normal. The weight is whichever of the two is higher. That's the amygdala's job, and the number it lands on is called salience.
NO WE NEVER SAID FRIDAY, THIS IS WRONG!!
lowercase fragments, no exclamation marks
Weight becomes lifespan
A routine lookup fades quickly. A peak moment holds far longer. Salience seeds that lifespan too.
That curve isn't ours. It's a model of human forgetting whose shape traces to 220 million real recall events, logged from people studying vocabulary in a language app. It turns on a single number: how long a memory lasts. We set that number from salience the moment the memory forms.
Every memory fades, but none is ever deleted. Fading only decides what comes back first. When you think about something, or experience it again, a new memory forms, with its own fresh fade. Same with the agent: when something comes up again in a later conversation, that's a fresh experience, and another new memory. The pile of them is what makes a thing stick.
Tell an agent something once, and weeks later it can seem gone. It wasn't erased. It went in weighed low, so it faded, and a passing question might not be enough to pull it back up past everything newer. But give it enough of the context and it surfaces again. It's the same for us, sometimes you just need a bigger reminder before it comes back.
What actually gets captured
So what actually ends up in memory? Here's an exchange and exactly what capture makes of it: who did what, when, and how much it counts.
Experience turned into memory, each one weighed for how much it matters. The same two jobs your hippocampus and amygdala do every day, without you noticing.
What capture hands off
Capture hands off a pile of fragments. Each episode is a single thing that happened, but when you experience the same thing enough times, it becomes a fact. That's what the neocortex does while you sleep. But that's the topic for another post.