mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-04 20:30:23 +00:00
Dreaming: simplify sweep flow and add diary surface
This commit is contained in:
@@ -376,92 +376,19 @@ Default is DM-only. `match.keyPrefix` matches the normalized session key;
|
||||
## Dreaming (experimental)
|
||||
|
||||
Dreaming is configured under `plugins.entries.memory-core.config.dreaming`,
|
||||
not under `agents.defaults.memorySearch`. Dreaming uses three cooperative
|
||||
phases (light, deep, REM), each with its own schedule and config. For
|
||||
conceptual details and chat commands, see [Dreaming](/concepts/dreaming).
|
||||
not under `agents.defaults.memorySearch`.
|
||||
|
||||
### Global settings
|
||||
Dreaming runs as one scheduled sweep and uses internal light/deep/REM phases as
|
||||
an implementation detail.
|
||||
|
||||
| Key | Type | Default | Description |
|
||||
| ------------------------- | --------- | ---------- | ------------------------------------------------------------ |
|
||||
| `enabled` | `boolean` | `true` | Master switch for all phases |
|
||||
| `timezone` | `string` | unset | Timezone for schedule evaluation and dreaming date bucketing |
|
||||
| `verboseLogging` | `boolean` | `false` | Emit detailed per-run dreaming logs |
|
||||
| `storage.mode` | `string` | `"inline"` | Inline `DREAMS.md`, separate reports, or both |
|
||||
| `storage.separateReports` | `boolean` | `false` | Write separate report files per phase |
|
||||
For conceptual behavior and slash commands, see [Dreaming](/concepts/dreaming).
|
||||
|
||||
### Light phase (`phases.light`)
|
||||
### User settings
|
||||
|
||||
Scans recent traces, dedupes, and stages candidates into `DREAMS.md` when
|
||||
inline storage is enabled.
|
||||
Does **not** write to `MEMORY.md`.
|
||||
|
||||
| Key | Type | Default | Description |
|
||||
| ------------------ | ---------- | ------------------------------- | --------------------------- |
|
||||
| `enabled` | `boolean` | `true` | Enable light phase |
|
||||
| `cron` | `string` | `0 */6 * * *` | Schedule (every 6 hours) |
|
||||
| `lookbackDays` | `number` | `2` | Days of traces to scan |
|
||||
| `limit` | `number` | `100` | Max candidates to stage |
|
||||
| `dedupeSimilarity` | `number` | `0.9` | Jaccard threshold for dedup |
|
||||
| `sources` | `string[]` | `["daily","sessions","recall"]` | Data sources |
|
||||
|
||||
### Deep phase (`phases.deep`)
|
||||
|
||||
Promotes qualified candidates into `MEMORY.md`. The **only** phase that
|
||||
writes durable facts. Also owns recovery when memory is thin.
|
||||
|
||||
| Key | Type | Default | Description |
|
||||
| --------------------- | ---------- | ----------------------------------------------- | ------------------------------------ |
|
||||
| `enabled` | `boolean` | `true` | Enable deep phase |
|
||||
| `cron` | `string` | `0 3 * * *` | Schedule (daily at 3 AM) |
|
||||
| `limit` | `number` | `10` | Max candidates to promote per cycle |
|
||||
| `minScore` | `number` | `0.8` | Minimum weighted score for promotion |
|
||||
| `minRecallCount` | `number` | `3` | Minimum recall count threshold |
|
||||
| `minUniqueQueries` | `number` | `3` | Minimum distinct query count |
|
||||
| `recencyHalfLifeDays` | `number` | `14` | Days for recency score to halve |
|
||||
| `maxAgeDays` | `number` | `30` | Max daily-note age for promotion |
|
||||
| `sources` | `string[]` | `["daily","memory","sessions","logs","recall"]` | Data sources |
|
||||
|
||||
#### Deep recovery (`phases.deep.recovery`)
|
||||
|
||||
| Key | Type | Default | Description |
|
||||
| ------------------------ | --------- | ------- | ------------------------------------------ |
|
||||
| `enabled` | `boolean` | `true` | Enable automatic recovery |
|
||||
| `triggerBelowHealth` | `number` | `0.35` | Health score threshold to trigger recovery |
|
||||
| `lookbackDays` | `number` | `30` | How far back to look for recovery material |
|
||||
| `maxRecoveredCandidates` | `number` | `20` | Max candidates to recover per run |
|
||||
| `minRecoveryConfidence` | `number` | `0.9` | Minimum confidence for recovery candidates |
|
||||
| `autoWriteMinConfidence` | `number` | `0.97` | Auto-write threshold (skip manual review) |
|
||||
|
||||
### REM phase (`phases.rem`)
|
||||
|
||||
Writes themes, reflections, and pattern notes into `DREAMS.md` when inline
|
||||
storage is enabled.
|
||||
Does **not** write to `MEMORY.md`.
|
||||
|
||||
| Key | Type | Default | Description |
|
||||
| -------------------- | ---------- | --------------------------- | ---------------------------------- |
|
||||
| `enabled` | `boolean` | `true` | Enable REM phase |
|
||||
| `cron` | `string` | `0 5 * * 0` | Schedule (weekly, Sunday 5 AM) |
|
||||
| `lookbackDays` | `number` | `7` | Days of material to reflect on |
|
||||
| `limit` | `number` | `10` | Max patterns or themes to write |
|
||||
| `minPatternStrength` | `number` | `0.75` | Minimum tag co-occurrence strength |
|
||||
| `sources` | `string[]` | `["memory","daily","deep"]` | Data sources for reflection |
|
||||
|
||||
### Execution overrides
|
||||
|
||||
Each phase accepts an `execution` block. There is also a global
|
||||
`execution.defaults` block that phases inherit from.
|
||||
|
||||
| Key | Type | Default | Description |
|
||||
| ----------------- | -------- | ------------ | ------------------------------ |
|
||||
| `speed` | `string` | `"balanced"` | `fast`, `balanced`, or `slow` |
|
||||
| `thinking` | `string` | `"medium"` | `low`, `medium`, or `high` |
|
||||
| `budget` | `string` | `"medium"` | `cheap`, `medium`, `expensive` |
|
||||
| `model` | `string` | unset | Override model for this phase |
|
||||
| `maxOutputTokens` | `number` | unset | Cap output tokens |
|
||||
| `temperature` | `number` | unset | Sampling temperature (0-2) |
|
||||
| `timeoutMs` | `number` | unset | Phase timeout in milliseconds |
|
||||
| Key | Type | Default | Description |
|
||||
| ----------- | --------- | ----------- | ------------------------------------------------- |
|
||||
| `enabled` | `boolean` | `false` | Enable or disable dreaming entirely |
|
||||
| `frequency` | `string` | `0 3 * * *` | Optional cron cadence for the full dreaming sweep |
|
||||
|
||||
### Example
|
||||
|
||||
@@ -473,12 +400,7 @@ Each phase accepts an `execution` block. There is also a global
|
||||
config: {
|
||||
dreaming: {
|
||||
enabled: true,
|
||||
timezone: "America/New_York",
|
||||
phases: {
|
||||
light: { cron: "0 */4 * * *", lookbackDays: 3 },
|
||||
deep: { minScore: 0.85, recencyHalfLifeDays: 21 },
|
||||
rem: { lookbackDays: 14 },
|
||||
},
|
||||
frequency: "0 3 * * *",
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -486,3 +408,9 @@ Each phase accepts an `execution` block. There is also a global
|
||||
},
|
||||
}
|
||||
```
|
||||
|
||||
Notes:
|
||||
|
||||
- Dreaming writes machine state to `memory/.dreams/`.
|
||||
- Dreaming writes human-readable narrative output to `DREAMS.md` (or existing `dreams.md`).
|
||||
- The light/deep/REM phase policy and thresholds are internal behavior, not user-facing config.
|
||||
|
||||
Reference in New Issue
Block a user