Skip to content

Commit 0be7c14

Browse files
committed
docs: update README and CONFIGURATION for ctx_search, ctx_reduce_enabled, and dreamer timer
- README: five tools (was four), ctx_memory is now write/delete only, added ctx_search section, updated cross-session memory search ref, added message_history_fts/index to storage table - CONFIGURATION.md: added ctx_reduce_enabled option to Core table, updated dreamer scheduling to reflect independent 15-minute timer
1 parent 4f49508 commit 0be7c14

2 files changed

Lines changed: 16 additions & 4 deletions

File tree

CONFIGURATION.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ Higher-tier models with longer cache windows benefit from a longer TTL. Setting
3838
| Option | Type | Default | Description |
3939
|--------|------|---------|-------------|
4040
| `enabled` | `boolean` | `false` | Master toggle. |
41+
| `ctx_reduce_enabled` | `boolean` | `true` | When `false`, hides `ctx_reduce` tool, disables all nudges/reminders, and strips reduction guidance from prompts. Heuristic cleanup, compartments, memory, and search still work. Useful for testing whether automatic cleanup alone is sufficient. |
4142
| `cache_ttl` | `string` or `object` | `"5m"` | Time after a response before applying pending ops. String or per-model map. |
4243
| `protected_tags` | `number` (1–20) | `20` | Last N active tags immune from immediate dropping. |
4344
| `nudge_interval_tokens` | `number` | `10000` | Minimum token growth between rolling nudges. |
@@ -141,7 +142,7 @@ Configures the dreamer agent — both the model it uses and the maintenance task
141142

142143
### How scheduling works
143144

144-
The schedule check piggybacks on `message.updated` events with an hourly debounce. When the current time falls inside the configured window:
145+
An independent 15-minute timer checks the schedule regardless of user activity, so overnight dreaming triggers even when the user isn't chatting. When the current time falls inside the configured window:
145146

146147
1. The scheduler scans the memory store for projects with activity since the last dream.
147148
2. Eligible projects are enqueued into a SQLite-backed dream queue.

README.md

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ And overnight, a **dreamer** agent consolidates, verifies, and improves memories
8181

8282
## What Your Agent Gets
8383

84-
Magic Context injects structured context automatically and gives the agent four tools.
84+
Magic Context injects structured context automatically and gives the agent five tools.
8585

8686
### `ctx_reduce` — Shed weight
8787

@@ -120,10 +120,19 @@ Architecture decisions, naming conventions, user preferences — anything that s
120120

121121
```
122122
ctx_memory(action="write", category="ARCHITECTURE_DECISIONS", content="Event sourcing for orders.")
123-
ctx_memory(action="search", query="authentication approach")
124123
ctx_memory(action="delete", id=42)
125124
```
126125

126+
### `ctx_search` — Unified search
127+
128+
Search across all data layers with a single query — project memories, session facts, and raw conversation history. Results are ranked by source (memories first, then facts, then message hits).
129+
130+
```
131+
ctx_search(query="authentication approach")
132+
```
133+
134+
Message results include ordinal numbers the agent can pass to `ctx_expand` to retrieve the surrounding conversation context.
135+
127136
### Automatic context injection
128137

129138
Every turn, Magic Context injects a `<session-history>` block containing:
@@ -170,7 +179,7 @@ As context usage grows, Magic Context sends rolling reminders suggesting the age
170179

171180
After each historian run, qualifying facts are promoted to the persistent memory store. On every subsequent turn, active memories are injected in `<session-history>`. New sessions inherit all project memories from previous sessions.
172181

173-
Memories are searchable via `ctx_memory(action="search", ...)` using semantic embeddings (local by default) with full-text search as fallback.
182+
Memories are searchable via `ctx_search` alongside session facts and raw conversation history, using semantic embeddings (local by default) with full-text search as fallback.
174183

175184
### Dreamer
176185

@@ -230,6 +239,8 @@ All durable states live in a local SQLite database. If the database can't be ope
230239
| `memory_embeddings` | Embedding vectors for semantic search |
231240
| `dream_state` | Dreamer lease locking and task progress |
232241
| `dream_queue` | Queued projects awaiting dream processing |
242+
| `message_history_fts` | FTS5 index of user/assistant message text for `ctx_search` |
243+
| `message_history_index` | Tracks last indexed ordinal per session for incremental FTS population |
233244
| `recomp_compartments` | Staging for `/ctx-recomp` partial progress |
234245
| `recomp_facts` | Staging for `/ctx-recomp` partial progress |
235246

0 commit comments

Comments
 (0)