For teams building agents that should remember across sessions without trusting every note blindly.
Updated
Anthropic's "Components of agent memory" describes memory as layers: a transcript of what happened, short notes, structured representations such as linked wiki pages, a small injected layer every session sees, and an offline "dreaming" pass that checks notes against transcripts. BrainBox covers each layer: Intelligence Traces, learnings and personal pages, wiki pages with links, get_index, and the brain-dream skill that consolidates memory on a schedule over MCP.
Anthropic's article describes agent memory as knowledge an agent gains from experience and keeps between sessions. It layers it: a transcript at the bottom, notes the agent writes, representations such as a wiki of linked pages built from those notes, and a small injected layer at the top. A background "dreaming" pass reflects on the transcripts, corrects notes that were wrong or have drifted, and tidies the representations. Its cautions are that notes can be wrong from the start or go out of date, that the injected layer must stay small because a bad note is carried into every session, and that shared writes need care, for instance one page per subject. The results it reports come from Anthropic's own evaluations, and we do not repeat them here.
Record a session's own transcript or summary as a trace with interpret: false, so the text is stored as written and a later pass has real ground truth. A business event sent with the default is stored as the Brain's interpretation of it. Set source.externalId so a retry does not duplicate it.
{
"text": "Call with Acme: the billing contact is now Priya Rao. Terms moved to net-45.",
"eventType": "meeting",
"interpret": false,
"source": { "externalId": "session-2026-11-20-a" }
}A fact that should change how every future agent answers is a learning (create_learning), a sentence or two. Active learnings are injected into every session of the project, so be sure of it; if you are not, put it in a trace or a wiki page. A person's own way of reading the data goes on a personal page, visible only to them. Where two places fit, choose the one a wrong entry hurts least: trace before wiki page, wiki page before learning.
Everything known about one subject lives on one page, updated in place. Use mode: "append" for running logs, pass baseVersion when you rewrite a page so you do not overwrite someone else's change, quote the trace id beside a claim, and link related pages with [[namespace/page-name]].
get_index is what every session reads first. It returns the Brain's map and the titles of active learnings; list_learnings carries the facts. Keep each learning to a sentence and move detail into the wiki.
brain-dream is a pass over what agents have recorded. It reads the log of its last pass, gathers traces since then, verifies each learning and wiki claim as supported, contradicted or unverifiable, merges duplicate pages, adds links, retires contradicted learnings (superseding them when it has the corrected fact), and appends one entry to a memory/dream-log page. Unverifiable is a valid result: it never retires a learning only because it found no trace. Schedule it with the loop or schedule skills; a daily cadence is a reasonable default.
Use brain-dream to consolidate memory for the support-brain project. Run it daily.From a test run in a scratch project with seeded data, not production. We seeded 10 events as traces with interpret: false, ran a short brain-memory session, then ran brain-dream twice. After the session there were 5 active learnings (one a duplicate): the Acme contact is Dana, Acme invoices net-30, "Acme pays on net 30 terms", refunds are allowed within 30 days, and orders ship from Reno. Later traces contradicted three of them: the contact is now Priya Rao, terms became net-45, and shipping moved to Sparks. The wiki had memory/acme-roasters, a duplicate memory/acme-account-notes (both still said Dana, net-30 and Reno) and memory/refund-policy. get_index injected 5 learnings.
The pass read each learning against the full trace body. It superseded 3 (contact, terms, shipping), retired the duplicate with a reason, and kept the refund learning, which a trace supported. It merged the duplicate page into memory/acme-roasters with the trace ids beside each fact, archived the duplicate, linked acme-roasters and refund-policy to each other, and created memory/dream-log. Afterwards there were 4 active learnings (Priya Rao, net-45, ships from Sparks, refunds within 30 days), acme-roasters and refund-policy were at version 2, and backlinks resolved in both directions.
With no new traces and no contradictions, the second pass changed nothing except one log entry: "No changes". That is the property that makes it safe to schedule. One caveat on the method: this test drove the tools through brainbox tool (CLI 0.20.0) rather than an MCP client, because the plugin sign-in in that environment was bound to a different project. The skills' logic is the same either way.
Backlinks, links on get_wiki_page and the wiki section of get_index need the wiki link graph setting, which is off by default and available on request. Without it links you write are still stored, and the pass says in its log that it cannot verify them. Archiving a merged page needs the agent archive tools setting; without it the pass overwrites the duplicate with a one-line pointer. Agents cannot retire a promoted learning, so a wrong promoted rule can only be flagged in the dream log for a person. A learning cannot cite its evidence yet, so the skills write the trace id into the learning's context text. There is no deduplication when a learning is created; the dream pass merges after the fact.
| Layer in the article | What it is | On BrainBox |
|---|---|---|
| Transcripts | A searchable record of what happened | Intelligence Traces: process_event with interpret: false stores the text as written; recall_traces and get_trace read it |
| Memory notes | Short observations written during a session | Learnings (create_learning) and personal pages (save_personal_page) |
| Representations | Structured pages built from notes, linked as a map | Wiki pages, one per subject, with [[links]] (save_wiki_page, recall_wiki) |
| Injected context | A small layer every session sees | get_index, which returns the Brain's map and the titles of active learnings |
| Dreaming | An offline pass that checks notes against transcripts and tidies | brain-dream (run by you, over MCP) or the server's opt-in synthesis |