# Components of agent memory — Anthropic tests how Claude remembers

> Anthropic breaks agent memory into four layers, measures each one, and shows how an offline 'dreaming' pass fixes bad notes.

- Org: Anthropic
- Date: 2026-11-06
- Category: article, benchmark
- Source: https://www.anthropic.com/research/components-of-agent-memory
- Canonical page: https://ai-tldr.dev/releases/anthropic-components-of-agent-memory/

## In short

Anthropic's engineering post splits agent memory into four layers and tests them. Memory lifted Claude Opus 5.5 from 0.655 to 0.838 on CL-Bench, and offline 'dreaming' fixed wrong notes from past transcripts.

## What it is

'Components of agent memory' is a November 6, 2026 engineering post by Anthropic's Lance Martin. It describes a four-layer memory stack for Claude agents, from raw transcripts at the bottom to a small block of injected context at the top. It then measures that stack on the CL-Bench database task, a Pokémon Red run, and wiki-building tests over a large document corpus.

## How it works

Agents write notes during a session, and wiki-style representations can be built on top of those notes. 'Dreaming' runs offline when the agent is idle. It reads past transcripts and current memory, then rewrites wrong notes, merges duplicates, adds links and trims what gets loaded into every session. In the Pokémon run, dreaming checked a note against the transcript, caught its error and rewrote it. With that fix the agent reached Cerulean City at action 1,935, which it never reached without the correction.

## Why it matters

On CL-Bench, memory raised every recent Claude model, for example Opus 4.7 from 0.383 to 0.700 and Sonnet 5 from 0.306 to 0.610. The post gives builders concrete rules: say what memory is for instead of scripting how to use it, keep the always-loaded layer small because a wrong note spreads to every session, and combine a wiki with search. The authors also list open problems, such as compute cost, how often to dream, and notes that go stale.

## Who it's for

developers building long-running AI agents

## Try it

https://platform.claude.com/docs/en/managed-agents/dreams

## Quick facts

- Publisher: Anthropic engineering team
- Author: Lance Martin
- Memory layers: Transcripts, notes, representations, injected context
- Benchmark: Continual Learning Bench (CL-Bench) 1.0
- Opus 5.5 on CL-Bench: 0.655 without memory, 0.838 with
- Wiki test corpus: ~350,000 files, ~420M tokens

## FAQ

### Which Claude models gain the most from memory on CL-Bench?

In Anthropic's agent memory post, older models gained the most on the CL-Bench database task. Claude Opus 4.7 rose from 0.383 to 0.700 and Sonnet 5 from 0.306 to 0.610. Opus 5.5 and Sonnet 5.5 started higher, at 0.655 and 0.644, and reached 0.838 and 0.833 with memory. Sonnet 4.6 barely moved until it got refined instructions, which lifted it to 0.641.

### Is a wiki better than plain search for agent memory?

Anthropic's tests found that a wiki works best together with search. Over a corpus of about 350,000 files, wiki plus search met 61% of graded criteria against 53% for search alone, and saved about 20,000 tokens per question. The wiki helped most on questions that span several documents. On single-document tasks it showed no clear gain over search, and one wiki grew to 1.77 times the size of its source.

### How much memory does Claude Code load at the start of a session?

Anthropic's agent memory post says Claude Code loads only the first 200 lines or 25 KB of its MEMORY.md index file when a session starts. The post explains that this always-loaded layer should stay small. It costs tokens in every session, and a single wrong note placed there spreads into every later session.

### Where can developers try Claude's dreaming feature?

Anthropic's agent memory post points developers to the Claude Managed Agents documentation on dreams and memory. It also links a 'getting started with dreaming' cookbook and a knowledge-wiki quickstart in the anthropics/claude-quickstarts GitHub repository. The post itself does not name a pricing tier for dreaming.

## Links

- [Anthropic Post](https://www.anthropic.com/research/components-of-agent-memory)
- [Dreaming Docs](https://platform.claude.com/docs/en/managed-agents/dreams)
- [Dreaming Cookbook](https://platform.claude.com/cookbook/managed-agents-cma-dreaming-with-a-dynamic-workflow)
- [Knowledge Wiki Code](https://github.com/anthropics/claude-quickstarts/tree/main/managed-agents/knowledge-wiki)
- [Sleep-Time Compute](https://arxiv.org/abs/2504.13171)
