The Claude memory tool, and the consolidation loop that keeps memory clean. One repo, one backend, two layers, and every run makes a real API call.
- The primitive. Declare the GA memory tool (
memory_20250818) and service the commands the model emits (view, create, str_replace, insert, delete, rename) against a real, path-checked local store. - The pattern. A two-day dreaming loop. On day one, task agents write memory as they work. A consolidation pass verifies each claim against the transcripts, drops the unsupported ones, organizes what is left, and cross-links it. Day two runs the same cohort on the consolidated memory and measures the deltas.
Both layers go through the same backend in claude_memory/memory.py.
pip install -r requirements.txt
ANTHROPIC_API_KEY=... python run.py # the dreaming loop
ANTHROPIC_API_KEY=... python run.py memory_tool # the memory tool primitiveEvery run calls the real Anthropic API. Without a key it fails fast with a clear error and a non-zero exit. There is no offline mode.
| Path | What it holds |
|---|---|
claude_memory/memory.py |
the one backend: the path-checked store and the six commands |
claude_memory/tool.py |
the primitive demo: declare the tool, service the commands |
claude_memory/loop.py |
the two-day loop |
claude_memory/dreaming.py |
the consolidation pass (verify, organize, cross-link) |
claude_memory/agents.py |
the task agents that write memory on day one |
evals/eval_dreaming.py |
the gate: day two must beat day one, and the pass must drop at least one unsupported claim |
Anthropic's Dreaming is a research preview, not a public API. This implements the dreaming pattern on GA primitives (the memory tool, context editing, route-by-consequence model selection), so it runs today, and it says so. It claims only what it runs.
MIT. See LICENSE.