Dream State

Memory consolidation
that runs while you sleep.

Dream State is an async background process that enriches, links, deduplicates, and prunes your agent's memories. Think of it as offline maintenance for long-term recall.

What Dream State does

Four capabilities that keep your agent's memory healthy.

Enrichment

Adds missing metadata, improves summaries, and classifies memories by type and topic.

Linking

Discovers relationships between memories and creates typed edges (DERIVED_FROM, DEPENDS_ON, REFERENCED).

Deduplication

Identifies duplicate or near-duplicate memories and merges them into clean revisions.

Pruning

Deprecates stale or low-value memories. Published items are never auto-deprecated — safety guards protect important data.

How it works

Three phases, all non-destructive.

1

Event collection

Working memory accumulates throughout the day as your agent handles conversations, decisions, and tool executions.

2

AI analysis

Dream State reviews accumulated memories, identifies patterns, discovers relationships, and flags stale data.

3

Safe migrations

Changes are applied as new revisions — nothing is overwritten. Circuit breaker caps bulk deprecation at 50% per run.

How to trigger Dream State

Manual trigger
kumiho_memory_dream_state(
  project="my-project",
  dry_run=False
)
Preview mode
# See what would change without applying
kumiho_memory_dream_state(
  project="my-project",
  dry_run=True
)

Always run with dry_run=True first to preview changes before applying.

Let your agent sleep on it.

Dream State consolidation turns raw conversations into structured, linked, and clean long-term memory.

Dream State — Memory Consolidation Guide | Kumiho