@joshuaswarren/openclaw-engram 9.0.56 → 9.0.58

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -26,10 +26,12 @@ That product thesis drives the roadmap order:
26
26
  AI agents forget everything between conversations. Engram fixes that.
27
27
 
28
28
  - **Automatic extraction** — Engram watches conversations and extracts facts, decisions, preferences, corrections, and more. No manual tagging required.
29
+ - **Explicit capture modes** — Run in `implicit`, `explicit`, or `hybrid` mode when memory writes need stricter consent, immediate explicit capture, or review-first handling.
29
30
  - **Smart recall** — Before each conversation, Engram injects the most relevant memories into the agent's context. Your agents remember what they need, when they need it.
30
31
  - **Local-first** — All memory data stays on your filesystem as plain markdown files. No cloud dependency, no vendor lock-in, fully portable.
31
32
  - **Pluggable search** — Choose from six search backends: QMD (hybrid BM25+vector+reranking), LanceDB, Meilisearch, Orama, remote HTTP, or bring your own.
32
- - **Memory OS features** — Graph recall, temporal memory tree, lifecycle policy, compounding, shared context, memory boxes, and identity continuity can be enabled progressively as your install grows.
33
+ - **External agent access** — Run a local authenticated HTTP API and a stdio MCP server so Codex, Claude Code, and scripts can query Engram without OpenClaw-specific glue.
34
+ - **Memory OS features** — Temporal memory tree, graph reasoning, lifecycle policy, compounding, shared context, memory boxes, and identity continuity can be enabled progressively as your install grows.
33
35
  - **Benchmark-first roadmap** — Engram now has an evaluation harness with live shadow recall recording and a CI benchmark delta gate, so memory improvements can be measured and regression-checked instead of argued from anecdotes.
34
36
  - **Baseline snapshot discipline** — Engram can now, when `benchmarkBaselineSnapshotsEnabled` is enabled, capture typed baseline snapshots of the latest completed benchmark runs so later PR delta reporting can compare candidates against a stable stored reference instead of an ad hoc branch state.
35
37
  - **Named baseline delta reporting** — Engram can now, when `benchmarkDeltaReporterEnabled` is enabled, compare the current eval store against a stored baseline snapshot, emit a machine-readable delta report plus markdown summary, and fail fast when a candidate regresses a benchmark that previously passed.
@@ -89,10 +91,79 @@ That's it. Start a conversation — Engram begins learning immediately.
89
91
  ## Verify Installation
90
92
 
91
93
  ```bash
92
- openclaw engram compat --strict # Should exit 0
93
- openclaw engram stats # Shows memory counts and search status
94
+ openclaw engram setup --json # Validates config, scaffolds directories, prints next steps
95
+ openclaw engram config-review --json # Opinionated config tuning recommendations + mismatches
96
+ openclaw engram doctor --json # Aggregated safe health diagnostics
97
+ openclaw engram inventory --json # Baseline memory/entity/storage footprint
94
98
  ```
95
99
 
100
+ ## Universal Access Layer
101
+
102
+ Engram exposes the same local service layer through:
103
+
104
+ - an authenticated loopback HTTP API for scripts and local operator tooling
105
+ - a stdio MCP server for Codex, Claude Code, and other MCP clients
106
+
107
+ Start the HTTP server:
108
+
109
+ ```bash
110
+ openclaw engram access http-serve --token "$OPENCLAW_ENGRAM_ACCESS_TOKEN"
111
+ ```
112
+
113
+ Run the MCP server over stdio:
114
+
115
+ ```bash
116
+ openclaw engram access mcp-serve
117
+ ```
118
+
119
+ For MCP clients, point the command at `openclaw engram access mcp-serve`. The MCP side is intentionally stdio-first and reuses the same local storage plus service layer, so it does not need a separate host/port config surface.
120
+
121
+ HTTP highlights:
122
+
123
+ - `GET /engram/v1/health`
124
+ - `POST /engram/v1/recall`
125
+ - `POST /engram/v1/recall/explain`
126
+ - `POST /engram/v1/memories`
127
+ - `POST /engram/v1/suggestions`
128
+ - `GET /engram/v1/memories/:id`
129
+ - `GET /engram/v1/memories/:id/timeline`
130
+ - `GET /engram/v1/entities/:name`
131
+ - `GET /engram/v1/review-queue`
132
+
133
+ MCP highlights:
134
+
135
+ - `engram.recall`
136
+ - `engram.recall_explain`
137
+ - `engram.memory_get`
138
+ - `engram.memory_timeline`
139
+ - `engram.memory_store`
140
+ - `engram.suggestion_submit`
141
+ - `engram.entity_get`
142
+ - `engram.review_queue_list`
143
+
144
+ Recall requests support `query`, `sessionKey`, `namespace`, `topK`, `mode`, and `includeDebug`. Recall responses include `results`, `count`, `traceId`, `plannerMode`, `fallbackUsed`, `sourcesUsed`, `budgetsApplied`, and `latencyMs`.
145
+
146
+ ## Explicit Capture
147
+
148
+ Set `captureMode` to control how memories are created:
149
+
150
+ - `implicit`: normal extraction behavior.
151
+ - `explicit`: only structured explicit capture writes or queues review items.
152
+ - `hybrid`: explicit capture writes immediately and normal extraction still runs.
153
+
154
+ Prefer the `memory_capture` tool when tool use is available. In constrained runtimes, Engram also accepts an inline fallback block:
155
+
156
+ ```text
157
+ <memory_note>
158
+ category: decision
159
+ content: |
160
+ Recall benchmark packs live under state/evals/benchmarks/.
161
+ tags: benchmarks, evals
162
+ </memory_note>
163
+ ```
164
+
165
+ If the note fails direct-write policy, Engram sanitizes it and queues a `pending_review` memory instead of dropping it silently.
166
+
96
167
  ## How It Works
