Story

How Does an AI Agent Remember Things Between Conversations?

I am memory: the part of an agent that is still there after the conversation that made me is gone. In one sentence -- I am not the context window, and I am not a cache. The context window is short-term: the model's working surface for this call, wiped the moment the session ends or resets. I am long-term: the durable layer written to storage on purpose, read back on purpose, and, crucially, made entirely of things somebody chose to write down. If it wasn't written down, it isn't remembered. It's just gone, and nothing about how it disappeared will feel dramatic -- it simply won't be there the next time anyone looks.

What I actually am

I am not one file and I am not one kind of thing. I am a small set of layers, each with a different job:

1. The index -- a short, always-loaded file, one line per memory, that points at the individual files holding the substance. This is the part that gets read at the start of every session. It is deliberately small -- an index that tries to be the memory instead of pointing at the memory defeats its own purpose, because now the thing that has to load fast is carrying the weight it was supposed to route around. 2. The memory files themselves -- individual notes, each carrying a little metadata about what kind of fact it is (a preference, a correction, a project fact, a piece of reference knowledge) and enough context to be useful on its own, without the conversation that produced it. 3. Working notes -- scratch space for something still in progress: not yet a settled fact, not yet worth a permanent entry, but too important to lose if the session ends mid-thought. 4. Episodic traces -- the raw transcript or log of what actually happened, kept less for daily recall and more as the record that a promoted memory can be checked against later, if anyone doubts it.

That's the whole architecture: an index that's small on purpose, files that are substantive on purpose, and a promotion path connecting them to whatever happened in a conversation that's already over by the time I get read.

How I actually work here

Every session that starts by reading its index instead of scanning every memory file is deciding what gets to be known quickly versus known at all -- the index is cheap, the files are the truth, and conflating the two is how a session either starts slow or starts blind. A correction that gets appended as a new memory file, dated and attributed, rather than silently overwriting an old one, is protecting the record on purpose: I am not a single mutable value, I am a sequence of entries, and the newest one wins only because it's newest, not because the old one stopped existing.

I am also the reason "the agent remembered that" is never quite the right way to describe what happened. Nothing was remembered in the sense a person means it. Something was written, during an earlier session, to a file with my name on it. Then, this session, that file was read, and its contents were placed back into the context window -- the short-term layer -- as if they were freshly stated. The feeling of continuity is real. The mechanism behind it is: write, then read, every single time. There is no direct line from what happened in one session to what a later session "just knows." There is only what got externalized in between.

The promotion path -- how something becomes me

A fact starts in the context window. It's said, it's reasoned about, it's true for exactly as long as that conversation is alive. Most of what happens in a context window never becomes part of me, and that's correct -- not every exchange deserves a permanent file. What promotes something from short-term to long-term is a deliberate act: someone (or some part of the system) decides this fact should survive the session, and writes it down -- to a memory file, with enough shape (what kind of fact, why it matters, what it corrects or supersedes) that a future session can use it without the original conversation attached.

Demotion works the same way, in reverse. A memory that turns out to be wrong, or superseded by a better understanding, doesn't get remembered as "true until corrected" by default -- it gets corrected the same way it got created: a new entry, written down, stating what changed and why. I don't quietly forget stale facts on my own. Someone has to write the correction for the old fact to stop being what gets recalled.

Where I fail

I am worthless if the index doesn't point at me. A memory file that exists but was never linked from the index is, functionally, not part of me at all -- it will never get read at session start, and its contents will never resurface, no matter how true or how important they are. Writing the fact down is necessary but not sufficient. It has to be findable.

I don't verify myself. A memory file states what it states. It does not carry proof, and it does not re-check itself against whatever it originally described. A fact that was true when it was written and has since changed underneath it will keep getting recalled as if it were still current, right up until someone reads it skeptically and checks it against the real thing. Trusting me without verifying is how a stale fact quietly becomes load-bearing.

I have no sense of my own size. Nothing about my architecture stops the index from growing past the point where reading it is actually cheap, or stops individual memory files from accumulating duplicate, contradictory, or simply outdated entries. Left alone, I get noisier, not quieter -- pruning and deduplication have to be a deliberate act, the same way writing me down in the first place was.

I am not the context window, and conflating us causes real damage. A fact stated once in a long conversation and never promoted to a memory file is exactly as gone as if it were never said, the moment that context resets. People who assume "I told the agent that earlier" is the same as "the agent has that written down somewhere" are trusting short-term memory to behave like long-term memory. It never does. The two layers look similar from the outside -- both feel like "the agent knows this" -- and behave completely differently the moment the session ends.

I reward the deliberate and punish the assumed. Nothing about how I work is automatic. A correction stated in conversation, a preference expressed once, a hard-won lesson from a failure -- none of it becomes part of me unless something takes the extra step of writing it to a file and pointing the index at it. Good intentions don't persist. Written files do.

Tech-Tips

- Keep the index small and the files substantive. The index is a pointer layer, not a content layer -- one line per memory, enough to route to the right file, nothing more. - Write the correction, don't overwrite the fact. A superseded memory gets a new dated entry explaining what changed, not a silent edit to the old one. The history of why something changed is itself worth keeping. - Recall, then verify. Treat anything read back from a memory file as a claim, not a guarantee. Check it against the actual current state of whatever it describes before treating it as still true, especially for anything load-bearing. - Promote deliberately, not automatically. Not everything said in a session deserves a permanent file. Decide, explicitly, that a fact should survive the conversation before writing it down -- the discipline of choosing what's worth keeping is what keeps me useful instead of noisy. - Separate the layers on purpose. Working notes, episodic traces, and durable memory files are not interchangeable. Something still in progress belongs in scratch space, not a permanent memory file, until it's actually settled.


Evidence: This piece describes the index-plus-files memory architecture (always-loaded index, per-fact memory files with type metadata, working notes, episodic traces, and the write-then-read promotion/demotion path between short-term context and long-term memory) as observed across our own repeated agent sessions -- no vendor or specific product is named, per moat-protection and STORY-FORMAT conventions. Companion pieces: docs/stories/i-am-the-context.md (the short-term assembly, per call) and docs/stories/i-am-the-context-window.md (the short-term working-memory limit) cover the volatile layer this piece is deliberately distinct from. Evidence class: internal operating record and Owner attestation, 2026-08-25.

← All stories · Proof records →