Brain Docs
Learn

Why memory exists

Why agents forgetWhy a bigger window doesn't fix itWhy RAG isn't memory

What a memory is

What a memory isThe statement kindsWhen facts collide

How it answers

How recall decidesDecay and retention

Using it well

What to write, and what not to

Reference

Brain/Docs
✦ ASKBrain on GitHubDashboard
LearnLearn

Learn

How memory for AI agents actually works — nine pages in order, from why the problem exists to the write policy that decides whether your deployment succeeds.

PURPOSE

Start here if "agent memory" is a new idea, or if you've heard it and suspect it just means a vector store with nicer words. Nine pages, in order. Each ends with something you can run.

You don't need an account, an API key, or an install to follow any of this. The playground opens an anonymous space and runs the real engine — every pipeline stage you see there is the production one.

Why this is a problem at all

Why agents forget

Inference is stateless, and the stack teams assemble instead costs six specific bills.

Why a bigger window doesn't fix it

Four limits that don't go away with capacity, and one no window size can touch.

Why RAG isn't memory

Documents have no subject and no time, so they can never disagree.

The path

Why memory exists

Why agents forget · Why a bigger window doesn't fix it · Why RAG isn't memory

The problem, why the two obvious fixes aren't fixes, and where a vector database's model is the wrong shape for this job.

What a memory is

What a memory is · The statement kinds · When facts collide

The four record types field by field, the three statement kinds and the mutation contract each one carries, and what actually happens when two claims disagree — which is a different answer for each kind.

How it answers

How recall decides · Decay and retention

Every stage of the read pipeline in order, the relevance band that decides the answer's shape, and the four separate mechanisms by which things fade, close, consolidate or are destroyed.

Using it well

What to write, and what not to

The judgement call that decides whether your deployment works — and which duplicates the database collapses for you, which it doesn't.

The three things worth leaving with

If you read nothing else, these are the ideas the rest of the documentation assumes you have:

01

The kind is a contract

Fact, Preference and Event are not labels. They decide what a later, conflicting claim is allowed to do — supersede, contradict, or nothing at all. Choosing the wrong one is how a memory layer starts erasing history.

02

An answer has a shape

recall returns Single, Many or an explicit None, decided by a relevance band over the whole candidate pool — never a top-K cut. None is a real answer your code can branch on, not an empty result set.

03

The write gate is the hard part

Retrieval quality has a ceiling set by what you admitted. The ranking is the easy half; deciding what deserves to be a memory is the half that decides outcomes.

Already have an agent and a concrete problem? Skip to Build — it starts from a loop you've already written. Running it yourself is Run, and the lookup reference starts at Concepts.

Was this page helpful?

Why agents forget

Inference is stateless, so an agent's only memory is the text you rebuild into the prompt — and the stack teams assemble to decide what that text should be has six invisible bills.

On this page

Why this is a problem at allThe pathWhy memory existsWhat a memory isHow it answersUsing it wellThe three things worth leaving with
Suggest an editOpen in Playground