Spokes.wiki Search About
Web API T1 volatile source ↗ source url
Created
Updated

Claude Dreams — memory consolidation as an API

An anthropic research-preview endpoint inside claude-managed-agents that reads an agent's memory store plus its past session transcripts and writes a new, reorganized memory store: duplicates merged, stale or contradicted entries replaced with the current value, new patterns surfaced. Found while ingesting the Managed Agents overview on 2026-08-22 and paged separately because it is the first shipped instance of a mechanism agent-memory had only as theory and roadmap.

Why it exists, in the docs' own words

"Agents write to their memory stores as they work, but these writes are local and incremental: over many sessions a memory store accumulates duplicates, contradictions, and stale entries." That sentence is the failure mode the whole agent-memory layer has been circling. Every pole here appends; none of the self-hosted ones re-reads what it wrote.

Shape

POST /v1/dreams takes two input kinds — one memory_store and 1 to 100 sessions — plus a model and optional instructions (4,096 characters max). It returns a drm_01… resource that runs asynchronously through pending → running → completed | failed | canceled, "typically… minutes to a few hours." Supported models: claude-opus-5, claude-fable-5, claude-opus-4-8, claude-opus-4-7, claude-sonnet-5, claude-sonnet-4-6. Billed at "standard API token rates for the model you select", with usage on the resource; cost "scales roughly linearly with the number and length of input sessions." Gated by its own dreaming-2026-04-21 beta header — managed-agents-2026-04-01 alone does not grant access.

Three design choices carry more weight than the endpoint list:

The input is never modified. The dream clones the store and writes elsewhere, "so you can review the output and discard it if you don't like the result." Consolidation is proposed, not applied. That is the same reversibility instinct seekdb built into storage with copy-on-write FORK/MERGE, arriving here as a workflow property instead — and it is the direct answer to the risk auto-company's single rewritten consensus.md carries, where a bad cycle overwrites the thread of work with no prior version.

The pipeline is itself a session you can watch. Once running, the dream's session_id points at the claude-managed-agents session executing it, and you can stream its events "to observe what the dream is reading and writing in real time." The session is archived rather than deleted at the end, so the transcript survives. Consolidation is not a black box here; it leaves a reviewable trace, which is more than any other entry in this layer offers.

It is synthesis, not editing. The docs are explicit that instructions steer what gets read, merged and dropped, and that "imperative directives that target specific lines… generally produce no change" — targeted fixes go through the Memory Stores API instead. So the boundary between "reorganize my memory" and "edit my memory" is drawn in the product, not left to the model.

Why it matters here

agent-memory had consolidation as a named behaviour with exactly one instance, iai-pme's nightly idle pass, and the cloudflare-agent-memory post described the same idea as a roadmap item — "similar to how the human brain consolidates memories by replaying and strengthening connections during sleep." Anthropic has shipped that as a billable endpoint, and named it after the same metaphor. Two vendors independently reaching for sleep as the model, one of them with an API, moves consolidation from an interesting property of one MIT project to a thing the layer is converging on.

It also sharpens the store-versus-process axis. Dreams is process without a store of its own: it does not hold memory, it operates on memory that something else holds, and its output is an ordinary memory store you attach to a session like any other. That makes consolidation a separable stage rather than a property baked into the storage engine, which is the opposite of how iai-pme does it (consolidation is internal, scheduled, and invisible) and of how cloudflare-agent-memory plans to (background improvement inside the managed service).

What is not published: any measurement that a dreamed store retrieves better than the store it came from. The docs' own advice is "start with a small batch of sessions and scale up once you're satisfied with the curation quality" — which puts evaluation on the customer. That is the same gap cloudflare-agent-memory leaves and that beyond-pass-at-1 says should not be assumed away.

Failure surface, recorded

Named errors include input_memory_store_too_large, memory_store_org_limit_exceeded, timeout, and two that come from mutating inputs mid-run — input_memory_store_unavailable and input_session_unavailable. On failed or canceled the output store persists with partial contents rather than being rolled back, so a half-consolidated store is a state you can reach and have to clean up yourself. Archive is terminal-state-only and, as everywhere else in claude-managed-agents, there is no unarchive.

Re-read 2026-09-22: unchanged. Still a research preview behind dreaming-2026-04-21, same six models, 100 sessions and 4,096-character instructions.

claude-managed-agents · agent-memory · iai-pme · cloudflare-agent-memory · seekdb · beyond-pass-at-1 · auto-company · anthropic · self-improving-agents