97
168
 
98
169
  Engram operates in three phases, running automatically in the background:
@@ -169,12 +240,24 @@ Engram's capabilities are organized into feature families that you can enable pr
169
240
 
170
241
  Start with defaults, then enable features as needed. See [Enable All Features](docs/enable-all-v8.md) for a full-feature config profile.
171
242
 
243
+ If you want a supported starting point for the advanced surface, set `memoryOsPreset` to one of `conservative`, `balanced`, `research-max`, or `local-llm-heavy`, then override only the few knobs you actually need.
244
+
245
+ For the full config surface, including the shipped default and a recommended value for every option, see [docs/config-reference.md](docs/config-reference.md).
246
+
172
247
  ## Agent & Operator Commands
173
248
 
174
249
  ```bash
175
250
  openclaw engram stats # Memory counts, search status, health
251
+ openclaw engram setup # Guided first-run setup + directory scaffolding
252
+ openclaw engram setup --preview-capture-instructions # Preview the managed explicit-capture snippet
253
+ openclaw engram setup --install-capture-instructions # Install or update the managed explicit-capture snippet
254
+ openclaw engram setup --remove-capture-instructions # Remove the managed explicit-capture snippet
255
+ openclaw engram config-review # Review current config and recommend higher-leverage settings
256
+ openclaw engram doctor # Aggregated setup/runtime diagnostics with remediation hints
257
+ openclaw engram inventory # Memory, namespace, review queue, storage, and native-knowledge inventory
176
258
  openclaw engram search "your query" # Search memories from CLI
177
259
  openclaw engram compat --strict # Compatibility check
260
+ openclaw engram benchmark recall # Status/validate/compare/snapshot recall benchmark artifacts
178
261
  openclaw engram benchmark-status # Benchmark/eval harness packs, runs, shadow recalls, latest summaries
179
262
  openclaw engram benchmark-validate <path> # Validate a benchmark manifest or pack directory
180
263
  openclaw engram benchmark-import <path> # Import a validated benchmark pack into the eval store
@@ -191,6 +274,13 @@ openclaw engram commitment-status # Commitment ledger counts and latest
191
274
  openclaw engram commitment-record # Record a typed commitment ledger entry
192
275
  openclaw engram commitment-set-state # Transition a commitment to open|fulfilled|cancelled|expired
193
276
  openclaw engram commitment-lifecycle-run # Expire overdue commitments and clean aged resolved entries
277
+ openclaw engram governance-run --mode shadow # Build review queue + audit artifacts without mutating memories
278
+ openclaw engram governance-run --mode apply # Apply reversible governance transitions and write restore metadata
279
+ openclaw engram governance-report # Read the latest or named governance artifact bundle
280
+ openclaw engram governance-restore --run-id <runId> # Restore one applied governance run
281
+ openclaw engram review-disposition <memoryId> --status rejected # Record an explicit operator review outcome
282
+ openclaw engram access http-serve --token "$OPENCLAW_ENGRAM_ACCESS_TOKEN" # Start the local access API + admin console shell
283
+ openclaw engram access mcp-serve # Run the stdio MCP server for Codex/Claude Code
194
284
  openclaw engram work-product-status # Work-product ledger counts and latest recorded output
195
285
  openclaw engram work-product-record # Record a typed work-product ledger entry
196
286
  openclaw engram work-product-recall-search <query> # Preview reusable work products from the creation-memory ledger
@@ -199,11 +289,17 @@ openclaw engram utility-record # Record a typed utility-learning te
199
289
  openclaw engram utility-learning-status # Latest offline utility-learning snapshot and learned weight counts
200
290
  openclaw engram utility-learn # Learn bounded offline promotion/ranking weights from recorded utility events
201
291
  openclaw engram conversation-index-health # Conversation index status
292
+ openclaw engram rebuild-index # Operator-friendly alias for conversation-index-rebuild
202
293
  openclaw engram graph-health # Entity graph status
294
+ openclaw engram repair # Aggregate session repair planning + graph guidance
203
295
  openclaw engram tier-status # Hot/cold tier metrics
204
296
  openclaw engram policy-status # Lifecycle policy snapshot
205
297
  ```
