chore(sync): mirror docs from openclaw/openclaw@a1c1598742
This commit is contained in:
parent
7d64ebe278
commit
7d0bb5da8a
@ -1,5 +1,5 @@
|
||||
{
|
||||
"repository": "openclaw/openclaw",
|
||||
"sha": "7fe5dc36f0e13d777d6b8a0adf1d23c40d5ba484",
|
||||
"syncedAt": "2026-04-05T17:42:31.750Z"
|
||||
"sha": "a1c159874204d23c97184866398b6b1d08a3f880",
|
||||
"syncedAt": "2026-04-05T17:42:45.398Z"
|
||||
}
|
||||
|
||||
@ -80,7 +80,7 @@ Full options:
|
||||
|
||||
- Ranks short-term candidates from `memory/YYYY-MM-DD.md` using weighted recall signals (`frequency`, `relevance`, `query diversity`, `recency`).
|
||||
- Uses recall events captured when `memory_search` returns daily-memory hits.
|
||||
- Optional auto-dreaming mode: when `plugins.entries.memory-core.config.dreaming.mode` is `core`, `deep`, or `rem`, `memory-core` auto-manages a cron job that triggers promotion in the background (no manual `openclaw cron add` required).
|
||||
- When dreaming is enabled, `memory-core` auto-manages a cron job for the deep phase that triggers promotion in the background (no manual `openclaw cron add` required).
|
||||
- `--agent <id>`: scope to a single agent (default: the default agent).
|
||||
- `--limit <n>`: max candidates to return/apply.
|
||||
- `--min-score <n>`: minimum weighted promotion score.
|
||||
@ -92,24 +92,24 @@ Full options:
|
||||
|
||||
## Dreaming (experimental)
|
||||
|
||||
Dreaming is the overnight reflection pass for memory. It is called "dreaming" because the system revisits what was recalled during the day and decides what is worth keeping long-term.
|
||||
Dreaming is the background memory consolidation system with three cooperative
|
||||
phases: **light** (organize into daily note), **deep** (promote into
|
||||
`MEMORY.md`), and **REM** (reflect and find patterns in the daily note).
|
||||
|
||||
- It is opt-in and disabled by default.
|
||||
- Enable it with `plugins.entries.memory-core.config.dreaming.mode`.
|
||||
- You can toggle modes from chat with `/dreaming off|core|rem|deep`. Run `/dreaming` (or `/dreaming options`) to see what each mode does.
|
||||
- When enabled, `memory-core` automatically creates and maintains a managed cron job.
|
||||
- Set `dreaming.limit` to `0` if you want dreaming enabled but automatic promotion effectively paused.
|
||||
- Enable with `plugins.entries.memory-core.config.dreaming.enabled: true`.
|
||||
- Toggle from chat with `/dreaming on|off` or `/dreaming enable|disable light|deep|rem`.
|
||||
- Each phase runs on its own cron schedule, managed automatically by `memory-core`.
|
||||
- Only the deep phase writes to `MEMORY.md`. Light and REM write to the daily note only.
|
||||
- Ranking uses weighted signals: recall frequency, retrieval relevance, query diversity, temporal recency, cross-day consolidation, and derived concept richness.
|
||||
- Promotion into `MEMORY.md` only happens when quality thresholds are met, so long-term memory stays high signal instead of collecting one-off details.
|
||||
- Automatic runs fan out across configured memory workspaces, so one agent's sessions consolidate into that agent's memory workspace instead of only the default session.
|
||||
- Promotion re-reads the live daily note before writing to `MEMORY.md`, so edited or deleted short-term snippets do not get promoted from stale recall-store snapshots.
|
||||
- Scheduled and manual `memory promote` runs share the same dreaming defaults unless you pass CLI threshold overrides.
|
||||
- Scheduled and manual `memory promote` runs share the same deep phase defaults unless you pass CLI threshold overrides.
|
||||
- Automatic runs fan out across configured memory workspaces.
|
||||
|
||||
Default mode presets:
|
||||
Default phase schedules:
|
||||
|
||||
- `core`: daily at `0 3 * * *`, `minScore=0.75`, `minRecallCount=3`, `minUniqueQueries=2`, `recencyHalfLifeDays=14`
|
||||
- `deep`: every 12 hours (`0 */12 * * *`), `minScore=0.8`, `minRecallCount=3`, `minUniqueQueries=3`, `recencyHalfLifeDays=14`
|
||||
- `rem`: every 6 hours (`0 */6 * * *`), `minScore=0.85`, `minRecallCount=4`, `minUniqueQueries=3`, `recencyHalfLifeDays=14`
|
||||
- **Light**: every 6 hours (`0 */6 * * *`), `lookbackDays=2`, `limit=100`
|
||||
- **Deep**: daily at 3 AM (`0 3 * * *`), `limit=10`, `minScore=0.8`, `minRecallCount=3`, `minUniqueQueries=3`, `recencyHalfLifeDays=14`
|
||||
- **REM**: weekly, Sunday 5 AM (`0 5 * * 0`), `lookbackDays=7`, `limit=10`
|
||||
|
||||
Example:
|
||||
|
||||
@ -120,7 +120,7 @@ Example:
|
||||
"memory-core": {
|
||||
"config": {
|
||||
"dreaming": {
|
||||
"mode": "core"
|
||||
"enabled": true
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -135,5 +135,6 @@ Notes:
|
||||
- `memory status` includes any extra paths configured via `memorySearch.extraPaths`.
|
||||
- If effectively active memory remote API key fields are configured as SecretRefs, the command resolves those values from the active gateway snapshot. If gateway is unavailable, the command fails fast.
|
||||
- Gateway version skew note: this command path requires a gateway that supports `secrets.resolve`; older gateways return an unknown-method error.
|
||||
- Dreaming cadence defaults to each mode's preset schedule. Override cadence with `plugins.entries.memory-core.config.dreaming.cron` as a cron expression (for example `0 3 * * *`) and fine-tune with `timezone`, `limit`, `minScore`, `minRecallCount`, `minUniqueQueries`, `recencyHalfLifeDays`, and `maxAgeDays`.
|
||||
- Override each phase schedule with `phases.<phase>.cron` and fine-tune deep promotion with `phases.deep.minScore`, `phases.deep.minRecallCount`, `phases.deep.minUniqueQueries`, `phases.deep.recencyHalfLifeDays`, and `phases.deep.maxAgeDays`.
|
||||
- Set `plugins.entries.memory-core.config.dreaming.verboseLogging` to `true` to emit per-run candidate and apply details into the normal gateway logs while tuning the feature.
|
||||
- See [Dreaming](/concepts/dreaming) for full phase descriptions and configuration reference.
|
||||
|
||||
@ -1,45 +1,184 @@
|
||||
---
|
||||
title: "Dreaming (experimental)"
|
||||
summary: "Background promotion from short-term recall into long-term memory"
|
||||
summary: "Background memory consolidation with three cooperative phases: light, deep, and REM"
|
||||
read_when:
|
||||
- You want memory promotion to run automatically
|
||||
- You want to understand dreaming modes and thresholds
|
||||
- You want to understand the three dreaming phases
|
||||
- You want to tune consolidation without polluting MEMORY.md
|
||||
---
|
||||
|
||||
# Dreaming (experimental)
|
||||
|
||||
Dreaming is the background memory consolidation pass in `memory-core`.
|
||||
Dreaming is the background memory consolidation system in `memory-core`. It
|
||||
revisits what came up during conversations and decides what is worth keeping as
|
||||
durable context.
|
||||
|
||||
It is called "dreaming" because the system revisits what came up during the day
|
||||
and decides what is worth keeping as durable context.
|
||||
Dreaming uses three cooperative **phases**, not competing modes. Each phase has
|
||||
a distinct job, writes to a distinct target, and runs on its own schedule.
|
||||
|
||||
Dreaming is **experimental**, **opt-in**, and **off by default**.
|
||||
## The three phases
|
||||
|
||||
## What dreaming does
|
||||
### Light
|
||||
|
||||
1. Tracks short-term recall events from `memory_search` hits in
|
||||
`memory/YYYY-MM-DD.md`.
|
||||
2. Scores those recall candidates with weighted signals.
|
||||
3. Promotes only qualified candidates into `MEMORY.md`.
|
||||
Light dreaming sorts the recent mess. It scans recent memory traces, dedupes
|
||||
them by Jaccard similarity, clusters related entries, and stages candidate
|
||||
memories into the daily memory note (`memory/YYYY-MM-DD.md`).
|
||||
|
||||
This keeps long-term memory focused on durable, repeated context instead of
|
||||
one-off details.
|
||||
Light does **not** write anything into `MEMORY.md`. It only organizes and
|
||||
stages. Think: "what from today might matter later?"
|
||||
|
||||
## Promotion signals
|
||||
### Deep
|
||||
|
||||
Dreaming combines six signals:
|
||||
Deep dreaming decides what becomes durable memory. It runs the real promotion
|
||||
logic: weighted scoring across six signals, threshold gates, recall count,
|
||||
unique query diversity, recency decay, and max age filtering.
|
||||
|
||||
- **Frequency**: how often the same candidate was recalled.
|
||||
- **Relevance**: how strong recall scores were when it was retrieved.
|
||||
- **Query diversity**: how many distinct query intents surfaced it.
|
||||
- **Recency**: temporal weighting over recent recalls.
|
||||
- **Consolidation**: whether recalls repeated across distinct days instead of one burst.
|
||||
- **Conceptual richness**: derived concept tags from the note path and snippet text.
|
||||
Deep is the **only** phase allowed to write durable facts into `MEMORY.md`.
|
||||
It also owns recovery when memory is thin (health drops below a configured
|
||||
threshold). Think: "what is true enough to keep?"
|
||||
|
||||
Promotion requires all configured threshold gates to pass, not just one signal.
|
||||
### REM
|
||||
|
||||
### Signal weights
|
||||
REM dreaming looks for patterns and reflection. It examines recent material,
|
||||
identifies recurring themes through concept tag clustering, and writes
|
||||
higher-order notes and reflections into the daily note.
|
||||
|
||||
REM writes to the daily note (`memory/YYYY-MM-DD.md`), **not** `MEMORY.md`.
|
||||
Its output is interpretive, not canonical. Think: "what pattern am I noticing?"
|
||||
|
||||
## Hard boundaries
|
||||
|
||||
| Phase | Job | Writes to | Does NOT write to |
|
||||
| ----- | --------- | -------------------------- | ----------------- |
|
||||
| Light | Organize | Daily note (YYYY-MM-DD.md) | MEMORY.md |
|
||||
| Deep | Preserve | MEMORY.md | -- |
|
||||
| REM | Interpret | Daily note (YYYY-MM-DD.md) | MEMORY.md |
|
||||
|
||||
## Quick start
|
||||
|
||||
Enable all three phases (recommended):
|
||||
|
||||
```json
|
||||
{
|
||||
"plugins": {
|
||||
"entries": {
|
||||
"memory-core": {
|
||||
"config": {
|
||||
"dreaming": {
|
||||
"enabled": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Enable only deep promotion:
|
||||
|
||||
```json
|
||||
{
|
||||
"plugins": {
|
||||
"entries": {
|
||||
"memory-core": {
|
||||
"config": {
|
||||
"dreaming": {
|
||||
"enabled": true,
|
||||
"phases": {
|
||||
"light": { "enabled": false },
|
||||
"deep": { "enabled": true },
|
||||
"rem": { "enabled": false }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Configuration
|
||||
|
||||
All dreaming settings live under `plugins.entries.memory-core.config.dreaming`
|
||||
in `openclaw.json`. See [Memory configuration reference](/reference/memory-config#dreaming-experimental)
|
||||
for the full key list.
|
||||
|
||||
### Global settings
|
||||
|
||||
| Key | Type | Default | Description |
|
||||
| ---------------- | --------- | ---------- | ------------------------------------------------ |
|
||||
| `enabled` | `boolean` | `true` | Master switch for all phases |
|
||||
| `timezone` | `string` | unset | Timezone for schedule evaluation and daily notes |
|
||||
| `verboseLogging` | `boolean` | `false` | Emit detailed per-run dreaming logs |
|
||||
| `storage.mode` | `string` | `"inline"` | `inline`, `separate`, or `both` |
|
||||
|
||||
### Light phase config
|
||||
|
||||
| Key | Type | Default | Description |
|
||||
| ------------------ | ---------- | ------------------------------- | --------------------------------- |
|
||||
| `enabled` | `boolean` | `true` | Enable light phase |
|
||||
| `cron` | `string` | `0 */6 * * *` | Schedule (default: every 6 hours) |
|
||||
| `lookbackDays` | `number` | `2` | How many days of traces to scan |
|
||||
| `limit` | `number` | `100` | Max candidates to stage per run |
|
||||
| `dedupeSimilarity` | `number` | `0.9` | Jaccard threshold for dedup |
|
||||
| `sources` | `string[]` | `["daily","sessions","recall"]` | Data sources to scan |
|
||||
|
||||
### Deep phase config
|
||||
|
||||
| Key | Type | Default | Description |
|
||||
| --------------------- | ---------- | ----------------------------------------------- | ------------------------------------ |
|
||||
| `enabled` | `boolean` | `true` | Enable deep phase |
|
||||
| `cron` | `string` | `0 3 * * *` | Schedule (default: 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 config
|
||||
|
||||
Recovery kicks in when long-term memory health drops below a threshold.
|
||||
|
||||
| Key | Type | Default | Description |
|
||||
| --------------------------------- | --------- | ------- | ------------------------------------------ |
|
||||
| `recovery.enabled` | `boolean` | `true` | Enable automatic recovery |
|
||||
| `recovery.triggerBelowHealth` | `number` | `0.35` | Health score threshold to trigger recovery |
|
||||
| `recovery.lookbackDays` | `number` | `30` | How far back to look for recovery material |
|
||||
| `recovery.maxRecoveredCandidates` | `number` | `20` | Max candidates to recover per run |
|
||||
| `recovery.minRecoveryConfidence` | `number` | `0.9` | Minimum confidence for recovery candidates |
|
||||
| `recovery.autoWriteMinConfidence` | `number` | `0.97` | Auto-write threshold (skip manual review) |
|
||||
|
||||
### REM phase config
|
||||
|
||||
| Key | Type | Default | Description |
|
||||
| -------------------- | ---------- | --------------------------- | --------------------------------------- |
|
||||
| `enabled` | `boolean` | `true` | Enable REM phase |
|
||||
| `cron` | `string` | `0 5 * * 0` | Schedule (default: weekly, Sunday 5 AM) |
|
||||
| `lookbackDays` | `number` | `7` | How many 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 to override global defaults:
|
||||
|
||||
| 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 |
|
||||
|
||||
## Promotion signals (deep phase)
|
||||
|
||||
Deep dreaming combines six weighted signals. Promotion requires all configured
|
||||
threshold gates to pass simultaneously.
|
||||
|
||||
| Signal | Weight | Description |
|
||||
| ------------------- | ------ | -------------------------------------------------- |
|
||||
@ -50,87 +189,20 @@ Promotion requires all configured threshold gates to pass, not just one signal.
|
||||
| Consolidation | 0.10 | Reward recalls repeated across multiple days |
|
||||
| Conceptual richness | 0.06 | Reward entries with richer derived concept tags |
|
||||
|
||||
## How it works
|
||||
|
||||
1. **Recall tracking** -- Every `memory_search` hit is recorded to
|
||||
`memory/.dreams/short-term-recall.json` with recall count, scores, query
|
||||
hash, recall days, and concept tags.
|
||||
2. **Scheduled scoring** -- On the configured cadence, candidates are ranked
|
||||
using weighted signals. All threshold gates must pass simultaneously.
|
||||
3. **Workspace fan-out** -- Each dreaming cycle runs once per configured memory
|
||||
workspace, so one agent's sessions consolidate into that agent's memory
|
||||
workspace.
|
||||
4. **Promotion** -- Before appending anything, dreaming re-reads the current
|
||||
daily note and skips candidates whose source snippet no longer exists.
|
||||
Qualifying live entries are appended to `MEMORY.md` with a promoted
|
||||
timestamp.
|
||||
5. **Cleanup** -- Already-promoted entries are filtered from future cycles. A
|
||||
file lock prevents concurrent runs.
|
||||
|
||||
## Modes
|
||||
|
||||
`dreaming.mode` controls cadence and default thresholds:
|
||||
|
||||
| Mode | Cadence | minScore | minRecallCount | minUniqueQueries | recencyHalfLifeDays |
|
||||
| ------ | -------------- | -------- | -------------- | ---------------- | ------------------- |
|
||||
| `off` | Disabled | -- | -- | -- | -- |
|
||||
| `core` | Daily 3 AM | 0.75 | 3 | 2 | 14 |
|
||||
| `rem` | Every 6 hours | 0.85 | 4 | 3 | 14 |
|
||||
| `deep` | Every 12 hours | 0.80 | 3 | 3 | 14 |
|
||||
|
||||
## Scheduling model
|
||||
|
||||
When dreaming is enabled, `memory-core` manages the recurring schedule
|
||||
automatically. You do not need to manually create a cron job for this feature.
|
||||
|
||||
You can still tune behavior with explicit overrides such as:
|
||||
|
||||
- `dreaming.cron` (cron expression)
|
||||
- `dreaming.timezone`
|
||||
- `dreaming.limit`
|
||||
- `dreaming.minScore`
|
||||
- `dreaming.minRecallCount`
|
||||
- `dreaming.minUniqueQueries`
|
||||
- `dreaming.recencyHalfLifeDays`
|
||||
- `dreaming.maxAgeDays`
|
||||
- `dreaming.verboseLogging`
|
||||
|
||||
## Configure
|
||||
|
||||
```json
|
||||
{
|
||||
"plugins": {
|
||||
"entries": {
|
||||
"memory-core": {
|
||||
"config": {
|
||||
"dreaming": {
|
||||
"mode": "core",
|
||||
"recencyHalfLifeDays": 21,
|
||||
"maxAgeDays": 30
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Chat commands
|
||||
|
||||
Switch modes and check status from chat:
|
||||
|
||||
```
|
||||
/dreaming core # Switch to core mode (nightly)
|
||||
/dreaming rem # Switch to rem mode (every 6h)
|
||||
/dreaming deep # Switch to deep mode (every 12h)
|
||||
/dreaming off # Disable dreaming
|
||||
/dreaming status # Show current config and cadence
|
||||
/dreaming help # Show mode guide
|
||||
/dreaming status # Show phase config and cadence
|
||||
/dreaming on # Enable all phases
|
||||
/dreaming off # Disable all phases
|
||||
/dreaming enable light|deep|rem # Enable a specific phase
|
||||
/dreaming disable light|deep|rem # Disable a specific phase
|
||||
/dreaming help # Show usage guide
|
||||
```
|
||||
|
||||
## CLI commands
|
||||
|
||||
Preview and apply promotions from the command line:
|
||||
Preview and apply deep promotions from the command line:
|
||||
|
||||
```bash
|
||||
# Preview promotion candidates
|
||||
@ -145,15 +217,55 @@ openclaw memory promote --limit 5
|
||||
# Include already-promoted entries
|
||||
openclaw memory promote --include-promoted
|
||||
|
||||
# Manual runs inherit dreaming thresholds unless you override them
|
||||
openclaw memory promote --apply
|
||||
|
||||
# Check dreaming status
|
||||
openclaw memory status --deep
|
||||
```
|
||||
|
||||
See [memory CLI](/cli/memory) for the full flag reference.
|
||||
|
||||
## How it works
|
||||
|
||||
### Light phase pipeline
|
||||
|
||||
1. Read short-term recall entries from `memory/.dreams/short-term-recall.json`.
|
||||
2. Filter entries within `lookbackDays` of the current time.
|
||||
3. Deduplicate by Jaccard similarity (configurable threshold).
|
||||
4. Sort by average recall score, take up to `limit` entries.
|
||||
5. Write staged candidates into the daily note under a `## Light Sleep` block.
|
||||
|
||||
### Deep phase pipeline
|
||||
|
||||
1. Read and rank short-term recall candidates using weighted signals.
|
||||
2. Apply threshold gates: `minScore`, `minRecallCount`, `minUniqueQueries`.
|
||||
3. Filter by `maxAgeDays` and apply recency decay.
|
||||
4. Fan out across configured memory workspaces.
|
||||
5. Re-read the live daily note before writing (skip stale or deleted snippets).
|
||||
6. Append qualifying entries to `MEMORY.md` with promoted timestamps.
|
||||
7. Mark promoted entries to exclude them from future cycles.
|
||||
8. If health is below `recovery.triggerBelowHealth`, run the recovery pass.
|
||||
|
||||
### REM phase pipeline
|
||||
|
||||
1. Read recent memory traces within `lookbackDays`.
|
||||
2. Cluster concept tags by co-occurrence.
|
||||
3. Filter patterns by `minPatternStrength`.
|
||||
4. Write themes and reflections into the daily note under a `## REM Sleep` block.
|
||||
|
||||
## Scheduling
|
||||
|
||||
Each phase manages its own cron job automatically. When dreaming is enabled,
|
||||
`memory-core` reconciles managed cron jobs on gateway startup. You do not need
|
||||
to manually create cron entries.
|
||||
|
||||
| Phase | Default schedule | Description |
|
||||
| ----- | ---------------- | ------------------- |
|
||||
| Light | `0 */6 * * *` | Every 6 hours |
|
||||
| Deep | `0 3 * * *` | Daily at 3 AM |
|
||||
| REM | `0 5 * * 0` | Weekly, Sunday 5 AM |
|
||||
|
||||
Override any schedule with the phase `cron` key. All schedules honor the global
|
||||
`timezone` setting.
|
||||
|
||||
## Dreams UI
|
||||
|
||||
When dreaming is enabled, the Gateway sidebar shows a **Dreams** tab with
|
||||
@ -161,13 +273,13 @@ memory stats (short-term count, long-term count, promoted count) and the next
|
||||
scheduled cycle time. Daily counters honor `dreaming.timezone` when set and
|
||||
otherwise fall back to the configured user timezone.
|
||||
|
||||
Manual `openclaw memory promote` runs use the same dreaming thresholds by
|
||||
Manual `openclaw memory promote` runs use the same deep phase thresholds by
|
||||
default, so scheduled and on-demand promotion stay aligned unless you pass CLI
|
||||
overrides.
|
||||
|
||||
## Further reading
|
||||
## Related
|
||||
|
||||
- [Memory](/concepts/memory)
|
||||
- [Memory Search](/concepts/memory-search)
|
||||
- [memory CLI](/cli/memory)
|
||||
- [Memory configuration reference](/reference/memory-config)
|
||||
- [memory CLI](/cli/memory)
|
||||
|
||||
@ -376,30 +376,90 @@ 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`. For conceptual details and chat
|
||||
commands, see [Dreaming](/concepts/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).
|
||||
|
||||
| Key | Type | Default | Description |
|
||||
| --------------------- | --------- | -------------- | ----------------------------------------- |
|
||||
| `mode` | `string` | `"off"` | Preset: `off`, `core`, `rem`, or `deep` |
|
||||
| `cron` | `string` | preset default | Cron expression override for the schedule |
|
||||
| `timezone` | `string` | user timezone | Timezone for schedule evaluation |
|
||||
| `limit` | `number` | preset default | Max candidates to promote per cycle |
|
||||
| `minScore` | `number` | preset default | Minimum weighted score for promotion |
|
||||
| `minRecallCount` | `number` | preset default | Minimum recall count threshold |
|
||||
| `minUniqueQueries` | `number` | preset default | Minimum distinct query count threshold |
|
||||
| `recencyHalfLifeDays` | `number` | `14` | Days for recency score to decay by half |
|
||||
| `maxAgeDays` | `number` | unset | Optional max daily-note age for promotion |
|
||||
| `verboseLogging` | `boolean` | `false` | Emit detailed per-run dreaming logs |
|
||||
### Global settings
|
||||
|
||||
### Preset defaults
|
||||
| Key | Type | Default | Description |
|
||||
| ------------------------- | --------- | ---------- | ------------------------------------------------ |
|
||||
| `enabled` | `boolean` | `true` | Master switch for all phases |
|
||||
| `timezone` | `string` | unset | Timezone for schedule evaluation and daily notes |
|
||||
| `verboseLogging` | `boolean` | `false` | Emit detailed per-run dreaming logs |
|
||||
| `storage.mode` | `string` | `"inline"` | `inline`, `separate`, or `both` |
|
||||
| `storage.separateReports` | `boolean` | `false` | Write separate report files per phase |
|
||||
|
||||
| Mode | Cadence | minScore | minRecallCount | minUniqueQueries | recencyHalfLifeDays |
|
||||
| ------ | -------------- | -------- | -------------- | ---------------- | ------------------- |
|
||||
| `off` | Disabled | -- | -- | -- | -- |
|
||||
| `core` | Daily 3 AM | 0.75 | 3 | 2 | 14 |
|
||||
| `rem` | Every 6 hours | 0.85 | 4 | 3 | 14 |
|
||||
| `deep` | Every 12 hours | 0.80 | 3 | 3 | 14 |
|
||||
### Light phase (`phases.light`)
|
||||
|
||||
Scans recent traces, dedupes, and stages candidates into the daily note.
|
||||
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 the daily note.
|
||||
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 |
|
||||
|
||||
### Example
|
||||
|
||||
@ -410,8 +470,13 @@ commands, see [Dreaming](/concepts/dreaming).
|
||||
"memory-core": {
|
||||
config: {
|
||||
dreaming: {
|
||||
mode: "core",
|
||||
enabled: true,
|
||||
timezone: "America/New_York",
|
||||
phases: {
|
||||
light: { cron: "0 */4 * * *", lookbackDays: 3 },
|
||||
deep: { minScore: 0.85, recencyHalfLifeDays: 21 },
|
||||
rem: { lookbackDays: 14 },
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
@ -122,7 +122,7 @@ Text + native (when enabled):
|
||||
- `/model <name>` (alias: `/models`; or `/<alias>` from `agents.defaults.models.*.alias`)
|
||||
- `/queue <mode>` (plus options like `debounce:2s cap:25 drop:summarize`; send `/queue` to see current settings)
|
||||
- `/bash <command>` (host-only; alias for `! <command>`; requires `commands.bash: true` + `tools.elevated` allowlists)
|
||||
- `/dreaming [off|core|rem|deep|status|help]` (toggle dreaming mode or show status; see [Dreaming](/concepts/dreaming))
|
||||
- `/dreaming [on|off|status|help]` or `/dreaming [enable|disable] [light|deep|rem]` (toggle dreaming phases or show status; see [Dreaming](/concepts/dreaming))
|
||||
|
||||
Text-only:
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user