
























@@ -1,17 +1,18 @@
11---
22summary: "Background memory consolidation with light, deep, and REM phases plus a Dream Diary"
33title: "Dreaming"
4+sidebarTitle: "Dreaming"
45read_when:
56 - You want memory promotion to run automatically
67 - You want to understand what each dreaming phase does
78 - You want to tune consolidation without polluting MEMORY.md
89---
91010-Dreaming is the background memory consolidation system in `memory-core`.
11-It helps OpenClaw move strong short-term signals into durable memory while
12-keeping the process explainable and reviewable.
11+Dreaming is the background memory consolidation system in `memory-core`. It helps OpenClaw move strong short-term signals into durable memory while keeping the process explainable and reviewable.
131213+<Note>
1414Dreaming is **opt-in** and disabled by default.
15+</Note>
15161617## What dreaming writes
1718@@ -32,69 +33,63 @@ Dreaming uses three cooperative phases:
3233| Deep | Score and promote durable candidates | Yes (`MEMORY.md`) |
3334| REM | Reflect on themes and recurring ideas | No |
343535-These phases are internal implementation details, not separate user-configured
36-"modes."
36+These phases are internal implementation details, not separate user-configured "modes."
373738-### Light phase
38+<AccordionGroup>
39+<Accordion title="Light phase">
40+Light phase ingests recent daily memory signals and recall traces, dedupes them, and stages candidate lines.
394140-Light phase ingests recent daily memory signals and recall traces, dedupes them,
41-and stages candidate lines.
42+- Reads from short-term recall state, recent daily memory files, and redacted session transcripts when available.
43+- Writes a managed `## Light Sleep` block when storage includes inline output.
44+- Records reinforcement signals for later deep ranking.
45+- Never writes to `MEMORY.md`.
424643-- Reads from short-term recall state, recent daily memory files, and redacted session transcripts when available.
44-- Writes a managed `## Light Sleep` block when storage includes inline output.
45-- Records reinforcement signals for later deep ranking.
46-- Never writes to `MEMORY.md`.
47+</Accordion>
48+<Accordion title="Deep phase">
49+Deep phase decides what becomes long-term memory.
475048-### Deep phase
51+- Ranks candidates using weighted scoring and threshold gates.
52+- Requires `minScore`, `minRecallCount`, and `minUniqueQueries` to pass.
53+- Rehydrates snippets from live daily files before writing, so stale/deleted snippets are skipped.
54+- Appends promoted entries to `MEMORY.md`.
55+- Writes a `## Deep Sleep` summary into `DREAMS.md` and optionally writes `memory/dreaming/deep/YYYY-MM-DD.md`.
495650-Deep phase decides what becomes long-term memory.
57+</Accordion>
58+<Accordion title="REM phase">
59+REM phase extracts patterns and reflective signals.
516052-- Ranks candidates using weighted scoring and threshold gates.
53-- Requires `minScore`, `minRecallCount`, and `minUniqueQueries` to pass.
54-- Rehydrates snippets from live daily files before writing, so stale/deleted snippets are skipped.
55-- Appends promoted entries to `MEMORY.md`.
56-- Writes a `## Deep Sleep` summary into `DREAMS.md` and optionally writes `memory/dreaming/deep/YYYY-MM-DD.md`.
61+- Builds theme and reflection summaries from recent short-term traces.
62+- Writes a managed `## REM Sleep` block when storage includes inline output.
63+- Records REM reinforcement signals used by deep ranking.
64+- Never writes to `MEMORY.md`.
576558-### REM phase
59-60-REM phase extracts patterns and reflective signals.
61-62-- Builds theme and reflection summaries from recent short-term traces.
63-- Writes a managed `## REM Sleep` block when storage includes inline output.
64-- Records REM reinforcement signals used by deep ranking.
65-- Never writes to `MEMORY.md`.
66+</Accordion>
67+</AccordionGroup>
66686769## Session transcript ingestion
687069-Dreaming can ingest redacted session transcripts into the dreaming corpus. When
70-transcripts are available, they are fed into the light phase alongside daily
71-memory signals and recall traces. Personal and sensitive content is redacted
72-before ingestion.
71+Dreaming can ingest redacted session transcripts into the dreaming corpus. When transcripts are available, they are fed into the light phase alongside daily memory signals and recall traces. Personal and sensitive content is redacted before ingestion.
73727473## Dream Diary
757476-Dreaming also keeps a narrative **Dream Diary** in `DREAMS.md`.
77-After each phase has enough material, `memory-core` runs a best-effort background
78-subagent turn (using the default runtime model) and appends a short diary entry.
75+Dreaming also keeps a narrative **Dream Diary** in `DREAMS.md`. After each phase has enough material, `memory-core` runs a best-effort background subagent turn (using the default runtime model) and appends a short diary entry.
797680-This diary is for human reading in the Dreams UI, not a promotion source.
81-Dreaming-generated diary/report artifacts are excluded from short-term
82-promotion. Only grounded memory snippets are eligible to promote into
83-`MEMORY.md`.
77+<Note>
78+This diary is for human reading in the Dreams UI, not a promotion source. Dreaming-generated diary/report artifacts are excluded from short-term promotion. Only grounded memory snippets are eligible to promote into `MEMORY.md`.
79+</Note>
84808581There is also a grounded historical backfill lane for review and recovery work:
868287-- `memory rem-harness --path ... --grounded` previews grounded diary output from historical `YYYY-MM-DD.md` notes.
88-- `memory rem-backfill --path ...` writes reversible grounded diary entries into `DREAMS.md`.
89-- `memory rem-backfill --path ... --stage-short-term` stages grounded durable candidates into the same short-term evidence store the normal deep phase already uses.
90-- `memory rem-backfill --rollback` and `--rollback-short-term` remove those staged backfill artifacts without touching ordinary diary entries or live short-term recall.
83+<AccordionGroup>
84+<Accordion title="Backfill commands">
85+- `memory rem-harness --path ... --grounded` previews grounded diary output from historical `YYYY-MM-DD.md` notes.
86+- `memory rem-backfill --path ...` writes reversible grounded diary entries into `DREAMS.md`.
87+- `memory rem-backfill --path ... --stage-short-term` stages grounded durable candidates into the same short-term evidence store the normal deep phase already uses.
88+- `memory rem-backfill --rollback` and `--rollback-short-term` remove those staged backfill artifacts without touching ordinary diary entries or live short-term recall.
89+</Accordion>
90+</AccordionGroup>
919192-The Control UI exposes the same diary backfill/reset flow so you can inspect
93-results in the Dreams scene before deciding whether the grounded candidates
94-deserve promotion. The Scene also shows a distinct grounded lane so you can see
95-which staged short-term entries came from historical replay, which promoted
96-items were grounded-led, and clear only grounded-only staged entries without
97-touching ordinary live short-term state.
92+The Control UI exposes the same diary backfill/reset flow so you can inspect results in the Dreams scene before deciding whether the grounded candidates deserve promotion. The Scene also shows a distinct grounded lane so you can see which staged short-term entries came from historical replay, which promoted items were grounded-led, and clear only grounded-only staged entries without touching ordinary live short-term state.
98939994## Deep ranking signals
10095@@ -109,13 +104,11 @@ Deep ranking uses six weighted base signals plus phase reinforcement:
109104| Consolidation | 0.10 | Multi-day recurrence strength |
110105| Conceptual richness | 0.06 | Concept-tag density from snippet/path |
111106112-Light and REM phase hits add a small recency-decayed boost from
113-`memory/.dreams/phase-signals.json`.
107+Light and REM phase hits add a small recency-decayed boost from `memory/.dreams/phase-signals.json`.
114108115109## Scheduling
116110117-When enabled, `memory-core` auto-manages one cron job for a full dreaming
118-sweep. Each sweep runs phases in order: light -> REM -> deep.
111+When enabled, `memory-core` auto-manages one cron job for a full dreaming sweep. Each sweep runs phases in order: light → REM → deep.
119112120113Default cadence behavior:
121114@@ -125,43 +118,44 @@ Default cadence behavior:
125118126119## Quick start
127120128-Enable dreaming:
129-130-```json
131-{
132-"plugins": {
133-"entries": {
134-"memory-core": {
135-"config": {
136-"dreaming": {
137-"enabled": true
121+<Tabs>
122+<Tab title="Enable dreaming">
123+```json
124+{
125+ "plugins": {
126+ "entries": {
127+ "memory-core": {
128+ "config": {
129+ "dreaming": {
130+ "enabled": true
131+ }
132+ }
138133 }
139134 }
140135 }
141136}
142- }
143-}
144-```
145-146-Enable dreaming with a custom sweep cadence:
147-148-```json
149-{
150-"plugins": {
151-"entries": {
152-"memory-core": {
153-"config": {
154-"dreaming": {
155-"enabled": true,
156-"timezone": "America/Los_Angeles",
157-"frequency": "0 */6 * * *"
137+```
138+</Tab>
139+<Tab title="Custom sweep cadence">
140+```json
141+{
142+ "plugins": {
143+ "entries": {
144+ "memory-core": {
145+ "config": {
146+ "dreaming": {
147+ "enabled": true,
148+ "timezone": "America/Los_Angeles",
149+ "frequency": "0 */6 * * *"
150+ }
151+ }
158152 }
159153 }
160154 }
161155}
162-}
163-}
164-```
156+ ```
157+ </Tab>
158+</Tabs>
165159166160## Slash command
167161@@ -174,47 +168,52 @@ Enable dreaming with a custom sweep cadence:
174168175169## CLI workflow
176170177-Use CLI promotion for preview or manual apply:
171+<Tabs>
172+<Tab title="Promotion preview / apply">
173+```bash
174+openclaw memory promote
175+openclaw memory promote --apply
176+openclaw memory promote --limit 5
177+openclaw memory status --deep
178+```
178179179-```bash
180-openclaw memory promote
181-openclaw memory promote --apply
182-openclaw memory promote --limit 5
183-openclaw memory status --deep
184-```
180+Manual `memory promote` uses deep-phase thresholds by default unless overridden with CLI flags.
185181186-Manual `memory promote` uses deep-phase thresholds by default unless overridden
187-with CLI flags.
182+</Tab>
183+<Tab title="Explain promotion">
184+Explain why a specific candidate would or would not promote:
188185189-Explain why a specific candidate would or would not promote:
186+```bash
187+openclaw memory promote-explain "router vlan"
188+openclaw memory promote-explain "router vlan" --json
189+```
190190191-```bash
192-openclaw memory promote-explain "router vlan"
193-openclaw memory promote-explain "router vlan" --json
194-```
191+</Tab>
192+<Tab title="REM harness preview">
193+Preview REM reflections, candidate truths, and deep promotion output without writing anything:
195194196-Preview REM reflections, candidate truths, and deep promotion output without
197-writing anything:
195+```bash
196+openclaw memory rem-harness
197+openclaw memory rem-harness --json
198+```
198199199-```bash
200-openclaw memory rem-harness
201-openclaw memory rem-harness --json
202-```
200+</Tab>
201+</Tabs>
203202204203## Key defaults
205204206205All settings live under `plugins.entries.memory-core.config.dreaming`.
207206208-| Key | Default |
209-| ----------- | ----------- |
210-| `enabled` | `false` |
211-| `frequency` | `0 3 * * *` |
212-213-Phase policy, thresholds, and storage behavior are internal implementation
214-details (not user-facing config).
207+<ParamField path="enabled" type="boolean" default="false">
208+ Enable or disable the dreaming sweep.
209+</ParamField>
210+<ParamField path="frequency" type="string" default="0 3 * * *">
211+ Cron cadence for the full dreaming sweep.
212+</ParamField>
215213216-See [Memory configuration reference](/reference/memory-config#dreaming)
217-for the full key list.
214+<Note>
215+Phase policy, thresholds, and storage behavior are internal implementation details (not user-facing config). See [Memory configuration reference](/reference/memory-config#dreaming) for the full key list.
216+</Note>
218217219218## Dreams UI
220219@@ -230,6 +229,6 @@ When enabled, the Gateway **Dreams** tab shows:
230229## Related
231230232231- [Memory](/concepts/memory)
233-- [Memory Search](/concepts/memory-search)
234-- [memory CLI](/cli/memory)
232+- [Memory CLI](/cli/memory)
235233- [Memory configuration reference](/reference/memory-config)
234+- [Memory search](/concepts/memory-search)
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。