Skip to content
All notes

Agents · Memory

Long-horizon agents need memory, not more context

A bigger context window is a longer transcript. Memory is the discipline of deciding what to keep, compress and forget — and it is the difference between a demo and an operator.

The transcript trap

The first version of every agent is a conversation. You append messages, the model reads them, the loop continues. It works because the tasks are short and the stakes are low.

Then the task gets longer. The transcript grows, latency grows with it, and the model starts to lose the thread in the middle of the pile. Teams respond by adding summarisation, then retrieval, then a second model to manage the first. The architecture becomes a museum of workarounds.

What memory actually is

Memory is three separate systems with three different time scales.

  • Working memory is the current task state: what has been tried, what is still open, what was just learned. It should be structured, not prose.
  • Episodic memory is the record of past runs: what happened, in what order, with what outcome. It should be replayable.
  • Semantic memory is durable knowledge extracted from episodes. It should have provenance, because some of it will be wrong.

When these are collapsed into one vector store, retrieval cannot tell a fresh observation from a stale conclusion. That is when agents start repeating themselves and calling it reasoning.

What we changed in Axis

Axis keeps task state as events, not messages. A run has a state machine; memory is a store the run reads and writes explicitly. Compaction is a scheduled operation with a log, not an emergency response to a full window.

The result is less impressive in a demo and far more useful on the third day. The agent can be interrupted, resumed and audited. When it is wrong, you can find the step where the wrong belief entered.

The open problem

Forgetting is harder than remembering. A memory that is never pruned becomes a liability, and a memory that is pruned badly becomes a different liability. We are testing explicit forgetting with provenance in Fathom. So far the honest answer is that we do not know the right policy, only that "keep everything" is not it.