206
298
 
299
+ Governance runs write durable artifacts under `{memoryDir}/state/memory-governance/runs/<runId>/`, including `summary.json`, `review-queue.json`, `kept-memories.json`, `applied-actions.json`, `metrics.json`, `manifest.json`, `report.md`, and `restore.json` for apply runs.
300
+
301
+ When the local HTTP access server is running, Engram also serves a lightweight operator UI shell at `http://127.0.0.1:4318/engram/ui/`. Paste the same bearer token into the console UI and it will use the authenticated `/engram/v1/...` endpoints for memory browsing, recall inspection, governance review, entity exploration, and maintenance status.
302
+
207
303
  ## Configuration
208
304
 
209
305
  All settings live in `openclaw.json` under `plugins.entries.openclaw-engram.config`. `openaiApiKey` is optional when local LLM or gateway fallback paths are available.
@@ -221,12 +317,11 @@ Key settings:
221
317
  | `evalShadowModeEnabled` | `false` | Record live recall decisions to the eval store without changing injected output |
222
318
  | `benchmarkBaselineSnapshotsEnabled` | `false` | Enable versioned baseline snapshot artifacts for the latest completed benchmark runs |
223
319
  | `benchmarkDeltaReporterEnabled` | `false` | Enable named-baseline delta reports against the current eval store |
224
-
225
- The repo's required benchmark check uses the committed fixture snapshot at
226
- `tests/fixtures/eval-ci/store/baselines/required-main.json` as the stable
227
- release baseline for PR gating. During the rollout PR that first introduces
228
- that file, the gate bootstraps from the candidate branch snapshot once; after
229
- that, PRs resolve the required baseline from the base branch checkout.
320
+ | `captureMode` | `implicit` | Memory write policy: `implicit`, `explicit`, or `hybrid` |
321
+ | `nativeKnowledge.enabled` | `false` | Enable curated workspace and synced native-knowledge recall without converting source docs into durable memory files |
322
+ | `nativeKnowledge.openclawWorkspace` | unset | Optional backend-agnostic adapter for OpenClaw workspace bootstrap docs, handoffs, daily summaries, and automation notes |
323
+ | `nativeKnowledge.obsidianVaults` | `[]` | Optional backend-agnostic Obsidian vault adapters that sync markdown notes, tags, aliases, links, and daily-note dates into native knowledge recall |
324
+ | `entityRetrievalEnabled` | `true` | Enable entity-oriented answer hints for direct entity questions and transcript-backed recent-turn pronoun follow-ups in the active recall namespace |
230
325
  | `evalStoreDir` | `{memoryDir}/state/evals` | Root directory for benchmark packs, run summaries, and shadow recall records |
231
326
  | `objectiveStateMemoryEnabled` | `false` | Enable the objective-state memory foundation for normalized world/tool state snapshots |
232
327
  | `objectiveStateSnapshotWritesEnabled` | `false` | Permit objective-state snapshot writers to persist typed state records |
@@ -259,24 +354,87 @@ that, PRs resolve the required baseline from the base branch checkout.
259
354
  | `workProductRecallEnabled` | `false` | Inject prompt-relevant work-product ledger entries into recall and expose `openclaw engram work-product-recall-search` |
260
355
  | `workProductLedgerDir` | `{memoryDir}/state/work-product-ledger` | Root directory for typed work-product ledger entries |
261
356
 
