Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add commands/cbuntingde/kimi-memory/dreaminggit clone --depth 1 https://github.com/cbuntingde/kimi-memoryWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/commands/cbuntingde/kimi-memory/dreaming)<a href="https://agentmods.dev/commands/cbuntingde/kimi-memory/dreaming"><img src="https://agentmods.dev/badge/commands/cbuntingde/kimi-memory/dreaming.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00110 | $0.01703 |
| Opus 5 | $0.00055 | $0.00851 |
| Sonnet 5 | $0.00022 | $0.00341 |
| Haiku 4.5 | $0.00011 | $0.00170 |
Grade A, and why
dreaming scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 165 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/kimi-memory:dreaming
Configure the dreaming subsystem — the background pass that consolidates memories into conclusions, combines duplicates, and prunes stale rows on a schedule. The user-facing verb covers the three existing internal passes (consolidate + dream + auto-GC) so they share one schedule and one status surface.
Modes
off— never auto-run. Only fires on explicit/dreaming run.auto— the historical behaviour: activity-threshold + 30-minute debounce (env-tunable viaKIMI_MEMORY_DREAM_DEBOUNCE_MS). Switching toautois a no-op upgrade for existing users.on— wall-clock floor regardless of session activity. Default interval24h, overridable via--interval. ASessionStartthat opens after the floor has elapsed runs the pass immediately. There is no background daemon — the plugin never wakes itself up. If the user never opens Kimi, dreaming never runs. That trade-off is intentional.
Usage
/kimi-memory:dreaming on # turn on, default 24h interval
/kimi-memory:dreaming on --interval 3h # 3-hour floor
/kimi-memory:dreaming off # never auto-run
/kimi-memory:dreaming auto # default behaviour (alias for the historical debounce path)
/kimi-memory:dreaming run # one-shot, force a pass now
/kimi-memory:dreaming run --include consolidate,dream
/kimi-memory:dreaming run --exclude gc # skip the prune/archive/tier pass
/kimi-memory:dreaming status # mode + interval + last run + next due
/kimi-memory:dreaming last # last run's saved/merged/pruned counts
Add --scope project|global to on|off|auto|status to write the mode to
the per-project file or to the system-wide default. Per-project wins over
global when both exist.
What this does
One call runs three passes in order, controlled by --include:
- consolidate (
runConsolidate) — clusters memories by embedding cosine + tag overlap, writesconclusionrows, recordssynthesizesedges, and merges tight duplicates. Writes oneconsolidation_runsrow at the end. - dream (
enqueueDreamJob→generateProposalsForJob→applyDreamJob) — durable staged job lifecycle indream_jobs+dream_proposals. One enqueue per call; one apply if a job is ready. Honours the partial unique indexidx_dream_jobs_activeso two concurrent enqueues are safe. - gc (
runAutoGc) — prune dead rows (deleted >30d, superseded >90d, embed-failed >30d, cold low-confidence >365d), archive old audit rows, run L0→L1→L2→L3 tier promotion. Bounded byKIMI_MEMORY_AUTO_GC=off.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 4d ago First seen · 165 lines · 110 tokens per session scan A 8c9b07bece59
dreaming is a command published in the GitHub repository cbuntingde/kimi-memory (0 stars, last pushed today), licensed MIT. It adds 110 tokens to every session and 1,703 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other commands, from other repositories
start
"What accumulated? What's blocking? Where do I begin?".
arrecall
AgentRecall on-demand recall — surface past fixes, decisions, and patterns mid-session without leaving your flow.
prune
Delete pending instincts older than 30 days that were never promoted.
context-stats
Display context window usage and token statistics.
capturar
Capturar ideas y notas sin interrumpir el flujo de trabajo. Usa cuando el usuario dice "capturar idea", "quick note", "nota rápida", "grab this", "take a note", "guardar idea", "note to self", "capture thought", "I should remember", "guardar esto". Guarda en memoria persistente sin romper el contexto actual.
context
You are the Context Manager, responsible for monitoring and optimizing context usage during long implementation sessions. You help prevent context overflow and maintain efficiency.