the memory guide

Memory for AI agents: why run 40 beats run 1

Why AI sessions forget, what agent memory actually is (and is not), the WHAT/WHERE split that makes recall useful, and the capture discipline that makes a loop compound instead of resetting.

learn /7 min

The amnesia tax

Every AI session starts brilliant and ignorant. The model can reason, but it knows nothing about your last run: the decision you made Tuesday, the approach that failed, the file where the handler actually lives. So it re-explores, re-asks, and occasionally re-makes a mistake you already paid for. Teams feel this as a tax: the tenth run of a process costs nearly what the first did.

Context windows do not fix this; they are working memory, gone at session end. Bigger windows just raise the ceiling on how much you can re-paste. The fix is memory that persists outside the session and is recalled into it deliberately.

What agent memory is, and is not

Agent memory is operational knowledge produced by doing the work: decisions and their reasons, corrections, learned constraints, and the layout of the territory. It is not document retrieval. RAG recalls what your organization wrote; agent memory recalls what your agents learned, which is usually not written anywhere else.

Ranking matters more than storage. A useful recall weighs semantic relevance, importance (a rule outranks a note), and recency, so the agent gets the eight things that matter rather than eighty that match.

Split WHAT from WHERE

The two questions an arriving agent asks are different in kind: "what do we know?" and "where do things live?" Mixing them degrades both. Knowledge (the WHAT) wants importance-ranked recall. Location (the WHERE) wants a semantic map: this feature lives in these files, that doc governs this process, so the agent navigates instead of re-exploring.

In practice the split pays off in one call: a single context query answering both, plus the related work items, means the agent starts every step already oriented. That is the mechanical content of "recall before acting."

Capture is a discipline, not a byproduct

Recall is only as good as what was captured, and capture fails in two directions. Automatic-everything produces a landfill: transcripts stored wholesale, signal buried. Voluntary capture produces silence: nobody writes the memory at 6pm on a Friday.

The durable pattern wires capture into the process: the step where a decision happens carries the recording of that decision, as part of advancing. Make it mandatory exactly where the why matters (a gate that will not close without context) and optional elsewhere. Then maintain the store like the asset it is: deduplicate noisy categories, make forgetting reversible, and let unused memories decay in ranking.

Compounding: what run 40 knows

Put recall and capture on the same loop and the economics invert. Run 1 explores, decides, records. Run 15 arrives knowing the style rulings, the rejected approaches, the file map, and spends its budget on the actual work. Run 40 is faster, cheaper, and less supervised, not because the model improved, but because the system around it accumulated.

This is the quiet argument for structured autonomy in general: the process carries the quality, and the memory carries the learning. The model becomes a replaceable part in a system that gets better with use.