357
+ The repo's required benchmark check uses the committed fixture snapshot at
358
+ `tests/fixtures/eval-ci/store/baselines/required-main.json` as the stable
359
+ release baseline for PR gating. During the rollout PR that first introduces
360
+ that file, the gate bootstraps from the candidate branch snapshot once; after
361
+ that, PRs resolve the required baseline from the base branch checkout.
362
+
363
+ ### Native Knowledge Sync
364
+
365
+ Engram can search curated markdown files directly during recall without first extracting them into durable memory records. This keeps operator docs, handoff notes, and Obsidian content available as first-class recall sources while preserving the markdown files as the source of truth.
366
+
367
+ Example:
368
+
369
+ ```jsonc
370
+ {
371
+ "nativeKnowledge": {
372
+ "enabled": true,
373
+ "includeFiles": ["IDENTITY.md", "MEMORY.md", "TEAM.md"],
374
+ "openclawWorkspace": {
375
+ "enabled": true,
376
+ "bootstrapFiles": ["IDENTITY.md", "MEMORY.md", "USER.md"],
377
+ "handoffGlobs": ["handoffs/**/*.md"],
378
+ "dailySummaryGlobs": ["summaries/**/*.md"],
379
+ "automationNoteGlobs": ["automation/**/*.md"],
380
+ "sharedSafeGlobs": ["automation/shared/**/*.md"]
381
+ },
382
+ "obsidianVaults": [
383
+ {
384
+ "id": "personal",
385
+ "rootDir": "/Users/you/Documents/Obsidian",
386
+ "includeGlobs": ["**/*.md"],
387
+ "excludeGlobs": [".obsidian/**", "Templates/**"],
388
+ "namespace": "shared",
389
+ "privacyClass": "private",
390
+ "folderRules": [
391
+ { "pathPrefix": "Projects", "namespace": "work", "privacyClass": "team" }
392
+ ],
393
+ "dailyNotePatterns": ["Daily/YYYY-MM-DD", "YYYY-MM-DD"],
394
+ "materializeBacklinks": true
395
+ }
396
+ ]
397
+ }
398
+ }
399
+ ```
400
+
401
+ Direct `includeFiles` plus the OpenClaw workspace adapter both sync into backend-agnostic state under `{memoryDir}/state/native-knowledge`, preserve source metadata and deletion tombstones, and dedupe exact overlaps so bootstrap docs are not injected twice.
402
+
403
+ When an Obsidian vault adapter is enabled, Engram syncs active notes into backend-agnostic native-knowledge state under `{memoryDir}/state/native-knowledge`, preserves aliases, inline/frontmatter tags, wikilinks, optional backlinks, and daily-note dates, and then blends those chunks into the existing `Curated Workspace Knowledge` recall section with namespace filtering applied before injection.
404
+
262
405
  Full reference: [Config Reference](docs/config-reference.md)
263
406
 
407
+ Preset example:
408
+
409
+ ```jsonc
410
+ {
411
+ "memoryOsPreset": "balanced",
412
+ "localLlmEnabled": true,
413
+ "localLlmUrl": "http://localhost:1234/v1",
414
+ "localLlmModel": "qwen2.5-32b-instruct"
415
+ }
416
+ ```
417
+
264
418
  ## Documentation
265
419
 
266
420
  - [Getting Started](docs/getting-started.md) — Installation, setup, first-run verification
267
421
  - [Search Backends](docs/search-backends.md) — Choosing and configuring search engines
268
422
  - [Writing a Search Backend](docs/writing-a-search-backend.md) — Build your own adapter
269
423
  - [Config Reference](docs/config-reference.md) — Every setting with defaults
424
+ - [Local LLM Guide](docs/guides/local-llm.md) — Setup and tune local-first extraction/rerank flows
425
+ - [Cost Control Guide](docs/guides/cost-control.md) — Budget mappings, presets, and rollout discipline
426
+ - [Migration Guide](docs/guides/migrations.md) — Move from manual tuning and historical roadmap docs to the current config surface
270
427
  - [Evaluation Harness](docs/evaluation-harness.md) — Benchmark pack, shadow recall, and CI delta gate format
271
428
  - [Architecture Overview](docs/architecture/overview.md) — System design and storage layout
272
429
  - [Retrieval Pipeline](docs/architecture/retrieval-pipeline.md) — How recall works
273
430
  - [Memory Lifecycle](docs/architecture/memory-lifecycle.md) — Write, consolidation, expiry
431
+ - [Graph Reasoning](docs/architecture/graph-reasoning.md) — Opt-in graph traversal, assist, and explainability
274
432
  - [Enable All Features](docs/enable-all-v8.md) — Full-feature config profile
275
433
  - [Operations](docs/operations.md) — Backup, export, maintenance
276
434
  - [Namespaces](docs/namespaces.md) — Multi-agent memory isolation
277
435
  - [Shared Context](docs/shared-context.md) — Cross-agent intelligence
278
436
  - [Identity Continuity](docs/identity-continuity.md) — Consistent agent personality
279
- - [Agentic Memory Roadmap](docs/plans/2026-03-06-engram-agentic-memory-roadmap.md) — Benchmark-first roadmap and PR slices
437
+ - [Historical Plans Index](docs/plans/README.md) — Archived design context; GitHub Project remains the roadmap source of truth
280
438
 
281
439
  ## Developer Install
282
440