@agentmemory/agentmemory 0.9.31 → 0.9.32

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.
Files changed (138) hide show
  1. package/.env.example +18 -15
  2. package/AGENTS.md +4 -4
  3. package/README.md +92 -270
  4. package/dist/.env.example +18 -15
  5. package/dist/cli.d.mts.map +1 -1
  6. package/dist/cli.mjs +530 -75
  7. package/dist/cli.mjs.map +1 -1
  8. package/dist/{compression-recovery-CnhLQC6N.mjs → compression-recovery-CZh63Jmz.mjs} +174 -89
  9. package/dist/compression-recovery-CZh63Jmz.mjs.map +1 -0
  10. package/dist/{connect-BSLIAMpw.mjs → connect-BX3njQ3Y.mjs} +28 -14
  11. package/dist/connect-BX3njQ3Y.mjs.map +1 -0
  12. package/dist/hooks/_capture.d.mts +3 -2
  13. package/dist/hooks/_capture.d.mts.map +1 -1
  14. package/dist/hooks/_capture.mjs +87 -8
  15. package/dist/hooks/_capture.mjs.map +1 -1
  16. package/dist/hooks/post-commit.mjs +58 -5
  17. package/dist/hooks/post-commit.mjs.map +1 -1
  18. package/dist/hooks/post-tool-failure.mjs +7 -2
  19. package/dist/hooks/post-tool-failure.mjs.map +1 -1
  20. package/dist/hooks/post-tool-use.mjs +7 -2
  21. package/dist/hooks/post-tool-use.mjs.map +1 -1
  22. package/dist/hooks/pre-compact.mjs +67 -12
  23. package/dist/hooks/pre-compact.mjs.map +1 -1
  24. package/dist/hooks/pre-tool-use.mjs +58 -5
  25. package/dist/hooks/pre-tool-use.mjs.map +1 -1
  26. package/dist/hooks/session-end.mjs +14 -3
  27. package/dist/hooks/session-end.mjs.map +1 -1
  28. package/dist/hooks/session-start.mjs +58 -5
  29. package/dist/hooks/session-start.mjs.map +1 -1
  30. package/dist/hooks/stop.mjs +2 -1
  31. package/dist/hooks/stop.mjs.map +1 -1
  32. package/dist/hooks/subagent-stop.mjs +15 -5
  33. package/dist/hooks/subagent-stop.mjs.map +1 -1
  34. package/dist/hooks/task-completed.mjs +8 -1
  35. package/dist/hooks/task-completed.mjs.map +1 -1
  36. package/dist/index.mjs +724 -200
  37. package/dist/index.mjs.map +1 -1
  38. package/dist/integrations/dsh.mjs +31 -4
  39. package/dist/integrations/dsh.mjs.map +1 -1
  40. package/dist/{secret-store-D9GwO0xp.mjs → secret-store-iYXRcrO8.mjs} +197 -55
  41. package/dist/secret-store-iYXRcrO8.mjs.map +1 -0
  42. package/dist/{src-DaMtDzt_.mjs → src-C23nMpda.mjs} +359 -62
  43. package/dist/src-C23nMpda.mjs.map +1 -0
  44. package/dist/{standalone-BlqshyZ5.mjs → standalone-BYo5USDb.mjs} +169 -10
  45. package/dist/standalone-BYo5USDb.mjs.map +1 -0
  46. package/dist/standalone.d.mts.map +1 -1
  47. package/dist/standalone.mjs +240 -10
  48. package/dist/standalone.mjs.map +1 -1
  49. package/dist/viewer/index.html +49 -28
  50. package/integrations/hermes/README.md +11 -1
  51. package/integrations/hermes/__init__.py +1 -0
  52. package/integrations/hermes/plugin.yaml +1 -1
  53. package/integrations/omp/dist/index.mjs +31 -4
  54. package/integrations/omp/package.json +1 -1
  55. package/integrations/omp/skills/agentmemory-agents/REFERENCE.md +1 -1
  56. package/integrations/omp/skills/agentmemory-architecture/SKILL.md +5 -1
  57. package/integrations/omp/skills/agentmemory-config/REFERENCE.md +2 -1
  58. package/integrations/omp/skills/agentmemory-config/SKILL.md +29 -9
  59. package/integrations/omp/skills/agentmemory-hooks/SKILL.md +17 -6
  60. package/integrations/omp/skills/agentmemory-mcp-tools/REFERENCE.md +1 -1
  61. package/integrations/omp/skills/agentmemory-mcp-tools/SKILL.md +10 -0
  62. package/integrations/omp/skills/agentmemory-rest-api/REFERENCE.md +2 -1
  63. package/integrations/omp/skills/agentmemory-rest-api/SKILL.md +1 -1
  64. package/integrations/openclaw/README.md +10 -0
  65. package/integrations/openclaw/openclaw.plugin.json +1 -1
  66. package/integrations/openclaw/package.json +1 -1
  67. package/integrations/openclaw/plugin.yaml +1 -1
  68. package/integrations/openclaw/skills/agentmemory-agents/REFERENCE.md +1 -1
  69. package/integrations/openclaw/skills/agentmemory-architecture/SKILL.md +5 -1
  70. package/integrations/openclaw/skills/agentmemory-config/REFERENCE.md +2 -1
  71. package/integrations/openclaw/skills/agentmemory-config/SKILL.md +29 -9
  72. package/integrations/openclaw/skills/agentmemory-hooks/SKILL.md +17 -6
  73. package/integrations/openclaw/skills/agentmemory-mcp-tools/REFERENCE.md +1 -1
  74. package/integrations/openclaw/skills/agentmemory-mcp-tools/SKILL.md +10 -0
  75. package/integrations/openclaw/skills/agentmemory-rest-api/REFERENCE.md +2 -1
  76. package/integrations/openclaw/skills/agentmemory-rest-api/SKILL.md +1 -1
  77. package/integrations/pi/README.md +1 -0
  78. package/integrations/pi/dist/index.mjs +92 -11
  79. package/integrations/pi/index.ts +56 -6
  80. package/integrations/pi/package.json +1 -1
  81. package/integrations/pi/skills/agentmemory-agents/REFERENCE.md +1 -1
  82. package/integrations/pi/skills/agentmemory-architecture/SKILL.md +5 -1
  83. package/integrations/pi/skills/agentmemory-config/REFERENCE.md +2 -1
  84. package/integrations/pi/skills/agentmemory-config/SKILL.md +29 -9
  85. package/integrations/pi/skills/agentmemory-hooks/SKILL.md +17 -6
  86. package/integrations/pi/skills/agentmemory-mcp-tools/REFERENCE.md +1 -1
  87. package/integrations/pi/skills/agentmemory-mcp-tools/SKILL.md +10 -0
  88. package/integrations/pi/skills/agentmemory-rest-api/REFERENCE.md +2 -1
  89. package/integrations/pi/skills/agentmemory-rest-api/SKILL.md +1 -1
  90. package/package.json +4 -3
  91. package/plugin/.claude-plugin/plugin.json +16 -3
  92. package/plugin/.codex-plugin/plugin.json +1 -1
  93. package/plugin/.devin-plugin/plugin.json +3 -4
  94. package/plugin/.mcp.json +5 -1
  95. package/plugin/README.md +71 -0
  96. package/plugin/hooks/hooks.json +24 -12
  97. package/plugin/opencode/plugin.json +1 -1
  98. package/plugin/plugin.json +1 -1
  99. package/plugin/scripts/_capture.d.mts +3 -2
  100. package/plugin/scripts/_capture.d.mts.map +1 -1
  101. package/plugin/scripts/_capture.mjs +87 -8
  102. package/plugin/scripts/_capture.mjs.map +1 -1
  103. package/plugin/scripts/plugin-bridge.mjs +25 -6
  104. package/plugin/scripts/post-tool-failure.mjs +7 -2
  105. package/plugin/scripts/post-tool-failure.mjs.map +1 -1
  106. package/plugin/scripts/post-tool-use.mjs +7 -2
  107. package/plugin/scripts/post-tool-use.mjs.map +1 -1
  108. package/plugin/scripts/pre-compact.mjs +67 -12
  109. package/plugin/scripts/pre-compact.mjs.map +1 -1
  110. package/plugin/scripts/pre-tool-use.mjs +58 -5
  111. package/plugin/scripts/pre-tool-use.mjs.map +1 -1
  112. package/plugin/scripts/session-end.mjs +14 -3
  113. package/plugin/scripts/session-end.mjs.map +1 -1
  114. package/plugin/scripts/session-start.mjs +58 -5
  115. package/plugin/scripts/session-start.mjs.map +1 -1
  116. package/plugin/scripts/stop.mjs +2 -1
  117. package/plugin/scripts/stop.mjs.map +1 -1
  118. package/plugin/scripts/subagent-stop.mjs +15 -5
  119. package/plugin/scripts/subagent-stop.mjs.map +1 -1
  120. package/plugin/scripts/task-completed.mjs +8 -1
  121. package/plugin/scripts/task-completed.mjs.map +1 -1
  122. package/plugin/skills/agentmemory-agents/REFERENCE.md +1 -1
  123. package/plugin/skills/agentmemory-architecture/SKILL.md +5 -1
  124. package/plugin/skills/agentmemory-config/REFERENCE.md +2 -1
  125. package/plugin/skills/agentmemory-config/SKILL.md +29 -9
  126. package/plugin/skills/agentmemory-hooks/SKILL.md +17 -6
  127. package/plugin/skills/agentmemory-mcp-tools/REFERENCE.md +1 -1
  128. package/plugin/skills/agentmemory-mcp-tools/SKILL.md +10 -0
  129. package/plugin/skills/agentmemory-rest-api/REFERENCE.md +2 -1
  130. package/plugin/skills/agentmemory-rest-api/SKILL.md +1 -1
  131. package/dist/compression-recovery-CnhLQC6N.mjs.map +0 -1
  132. package/dist/connect-BSLIAMpw.mjs.map +0 -1
  133. package/dist/secret-store-D9GwO0xp.mjs.map +0 -1
  134. package/dist/src-DaMtDzt_.mjs.map +0 -1
  135. package/dist/standalone-BlqshyZ5.mjs.map +0 -1
  136. package/plugin/scripts/post-commit.d.mts +0 -1
  137. package/plugin/scripts/post-commit.mjs +0 -204
  138. package/plugin/scripts/post-commit.mjs.map +0 -1
package/README.md CHANGED
@@ -50,7 +50,7 @@
50
50
  </p>
51
51
 
52
52
  <p align="center">
53
- <a href="https://gist.github.com/rohitg00/2067ab416f7bbe447c1977edaaa681e2"><img src="https://img.shields.io/badge/Viral%20GitHub%20Gist-1.6k%20stars%20%2F%20230%20forks-FF6B35?style=for-the-badge&logo=github&logoColor=white&labelColor=1a1a1a" alt="Design doc: 1.6k stars / 230 forks on the gist" /></a>
53
+ <a href="https://gist.github.com/rohitg00/2067ab416f7bbe447c1977edaaa681e2"><img src="https://img.shields.io/badge/Viral%20GitHub%20Gist-1.7k%20stars%20%2F%20240%20forks-FF6B35?style=for-the-badge&logo=github&logoColor=white&labelColor=1a1a1a" alt="Design doc: 1.7k stars / 240 forks on the gist" /></a>
54
54
  </p>
55
55
 
56
56
  <p align="center">
@@ -66,16 +66,16 @@
66
66
  </p>
67
67
 
68
68
  <p align="center">
69
- <picture><source media="(prefers-color-scheme: dark)" srcset="assets/tags/light/stat-recall.svg"><img src="assets/tags/stat-recall.svg" alt="95.2% retrieval R@5" height="38" /></picture>
70
- <picture><source media="(prefers-color-scheme: dark)" srcset="assets/tags/light/stat-tokens.svg"><img src="assets/tags/stat-tokens.svg" alt="92% fewer tokens" height="38" /></picture>
71
69
  <picture><source media="(prefers-color-scheme: dark)" srcset="assets/tags/light/stat-tools.svg"><img src="assets/tags/stat-tools.svg" alt="54 MCP tools" height="38" /></picture>
72
70
  <picture><source media="(prefers-color-scheme: dark)" srcset="assets/tags/light/stat-hooks.svg"><img src="assets/tags/stat-hooks.svg" alt="12 auto hooks" height="38" /></picture>
73
71
  <picture><source media="(prefers-color-scheme: dark)" srcset="assets/tags/light/stat-deps.svg"><img src="assets/tags/stat-deps.svg" alt="0 external DBs" height="38" /></picture>
74
- <picture><source media="(prefers-color-scheme: dark)" srcset="assets/tags/light/stat-tests.svg"><img src="assets/tags/stat-tests.svg" alt="4,000+ tests passing" height="38" /></picture>
72
+ <picture><source media="(prefers-color-scheme: dark)" srcset="assets/tags/light/stat-tests.svg"><img src="assets/tags/stat-tests.svg" alt="4,400+ tests passing" height="38" /></picture>
75
73
  </p>
76
74
 
77
75
  <p align="center">
78
- <img src="assets/demo.gif" alt="agentmemory demo" width="720" />
76
+ <a href="assets/demo.gif">
77
+ <img src="assets/demo.gif" alt="AgentMemory viewer: memories, knowledge graph, sessions and replay in dark and light themes" width="960" />
78
+ </a>
79
79
  </p>
80
80
 
81
81
  <p align="center">
@@ -332,225 +332,47 @@ Latest release notes: [CHANGELOG.md](CHANGELOG.md).
332
332
 
333
333
  ---
334
334
 
335
- <h2 id="benchmarks"><picture><source media="(prefers-color-scheme: dark)" srcset="assets/tags/light/section-benchmarks.svg"><img src="assets/tags/section-benchmarks.svg" alt="Benchmarks" height="32" /></picture></h2>
336
-
337
- <table>
338
- <tr>
339
- <td width="50%">
340
-
341
- ### Retrieval Accuracy
335
+ ### What's new in 0.9.32
342
336
 
343
- **coding-agent-life-v1** (in-house corpus, sandbox-reproducible)
337
+ - **Providers are opt-in:** a key alone sends nothing out. Set `AGENTMEMORY_LLM_PROVIDER` for LLM features and `EMBEDDING_PROVIDER` for cloud embeddings.
338
+ - **Native Windows works:** Worker Compose starts, iii installs itself, and `doctor` never waits on a prompt in scripts.
339
+ - **Reliable boot:** agentmemory waits for the state worker, so slow starts keep their search index and vectors.
340
+ - **Better recall:** CJK queries, scoped smart-search and project isolation fixes.
344
341
 
345
- | Adapter | P@5 | R@5 | Top-5 hit rate | p50 latency |
346
- |---|---|---|---|---|
347
- | **agentmemory hybrid** | **0.240** | **1.000** | **15 / 15** | 14 ms |
348
- | grep baseline | 0.227 | 0.967 | 15 / 15 | 0 ms |
342
+ [Release notes and contributor credits](https://github.com/rohitg00/agentmemory/releases/tag/v0.9.32).
349
343
 
350
- 100% top-5 hit rate at the **P@5 math ceiling** for this corpus (0.240, see scorecard). Hybrid retrieves every gold session; grep misses 1 of 2 gold on the multi-session temporal query. Lift is **recall + temporal**, not aggregate precision. This benchmark is small and gold-sparse; the larger LongMemEval-S below differentiates better. Full per-type breakdown + correction note: [`docs/benchmarks/2026-05-20-coding-agent-life-v1.md`](docs/benchmarks/2026-05-20-coding-agent-life-v1.md).
351
-
352
- **LongMemEval-S** (ICLR 2025, 500 questions)
353
-
354
- | System | R@5 | R@10 | MRR |
355
- |---|---|---|---|
356
- | **agentmemory** | **95.2%** | **98.6%** | **88.2%** |
357
- | BM25-only fallback | 86.2% | 94.6% | 71.5% |
358
-
359
- </td>
360
- <td width="50%">
344
+ <h2 id="benchmarks"><picture><source media="(prefers-color-scheme: dark)" srcset="assets/tags/light/section-benchmarks.svg"><img src="assets/tags/section-benchmarks.svg" alt="Benchmarks" height="32" /></picture></h2>
361
345
 
362
- ### Token Savings
346
+ **Useful recall without a model API.** On LongMemEval-S, AgentMemory's keyless BM25 component found at least one relevant source for **96.2%** of answerable questions and **every required source for 84.7%**.
363
347
 
364
- | Approach | Tokens/yr | Cost/yr |
365
- |---|---|---|
366
- | Paste full context | 19.5M+ | Impossible (exceeds window) |
367
- | LLM-summarized | ~650K | ~$500 |
368
- | **agentmemory** | **~170K** | **~$10** |
369
- | agentmemory + local embeddings | ~170K | **$0** |
348
+ | LongMemEval-S, top 5 distinct sessions | AgentMemory BM25 | Lexical baseline |
349
+ |---|---:|---:|
350
+ | Every required source found (strict recall-all@5) | **84.7%** | 72.1% |
351
+ | At least one relevant source found (any-hit@5) | **96.2%** | 88.7% |
370
352
 
371
- </td>
372
- </tr>
373
- </table>
353
+ That is **12.6 percentage points higher complete-source retrieval** than the lexical baseline on the same inputs, with no embedding model or paid API. Measured on 2026-10-28: 500 questions per adapter, 470 answerable, 30 excluded from retrieval scoring, zero execution failures.
374
354
 
375
- > Embedding model: `all-MiniLM-L6-v2` (local, free, no API key). Full reports: [`benchmark/LONGMEMEVAL.md`](benchmark/LONGMEMEVAL.md), [`benchmark/QUALITY.md`](benchmark/QUALITY.md), [`benchmark/SCALE.md`](benchmark/SCALE.md). Competitor comparison: [`benchmark/COMPARISON.md`](benchmark/COMPARISON.md) covering agentmemory vs mem0, Letta, Khoj, supermemory, TencentDB Agent Memory, MemPalace, Zep/Graphiti, Cognee, Hippo.
376
-
377
- **Reproduce locally:** [`eval/README.md`](eval/README.md), an adapter-pluggable harness for LongMemEval `_s` (public 500-Q) + `coding-agent-life-v1` (in-house 15-session corpus). Grep / vector / agentmemory adapters score side-by-side, NDJSON output, published scorecards land in [`docs/benchmarks/`](docs/benchmarks/).
378
-
379
- **Pairs with [codegraph](https://github.com/colbymchenry/codegraph), [Understand Anything](https://github.com/Lum1104/Understand-Anything), and [Graphify](https://github.com/safishamsi/graphify).** Code-graph indexing, multi-agent build pipelines, and broader knowledge graphs across docs / PDFs / images / videos. agentmemory remembers the work; those three projects light up the rest of the context layer. Recipes + question-routing table: [`docs/recipes/pairings.md`](docs/recipes/pairings.md).
355
+ This component test measures retrieval from supplied sessions. Full-system answer quality, hybrid retrieval and competitor rankings require separate evaluations. [Read the complete results, including the smaller coding fixture, limitations and reproduction steps](docs/benchmarks/2026-10-28-retrieval-evaluation.md).
380
356
 
381
357
  ---
382
358
 
383
359
  <h2 id="vs-competitors"><picture><source media="(prefers-color-scheme: dark)" srcset="assets/tags/light/section-competitors.svg"><img src="assets/tags/section-competitors.svg" alt="vs Competitors" height="32" /></picture></h2>
384
360
 
385
- <table>
386
- <tr>
387
- <th></th>
388
- <th>agentmemory</th>
389
- <th>mem0 (63K ⭐)</th>
390
- <th>Letta / MemGPT (24K ⭐)</th>
391
- <th>Khoj (36K ⭐)</th>
392
- <th>supermemory (29K ⭐)</th>
393
- <th>TencentDB Agent Memory (22K ⭐)</th>
394
- <th>MemPalace (54K ⭐)</th>
395
- <th>oracleagentmemory</th>
396
- <th>Hippo</th>
397
- <th>Built-in (CLAUDE.md)</th>
398
- </tr>
399
- <tr>
400
- <td><strong>Type</strong></td>
401
- <td>Memory engine + MCP server</td>
402
- <td>Memory layer API</td>
403
- <td>Full agent runtime</td>
404
- <td>Personal AI</td>
405
- <td>Memory API + app</td>
406
- <td>Team memory hub (LLM proxy)</td>
407
- <td>Vector memory (OSS)</td>
408
- <td>Memory engine (Oracle DB)</td>
409
- <td>Memory system</td>
410
- <td>Static file</td>
411
- </tr>
412
- <tr>
413
- <td><strong>Retrieval R@5</strong></td>
414
- <td><strong>95.2%</strong></td>
415
- <td>68.5% (LoCoMo)</td>
416
- <td>83.2% (LoCoMo)</td>
417
- <td>N/A</td>
418
- <td>Self-reported</td>
419
- <td>PersonaMem 76% (self-reported)</td>
420
- <td>~96.6% (self-reported)</td>
421
- <td>94.4% (self-reported)</td>
422
- <td>N/A</td>
423
- <td>N/A (grep)</td>
424
- </tr>
425
- <tr>
426
- <td><strong>Auto-capture</strong></td>
427
- <td>12 hooks (zero manual effort)</td>
428
- <td>Manual <code>add()</code> calls</td>
429
- <td>Agent self-edits</td>
430
- <td>Manual</td>
431
- <td>API-side extraction</td>
432
- <td>Proxy interception (base-URL swap)</td>
433
- <td>Manual</td>
434
- <td>API extraction</td>
435
- <td>Manual</td>
436
- <td>Manual editing</td>
437
- </tr>
438
- <tr>
439
- <td><strong>Search</strong></td>
440
- <td>BM25 + Vector + Graph (RRF fusion)</td>
441
- <td>Vector + Graph</td>
442
- <td>Vector (archival)</td>
443
- <td>Semantic</td>
444
- <td>Vector + RAG</td>
445
- <td>4 asset types (Chat / Skill / Wiki / CodeGraph)</td>
446
- <td>Vector-only</td>
447
- <td>Vector + semantic</td>
448
- <td>Decay-weighted</td>
449
- <td>Loads everything into context</td>
450
- </tr>
451
- <tr>
452
- <td><strong>Multi-agent</strong></td>
453
- <td>MCP + REST + leases + signals</td>
454
- <td>API (no coordination)</td>
455
- <td>Within Letta runtime only</td>
456
- <td>No</td>
457
- <td>No</td>
458
- <td>Team roles + shared assets</td>
459
- <td>No</td>
460
- <td>Scoped only</td>
461
- <td>Multi-agent shared</td>
462
- <td>Per-agent files</td>
463
- </tr>
464
- <tr>
465
- <td><strong>Framework lock-in</strong></td>
466
- <td>None (any MCP client)</td>
467
- <td>None</td>
468
- <td>High (must use Letta)</td>
469
- <td>Standalone</td>
470
- <td>None</td>
471
- <td>Proxy fronts every model call</td>
472
- <td>None</td>
473
- <td>Oracle Database</td>
474
- <td>None</td>
475
- <td>Per-agent format</td>
476
- </tr>
477
- <tr>
478
- <td><strong>External deps</strong></td>
479
- <td>No separate database service required</td>
480
- <td>Qdrant / pgvector</td>
481
- <td>Postgres + vector DB</td>
482
- <td>Multiple</td>
483
- <td>Managed cloud</td>
484
- <td>Docker stack (Core + Hub + Proxy)</td>
485
- <td>Vector store</td>
486
- <td>Oracle AI Database</td>
487
- <td>None</td>
488
- <td>None</td>
489
- </tr>
490
- <tr>
491
- <td><strong>Memory lifecycle</strong></td>
492
- <td>4-tier consolidation + decay + auto-forget</td>
493
- <td>Passive extraction</td>
494
- <td>Agent-managed</td>
495
- <td>Manual</td>
496
- <td>Auto-forget</td>
497
- <td>Manual review; auto-routing in progress</td>
498
- <td>None</td>
499
- <td>Not stated</td>
500
- <td>Decay + consolidation</td>
501
- <td>Manual pruning</td>
502
- </tr>
503
- <tr>
504
- <td><strong>Token efficiency</strong></td>
505
- <td>~1,900 tokens/session ($10/yr)</td>
506
- <td>Varies by integration</td>
507
- <td>Core memory in context</td>
508
- <td>Varies</td>
509
- <td>Cloud pricing</td>
510
- <td>Not stated</td>
511
- <td>No token budget</td>
512
- <td>LLM-backed (varies)</td>
513
- <td>Varies</td>
514
- <td>22K+ tokens at 240 obs</td>
515
- </tr>
516
- <tr>
517
- <td><strong>Real-time viewer</strong></td>
518
- <td>Yes (port 3113)</td>
519
- <td>Cloud dashboard</td>
520
- <td>Cloud dashboard</td>
521
- <td>Web UI</td>
522
- <td>Cloud dashboard</td>
523
- <td>Hub web UI</td>
524
- <td>No</td>
525
- <td>No</td>
526
- <td>No</td>
527
- <td>No</td>
528
- </tr>
529
- <tr>
530
- <td><strong>Self-hosted</strong></td>
531
- <td>Yes (default)</td>
532
- <td>Optional</td>
533
- <td>Optional</td>
534
- <td>Yes</td>
535
- <td>No (cloud-only)</td>
536
- <td>Yes (Docker)</td>
537
- <td>Yes</td>
538
- <td>Yes (Oracle DB)</td>
539
- <td>Yes</td>
540
- <td>Yes</td>
541
- </tr>
542
- </table>
543
-
544
- <sub>Benchmark note: only agentmemory's R@5 is our own measured result (LongMemEval-S, reproducible from <a href="benchmark/COMPARISON.md"><code>benchmark/COMPARISON.md</code></a>). The mem0 and Letta figures are their published LoCoMo numbers (a different dataset); the MemPalace, supermemory, TencentDB (PersonaMem), and oracleagentmemory figures are vendor self-reported claims we have not independently reproduced (oracleagentmemory's run used GPT-5.5 against an Oracle AI Database). Shown side by side for ballpark only, not a head-to-head on identical data. Star counts are approximate and drift over time.</sub>
361
+ **AgentMemory is built for the coding workflow you already have.** Capture supported agent activity automatically, share project history across tools, retrieve scoped memories, and inspect the original sources in a local viewer. Lessons, actions, versioned memories and import/export ship in the Apache-2.0 project; keyword recall needs no account or model API key.
545
362
 
546
- **Newer entrants** worth knowing, compared in depth in [`benchmark/COMPARISON.md`](benchmark/COMPARISON.md):
363
+ Choose by workload and deployment. Other products also offer local deployment or agent plugins, so those alone are not useful differentiators.
547
364
 
548
- | System | ⭐ | Angle |
549
- |--------|---|-------|
550
- | Zep / Graphiti | 30K | Temporal knowledge graph; strongest published temporal-query results (LongMemEval 63.8%), but graph builds asynchronously so fresh facts can lag |
551
- | Cognee | 30K | Document-to-knowledge-graph ingestion, Python-only, built for structured entity extraction rather than session capture |
365
+ | Project | Best starting point for |
366
+ |---|---|
367
+ | **AgentMemory** | Shared local memory for existing coding agents, automatic capture, scoped recall and a live viewer |
368
+ | [Mem0](https://docs.mem0.ai/introduction) | Memory APIs, hosted or self-hosted, with SDKs and agent plugins |
369
+ | [Supermemory](https://supermemory.ai/docs/self-hosting/overview) | Memory and document context through a hosted API or local server |
370
+ | [Zep / Graphiti](https://github.com/getzep/graphiti) | Enterprise context and temporal knowledge graphs |
371
+ | [Letta](https://docs.letta.com/) | Building stateful agents with their own managed memory |
372
+ | [Cognee](https://github.com/topoteretes/cognee) | Turning documents, code and conversations into searchable knowledge |
373
+ | [claude-mem](https://github.com/thedotmack/claude-mem) | Capturing and summarizing coding sessions across supported agents |
552
374
 
553
- AgentMemory combines coding-agent capture, searchable project history and a local viewer, with keyless operation available from the first run.
375
+ [Detailed comparison and sources](benchmark/COMPARISON.md), checked 2026-10-28. Deployment options, provider costs and integrations vary; scores from different datasets and metrics are not a head-to-head ranking.
554
376
 
555
377
  ---
556
378
 
@@ -661,10 +483,13 @@ agentmemory connect claude-code --with-hooks
661
483
  ```
662
484
 
663
485
  This merges the same hook commands into `~/.claude/settings.json` with absolute paths resolved to the bundled `plugin/` directory of the currently installed `@agentmemory/agentmemory` package. Re-run the command after upgrading agentmemory to refresh the paths. User entries in the same file are preserved; only previous agentmemory entries are replaced. Using the `/plugin install` path remains the recommended approach.
664
- For remote or protected deployments, launch Claude Code with `AGENTMEMORY_URL` and `AGENTMEMORY_SECRET` set. The plugin passes both values through to its bundled MCP server; when `AGENTMEMORY_URL` is empty, the MCP shim uses `http://localhost:3111`.
486
+
487
+ For a remote server with the plugin, enter its `https://` URL and secret in the plugin settings that Claude Code asks for when you enable the plugin. The hooks and the bundled MCP server read both from there. With the URL setting empty, they use `AGENTMEMORY_URL` from your environment, then `http://localhost:3111`; with the secret setting empty, they send only the local server's own secret, and only to a loopback address. With `agentmemory connect claude-code` there are no plugin settings: set `AGENTMEMORY_URL` and `AGENTMEMORY_SECRET` in the environment that starts Claude Code.
665
488
 
666
489
  ### Codex CLI (Codex plugin platform)
667
490
 
491
+ Agent Memory is listed in the [OpenAI plugin directory](https://chatgpt.com/plugins/plugins_6ac50a1b89948191906ff15c72357972). That listing adds the 17 skills only. Start the memory server and wire its MCP server with `agentmemory connect codex` so the skills can call the memory tools. For the MCP server, hooks and skills in one plugin, use the repository marketplace below.
492
+
668
493
  ```bash
669
494
  # 1. start the memory server in a separate terminal
670
495
  npx -y @agentmemory/agentmemory@latest
@@ -735,59 +560,47 @@ Pi also supports an installable `@agentmemory/pi` package. See the [Pi package g
735
560
 
736
561
  Guides: [Pi](integrations/pi/), [Oh My Pi](integrations/omp/), [DSH](docs/dsh.md).
737
562
 
738
- <details>
739
- <summary><b>OpenClaw (paste this prompt)</b></summary>
563
+ ### OpenClaw (ClawHub)
740
564
 
741
- ```text
742
- Install agentmemory for OpenClaw. Run `npx -y @agentmemory/agentmemory@latest` in a separate terminal to start the memory server on localhost:3111. Then add this to my OpenClaw MCP config so agentmemory is available with all 54 memory tools:
565
+ agentmemory is listed on ClawHub: [clawhub.ai/plugins/agentmemory](https://clawhub.ai/plugins/agentmemory).
743
566
 
744
- {
745
- "mcpServers": {
746
- "agentmemory": {
747
- "command": "npx",
748
- "args": ["-y", "@agentmemory/mcp"],
749
- "env": {
750
- "AGENTMEMORY_URL": "http://localhost:3111"
751
- }
752
- }
753
- }
754
- }
567
+ ```bash
568
+ # 1. start the memory server in a separate terminal
569
+ npx -y @agentmemory/agentmemory@latest
755
570
 
756
- Restart OpenClaw. Verify with `curl http://localhost:3111/agentmemory/health`. Open http://localhost:3113 for the real-time viewer. For deeper memory-slot integration, copy `integrations/openclaw` to `~/.openclaw/extensions/agentmemory` and enable `plugins.slots.memory = "agentmemory"` in `~/.openclaw/openclaw.json`.
571
+ # 2. install the plugin from ClawHub
572
+ openclaw plugins install clawhub:agentmemory
757
573
  ```
758
574
 
759
- Full guide: [`integrations/openclaw/`](integrations/openclaw/)
760
-
761
- </details>
575
+ Then select agentmemory as the memory plugin and allow it to read conversations in `~/.openclaw/openclaw.json`: set `plugins.slots.memory` to `"agentmemory"` and `plugins.entries.agentmemory.hooks.allowConversationAccess` to `true`. Without conversation access, capture is blocked. Restart OpenClaw and run `openclaw config validate`.
762
576
 
763
- <details>
764
- <summary><b>Hermes Agent (paste this prompt)</b></summary>
577
+ `agentmemory connect openclaw` does the same from an installed package: it installs the plugin and skills, selects the memory slot and grants conversation access. Add `--with-mcp` for the full MCP tool set. Full guide: [`integrations/openclaw/`](integrations/openclaw/).
765
578
 
766
- ```text
767
- Install agentmemory for Hermes. Run `npx -y @agentmemory/agentmemory@latest` in a separate terminal to start the memory server on localhost:3111. Then add this to ~/.hermes/config.yaml so Hermes can use agentmemory as an MCP server with all 54 memory tools:
579
+ ### Hermes Agent (Hermes plugin catalog)
768
580
 
769
- mcp_servers:
770
- agentmemory:
771
- command: npx
772
- args: ["-y", "@agentmemory/mcp"]
581
+ agentmemory is listed in the Hermes plugin catalog: [hermes-agent.nousresearch.com/marketplace/agentmemory](https://hermes-agent.nousresearch.com/marketplace/agentmemory).
773
582
 
774
- memory:
775
- provider: agentmemory
583
+ ```bash
584
+ # 1. start the memory server in a separate terminal
585
+ npx -y @agentmemory/agentmemory@latest
776
586
 
777
- Verify with `curl http://localhost:3111/agentmemory/health`. Open http://localhost:3113 for the real-time viewer. For deeper 6-hook memory provider integration (pre-LLM context injection, turn capture, MEMORY.md mirroring, system prompt block), copy integrations/hermes from the agentmemory repo to ~/.hermes/plugins/agentmemory.
587
+ # 2. install the reviewed catalog entry, then select it as the memory provider
588
+ hermes plugins install agentmemory
589
+ hermes memory setup
590
+ hermes memory status
778
591
  ```
779
592
 
780
- Full guide: [`integrations/hermes/`](integrations/hermes/)
593
+ In `hermes memory setup`, select AgentMemory and enter the server URL and its secret. Hermes Desktop can install it from the link `hermes://plugin/install?catalog=agentmemory`. The catalog installs the commit that Hermes reviewed, so it can lag the latest npm release.
781
594
 
782
- </details>
595
+ `agentmemory connect hermes` installs the provider and the bundled skills from the installed package instead. Add `--with-mcp` for the full MCP tool set. Full guide: [`integrations/hermes/`](integrations/hermes/).
783
596
 
784
597
  ### Other agents
785
598
 
786
599
  Start the memory server: `npx -y @agentmemory/agentmemory@latest`
787
600
 
788
- #### Native skills via `npx skills add` (50+ agents)
601
+ #### Native skills via `npx skills add`
789
602
 
790
- agentmemory ships 17 skills in the Claude-Code-style `<dir>/SKILL.md` format: 9 invocable action skills (`remember`, `recall`, `recap`, `handoff`, `forget`, `lesson`, `commit-context`, `commit-history`, `session-history`) and 8 reference skills the agent loads on demand (`memory-discipline`, `agentmemory-mcp-tools`, `agentmemory-rest-api`, `agentmemory-config`, `agentmemory-agents`, `agentmemory-hooks`, `agentmemory-architecture`, `write-agentmemory-skill`). The reference skills carry data tables generated from source, so they never drift. The [`skills`](https://npmjs.com/package/skills) CLI by vercel-labs auto-installs them into the calling agent's native skill directory across 50+ agents (Claude Code, Cursor, Cline, Continue, Droid, Warp, Codex, Antigravity, Kiro, OpenCode, Goose, Roo, Trae, Windsurf, and more):
603
+ agentmemory ships 17 skills in the Claude-Code-style `<dir>/SKILL.md` format: 9 invocable action skills (`remember`, `recall`, `recap`, `handoff`, `forget`, `lesson`, `commit-context`, `commit-history`, `session-history`) and 8 reference skills the agent loads on demand (`memory-discipline`, `agentmemory-mcp-tools`, `agentmemory-rest-api`, `agentmemory-config`, `agentmemory-agents`, `agentmemory-hooks`, `agentmemory-architecture`, `write-agentmemory-skill`). The reference skills carry data tables generated from source, so they never drift. The [`skills`](https://npmjs.com/package/skills) CLI by vercel-labs auto-installs them into the calling agent's native skill directory across supported agents (Claude Code, Cursor, Cline, Continue, Droid, Warp, Codex, Antigravity, Kiro, OpenCode, Goose, Roo, Trae, Windsurf, and more):
791
604
 
792
605
  ```bash
793
606
  npx skills add rohitg00/agentmemory -y # auto-detects the calling agent
@@ -831,20 +644,21 @@ The agentmemory entry is the **same MCP server block** across every host that us
831
644
  | **Gemini CLI** | `~/.gemini/settings.json` | `gemini mcp add agentmemory npx -y @agentmemory/mcp --scope user` (auto-merges). |
832
645
  | **GitHub Copilot CLI (MCP only)** | `~/.copilot/mcp-config.json` | `agentmemory connect copilot-cli` merges `mcpServers.agentmemory`; Copilot picks it up on next launch or `/mcp`. |
833
646
  | **GitHub Copilot CLI (full plugin)** | Copilot plugin install | `copilot plugin install rohitg00/agentmemory:plugin` for the plugin from the GitHub subdir. |
834
- | **OpenClaw** | OpenClaw MCP config | Same `mcpServers` block. Deeper: `openclaw plugins install ./integrations/openclaw` claims OpenClaw's memory slot (auto-switches from `memory-core`); set `plugins.entries.agentmemory.hooks.allowConversationAccess=true` or turn capture is silently blocked. See [`integrations/openclaw`](integrations/openclaw/). |
647
+ | **OpenClaw** | `~/.openclaw/openclaw.json` | `openclaw plugins install clawhub:agentmemory` installs the [ClawHub listing](https://clawhub.ai/plugins/agentmemory); `agentmemory connect openclaw` installs the same plugin and also selects `plugins.slots.memory` and grants `hooks.allowConversationAccess`, without which capture is blocked. Add `--with-mcp` for the full tool set. See [`integrations/openclaw`](integrations/openclaw/). |
835
648
  | **Codex CLI (MCP only)** | `.codex/config.toml` | TOML shape: `codex mcp add agentmemory -- npx -y @agentmemory/mcp`, or add `[mcp_servers.agentmemory]` manually. |
649
+ | **Codex CLI (skills, official listing)** | [OpenAI plugin directory](https://chatgpt.com/plugins/plugins_6ac50a1b89948191906ff15c72357972) | Adds the 17 skills. Pair it with `agentmemory connect codex` for the MCP server. |
836
650
  | **Codex CLI (full plugin)** | Codex plugin marketplace | `codex plugin marketplace add rohitg00/agentmemory` then `codex plugin add agentmemory@agentmemory`. Registers MCP + 6 lifecycle hooks + 17 skills. Trust hooks and verify capture in your host; see [Codex setup and validation](docs/plugins/codex-local.md). |
837
651
  | **OpenCode (MCP only)** | `opencode.json` | Different shape: top-level `mcp` key, command as array: `{"mcp": {"agentmemory": {"type": "local", "command": ["npx", "-y", "@agentmemory/mcp"], "enabled": true}}}`. |
838
652
  | **OpenCode (full plugin)** | `plugin/opencode/` | 22 auto-capture hooks covering session lifecycle, messages, tools, errors. Project attribution is per-session, so one OpenCode process spanning several repositories files each session under its own project. Two slash commands (`/recall`, `/remember`). Copy `plugin/opencode/` into your OpenCode workspace and add the plugin entry to `opencode.json`. See [`plugin/opencode/README.md`](plugin/opencode/README.md) for the full hook table + gap analysis. |
839
653
  | **pi** | Active Pi agent directory, default `~/.pi/agent` | `agentmemory connect pi --with-mcp` installs native recall/capture, offline replay, 17 skills and the full MCP toolset. Or build `integrations/pi` and use `pi install ./integrations/pi`; after npm publication, `pi install npm:@agentmemory/pi`. Use one method and run `/reload`. See [setup and migration](integrations/pi/). |
840
654
  | **Oh My Pi (OMP)** | Active OMP agent directory, default `~/.omp/agent/config.yml` | `agentmemory connect omp --with-mcp` installs native recall/capture, offline replay, 17 skills and the full MCP toolset. Restart OMP and run `/agentmemory-status`. See [setup, profiles and commands](integrations/omp/). |
841
- | **Hermes Agent** | `$HERMES_HOME/config.yaml`, default `~/.hermes/config.yaml` | `agentmemory connect hermes` installs the native provider and skills. Configure its scoped credentials with `hermes memory setup`. Add `--with-mcp` for the wider tool surface. See [setup and scope](integrations/hermes/). |
655
+ | **Hermes Agent** | `$HERMES_HOME/config.yaml`, default `~/.hermes/config.yaml` | `hermes plugins install agentmemory` installs the [Hermes catalog entry](https://hermes-agent.nousresearch.com/marketplace/agentmemory) at its reviewed commit. `agentmemory connect hermes` installs the native provider and skills. Configure its scoped credentials with `hermes memory setup`. Add `--with-mcp` for the wider tool surface. See [setup and scope](integrations/hermes/). |
842
656
  | **Qwen Code** | `~/.qwen/settings.json` | `agentmemory connect qwen` writes the standard `mcpServers` block. Hook payload is field-compatible with Claude Code, so the existing 12-hook scripts work without modification; wire them via the `hooks` section in the same `settings.json`. |
843
657
  | **Antigravity IDE / 2.0** | `~/.gemini/config/mcp_config.json` | `agentmemory connect antigravity --with-hooks` installs MCP and capture hooks in the shared customization directory. See [Antigravity setup and limits](docs/plugins/antigravity.md). |
844
658
  | **Antigravity CLI** (`agy`) | `~/.gemini/config/mcp_config.json` | `agentmemory connect antigravity-cli --with-hooks` uses the same MCP and hook configuration as current IDE versions. Existing installations should refresh with `--force`; see the [upgrade notes](docs/plugins/antigravity.md). |
845
659
  | **Kiro** | `~/.kiro/settings/mcp.json` | `agentmemory connect kiro` writes the user-level config. Workspace overrides go in `.kiro/settings/mcp.json` next to your code. |
846
- | **Warp** | `~/.warp/.mcp.json` | `agentmemory connect warp` writes the standard `mcpServers` block. Warp also auto-discovers skills from `.claude/skills/`; once the Claude Code plugin is installed the 8 agentmemory skills (`remember`, `recall`, `recap`, `handoff`, `forget`, `commit-context`, `commit-history`, `session-history`) appear natively in Warp's slash-command palette. |
847
- | **Cline (CLI)** | `~/.cline/mcp.json` | `agentmemory connect cline` writes the standard `mcpServers` block. VS Code extension users: paste the same block via Cline Settings → MCP Servers → Edit JSON. |
660
+ | **Warp** | `~/.warp/.mcp.json` | `agentmemory connect warp` writes the standard `mcpServers` block. Warp also auto-discovers skills from `.claude/skills/`; once the Claude Code plugin is installed the 9 agentmemory skills (`remember`, `recall`, `recap`, `handoff`, `forget`, `lesson`, `commit-context`, `commit-history`, `session-history`) appear natively in Warp's slash-command palette. |
661
+ | **Cline (CLI)** | `~/.cline/data/settings/cline_mcp_settings.json` | `agentmemory connect cline` writes the standard `mcpServers` block. Set `CLINE_MCP_SETTINGS_PATH` to use another settings file. VS Code extension users: paste the same block via Cline Settings → MCP Servers → Edit JSON. |
848
662
  | **Continue.dev** | `~/.continue/config.yaml` (preferred) or `config.json` (legacy) | `agentmemory connect continue` creates `config.yaml` from scratch when neither exists, or modifies existing `config.json`. **If you already have `config.yaml`** the adapter prints the exact block to paste under `mcpServers:`; it won't silently rewrite your yaml so your existing comments and anchors are preserved. Continue uses array form (not object) for `mcpServers`. |
849
663
  | **Zed** | `~/.config/zed/settings.json` | `agentmemory connect zed` writes under `context_servers` (Zed's key, NOT `mcpServers`). Remote MCP servers can be wired via `{"url": "..."}` instead. |
850
664
  | **Droid (Factory.ai)** | `~/.factory/mcp.json` | `agentmemory connect droid` writes the standard `mcpServers` block. Project-scoped overrides go in `<repo>/.factory/mcp.json`. Pass `--with-hooks` for native auto-capture. |
@@ -936,15 +750,15 @@ Session 2: "Now add rate limiting"
936
750
 
937
751
  ### vs built-in agent memory
938
752
 
939
- Every AI coding agent ships with built-in memory: Claude Code has `MEMORY.md`, Cursor has notepads, Cline has memory bank. These work like sticky notes. agentmemory is the searchable database behind the sticky notes.
753
+ Agent instructions and memory files remain useful for stable project guidance. AgentMemory adds searchable session history, source-linked memories and coordination across connected agents.
940
754
 
941
755
  | | Built-in (CLAUDE.md) | agentmemory |
942
756
  |---|---|---|
943
757
  | Upkeep | Manually curated instructions | Indexed session history and memories |
944
758
  | Search | Loads everything into context | BM25 + vector + graph (top-K only) |
945
- | Token cost | 22K+ at 240 observations | ~1,900 tokens (92% less) |
759
+ | Context budget | Depends on the files included | Configurable recall budget with source expansion |
946
760
  | Cross-agent | Per-agent files | MCP + REST (any agent) |
947
- | Coordination | None | Leases, signals, actions, routines |
761
+ | Coordination | Depends on the agent | Leases, signals, actions, routines |
948
762
  | Observability | Read files manually | Real-time viewer on :3113 |
949
763
 
950
764
  ---
@@ -955,7 +769,7 @@ Every AI coding agent ships with built-in memory: Claude Code has `MEMORY.md`, C
955
769
 
956
770
  ```text
957
771
  PostToolUse hook fires
958
- -> SHA-256 dedup (5min window)
772
+ -> Stable event ID, durable capture inbox, offline spool when unavailable
959
773
  -> Privacy filter (strip secrets, API keys)
960
774
  -> Store raw observation
961
775
  -> Synthetic compression by default
@@ -964,7 +778,7 @@ PostToolUse hook fires
964
778
  -> Index in BM25, plus vectors when enabled
965
779
 
966
780
  Stop / SessionEnd hook fires
967
- -> Summarize session
781
+ -> Incremental summary when new observations are available
968
782
  -> Knowledge graph extraction (if GRAPH_EXTRACTION_ENABLED=true)
969
783
  -> Slot reflection (if AGENTMEMORY_SLOTS=true and AGENTMEMORY_REFLECT=true)
970
784
 
@@ -1044,7 +858,9 @@ Fused with Reciprocal Rank Fusion (RRF, k=60) and session-diversified (max 3 res
1044
858
 
1045
859
  When a vector index is populated, `mem::search` (behind `memory_recall`) uses the hybrid BM25 + vector ranker. Without embeddings it uses BM25. `smart-search` can additionally fuse structural graph matches when graph data exists, including in keyless mode. Lesson recall runs on a dedicated in-memory BM25 index instead of scanning the whole corpus per query. Superseded memory versions are excluded from every recall path; the version chain keeps their history.
1046
860
 
1047
- Vectors survive a crash or force-kill. The vector index is saved in buckets at most every `AGENTMEMORY_INDEX_SAVE_INTERVAL_MS` (10 minutes). Every vector added or removed in between is also written right away to a small pending log in the state store, and the next start replays it without calling the embedding provider. Each successful save empties the log. Documents that still have no vector after the replay are re-embedded in the background in batches of `AGENTMEMORY_VECTOR_BACKFILL_MAX` (500) until none are left, and a backfill that is stopped continues at the next start. `/agentmemory/status` and the viewer show the pending log size and the backfill state. Keyless installs write nothing.
861
+ Filtered `memory_recall` expands its ranked candidate window until it fills the requested result limit, exhausts the candidate source, or reaches 1,000 candidates. This bound limits work for queries with many unrelated matches. Results can contain fewer items when qualifying records rank below that budget.
862
+
863
+ Vectors survive a crash or force-kill. The vector index is saved in buckets at most every `AGENTMEMORY_INDEX_SAVE_INTERVAL_MS` (10 minutes). Every vector added or removed in between is also written right away to a small pending log in the state store, and the next start replays it without calling the embedding provider. Each successful save empties the log. For older documents without vectors, `AGENTMEMORY_VECTOR_BACKFILL=all` opts into a bounded backfill at startup, capped by `AGENTMEMORY_VECTOR_BACKFILL_MAX` (500). Keep the opt-in set across restarts to process more documents. See [source and vector recovery](docs/reliability/source-and-vector-recovery.md). `/agentmemory/status` and the viewer show the pending log size and the backfill state. Keyless installs write nothing.
1048
864
 
1049
865
  BM25 tokenizes Greek, Cyrillic, Hebrew, Arabic, and accented Latin out of the box. For Chinese / Japanese / Korean memories, install the optional segmenters (`npm install @node-rs/jieba tiny-segmenter`) to split CJK runs into word-level tokens; without them, agentmemory soft-falls to whole-run tokenization and prints a one-time hint on stderr.
1050
866
 
@@ -1056,13 +872,13 @@ Keyless installs disable vector embeddings: `mem::search` uses BM25, while `smar
1056
872
  EMBEDDING_PROVIDER=local
1057
873
  ```
1058
874
 
1059
- The normal npm install includes the optional `@huggingface/transformers` runtime. The first embedding request downloads `Xenova/all-MiniLM-L6-v2`, so it needs network access and can take longer; subsequent inference runs on-device. Remote providers are auto-detected from their keys unless `EMBEDDING_PROVIDER` overrides them.
875
+ The normal npm install includes the optional `@huggingface/transformers` runtime. The first embedding request downloads `Xenova/all-MiniLM-L6-v2`, so it needs network access and can take longer; subsequent inference runs on-device. Remote embedding providers run only when `EMBEDDING_PROVIDER` names one of them (`gemini`, `openai`, `voyage`, `cohere`, `openrouter`) and its key is set. A key on its own never turns on remote embeddings.
1060
876
 
1061
877
  | Provider | Model | Cost | Notes |
1062
878
  |---|---|---|---|
1063
- | **Local (recommended opt-in)** | `all-MiniLM-L6-v2` | Free | On-device after the first model download, +8pp recall over BM25-only |
879
+ | **Local (recommended opt-in)** | `all-MiniLM-L6-v2` | Free | On-device after the first model download |
1064
880
  | Gemini | `gemini-embedding-001` | Free tier | 100+ languages, 768/1536/3072 dims (MRL), 2048-token input. Replaces `text-embedding-004` ([deprecated, shutdown Jan 14, 2026](https://ai.google.dev/gemini-api/docs/deprecations)) |
1065
- | OpenAI | `text-embedding-3-small` | $0.02/1M | Highest quality |
881
+ | OpenAI | `text-embedding-3-small` | [Provider pricing](https://openai.com/api/pricing/) | Remote embeddings |
1066
882
  | Voyage AI | `voyage-code-3` | Paid | Optimized for code |
1067
883
  | Cohere | `embed-english-v3.0` | Free trial | General purpose |
1068
884
  | OpenRouter | Any model | Varies | Multi-model proxy |
@@ -1077,7 +893,7 @@ The normal npm install includes the optional `@huggingface/transformers` runtime
1077
893
 
1078
894
  ### 54 Tools
1079
895
 
1080
- Three tool surfaces, smallest to largest: `AGENTMEMORY_TOOLS=core` trims visibility to 8 essentials (`memory_save`, `memory_recall`, `memory_consolidate`, `memory_smart_search`, `memory_sessions`, `memory_diagnose`, `memory_lesson_save`, `memory_reflect`); the base set below is the registry's 14 foundational tools; the default (`AGENTMEMORY_TOOLS=all`) exposes all 54.
896
+ Three tool surfaces, smallest to largest: `AGENTMEMORY_TOOLS=core` trims visibility to 8 essentials (`memory_save`, `memory_recall`, `memory_consolidate`, `memory_smart_search`, `memory_sessions`, `memory_diagnose`, `memory_lesson_save`, `memory_reflect`); the base set below is the registry's 14 foundational tools; the default (`AGENTMEMORY_TOOLS=all`) exposes all 54, minus the 6 `memory_slot_*` tools until `AGENTMEMORY_SLOTS=true`.
1081
897
 
1082
898
  <details>
1083
899
  <summary>Base tools (14)</summary>
@@ -1234,17 +1050,17 @@ The viewer server binds to `127.0.0.1` by default and attaches the server secret
1234
1050
 
1235
1051
  ### LLM Providers
1236
1052
 
1237
- agentmemory auto-detects providers from your environment. A provider makes LLM-backed operations available, but provider configuration alone does not enable LLM-written observation compression. That path requires both a provider and `AGENTMEMORY_AUTO_COMPRESS=true`.
1053
+ agentmemory sends session content to an LLM only after you select a provider with `AGENTMEMORY_LLM_PROVIDER`, or turn on the Claude Agent SDK fallback with `AGENTMEMORY_ALLOW_AGENT_SDK=true`. A key that exists in your environment for another tool is never enough. A selected provider makes LLM-backed operations available (session summaries, consolidation, reflection), but it does not enable LLM-written observation compression on its own. That path also requires `AGENTMEMORY_AUTO_COMPRESS=true`.
1238
1054
 
1239
1055
  | Provider | Config | Notes |
1240
1056
  |----------|--------|-------|
1241
1057
  | **No-op (default)** | No config needed | LLM-backed compress/summarize is disabled. Synthetic compression and BM25 recall still work. See `AGENTMEMORY_ALLOW_AGENT_SDK` below if you used to rely on the Claude-subscription fallback. |
1242
- | Anthropic API | `ANTHROPIC_API_KEY` | Per-token billing |
1243
- | MiniMax | `MINIMAX_API_KEY` | Anthropic-compatible |
1244
- | Gemini | `GEMINI_API_KEY` | Also enables embeddings |
1245
- | OpenRouter | `OPENROUTER_API_KEY` | Any model |
1246
- | OpenAI API | `OPENAI_API_KEY` | Default `gpt-5.6-luna`, override with `OPENAI_MODEL` |
1247
- | **Local (Ollama / LM Studio / vLLM / llama.cpp)** | `OPENAI_API_KEY=local` + `OPENAI_BASE_URL=http://localhost:11434/v1` (Ollama) or `http://localhost:1234/v1` (LM Studio) + `OPENAI_MODEL=<your model>` | Anything OpenAI-API-compatible. Zero cost, runs on your hardware. See [Local models](#local-models-ollama--lm-studio--vllm) below. |
1058
+ | Anthropic API | `AGENTMEMORY_LLM_PROVIDER=anthropic` + `ANTHROPIC_API_KEY` | Per-token billing |
1059
+ | MiniMax | `AGENTMEMORY_LLM_PROVIDER=minimax` + `MINIMAX_API_KEY` | Anthropic-compatible |
1060
+ | Gemini | `AGENTMEMORY_LLM_PROVIDER=gemini` + `GEMINI_API_KEY` | Gemini embeddings need `EMBEDDING_PROVIDER=gemini` as well |
1061
+ | OpenRouter | `AGENTMEMORY_LLM_PROVIDER=openrouter` + `OPENROUTER_API_KEY` | Any model |
1062
+ | OpenAI API | `AGENTMEMORY_LLM_PROVIDER=openai` + `OPENAI_API_KEY` | Default `gpt-5.6-luna`, override with `OPENAI_MODEL` |
1063
+ | **Local (Ollama / LM Studio / vLLM / llama.cpp)** | `AGENTMEMORY_LLM_PROVIDER=openai` + `OPENAI_API_KEY=local` + `OPENAI_BASE_URL=http://localhost:11434/v1` (Ollama) or `http://localhost:1234/v1` (LM Studio) + `OPENAI_MODEL=<your model>` | Anything OpenAI-API-compatible. Zero cost, runs on your hardware. See [Local models](#local-models-ollama--lm-studio--vllm) below. |
1248
1064
  | Claude subscription fallback | `AGENTMEMORY_ALLOW_AGENT_SDK=true` | Opt-in only. Spawns `@anthropic-ai/claude-agent-sdk` sessions; it used to cause unbounded Stop-hook recursion, so it is no longer the default. |
1249
1065
 
1250
1066
  ### Local models (Ollama / LM Studio / vLLM)
@@ -1260,6 +1076,7 @@ ollama serve
1260
1076
 
1261
1077
  ```env
1262
1078
  # ~/.agentmemory/.env
1079
+ AGENTMEMORY_LLM_PROVIDER=openai
1263
1080
  OPENAI_API_KEY=ollama # any non-empty string; Ollama ignores it
1264
1081
  OPENAI_BASE_URL=http://localhost:11434/v1
1265
1082
  OPENAI_MODEL=qwen3:8b
@@ -1271,6 +1088,7 @@ Open LM Studio → Local Server tab → Start Server. Pick any chat model from t
1271
1088
 
1272
1089
  ```env
1273
1090
  # ~/.agentmemory/.env
1091
+ AGENTMEMORY_LLM_PROVIDER=openai
1274
1092
  OPENAI_API_KEY=lmstudio # any non-empty string; LM Studio ignores it
1275
1093
  OPENAI_BASE_URL=http://localhost:1234/v1
1276
1094
  OPENAI_MODEL=qwen3-8b # match the model name from LM Studio
@@ -1343,7 +1161,7 @@ The default file store needs no separate database service. Redis is optional wit
1343
1161
 
1344
1162
  ### Config File
1345
1163
 
1346
- Put agentmemory runtime configuration in `~/.agentmemory/.env` instead of exporting variables in every shell. If the viewer shows a setup hint like `export ANTHROPIC_API_KEY=...`, copy it into this file as `ANTHROPIC_API_KEY=...` without the `export` prefix, then restart agentmemory. Set `AGENTMEMORY_ENV_FILE` to use another env-file path.
1164
+ Put agentmemory runtime configuration in `~/.agentmemory/.env` instead of exporting variables in every shell. If the viewer shows a setup hint like `export ANTHROPIC_API_KEY=...`, copy it into this file as `ANTHROPIC_API_KEY=...` without the `export` prefix, add `AGENTMEMORY_LLM_PROVIDER=anthropic` to select it, then restart agentmemory. Set `AGENTMEMORY_ENV_FILE` to use another env-file path.
1347
1165
 
1348
1166
  Process environment variables take precedence over values in the file. Restart the server after changing its configuration.
1349
1167
 
@@ -1363,7 +1181,7 @@ AGENTMEMORY_AUTO_COMPRESS=true
1363
1181
 
1364
1182
  LLM-written observation compression requires both lines: access to an LLM provider (including this explicit subscription fallback) and `AGENTMEMORY_AUTO_COMPRESS=true`. A provider by itself leaves the default synthetic compression path in place.
1365
1183
 
1366
- Consolidation (graph nodes, lessons, crystals) is on by default whenever an LLM provider is configured. Explicitly opt out with `CONSOLIDATION_ENABLED=false` if you want LLM-free operation. Graph extraction is a separate flag:
1184
+ Consolidation (graph nodes, lessons, crystals) is on by default whenever an LLM provider is selected with `AGENTMEMORY_LLM_PROVIDER`, or the Agent SDK fallback is on with `AGENTMEMORY_ALLOW_AGENT_SDK=true`. Explicitly opt out with `CONSOLIDATION_ENABLED=false` if you want LLM-free operation. Graph extraction is a separate flag:
1367
1185
 
1368
1186
  ```env
1369
1187
  GRAPH_EXTRACTION_ENABLED=true
@@ -1381,7 +1199,11 @@ EMBEDDING_PROVIDER=local
1381
1199
  # Optional automatic context injection through the shared hooks
1382
1200
  # AGENTMEMORY_INJECT_CONTEXT=true
1383
1201
 
1384
- # Optional LLM-written compression; also requires a configured provider
1202
+ # Optional outside LLM for summaries and consolidation. A key alone does nothing;
1203
+ # this line selects the provider whose key agentmemory may use.
1204
+ # AGENTMEMORY_LLM_PROVIDER=anthropic
1205
+
1206
+ # Optional LLM-written compression; also requires AGENTMEMORY_LLM_PROVIDER
1385
1207
  # AGENTMEMORY_AUTO_COMPRESS=true
1386
1208
 
1387
1209
  # Show 8 essential MCP tools instead of the default 54
@@ -1399,7 +1221,7 @@ The complete reference is [`.env.example`](.env.example), including provider cre
1399
1221
 
1400
1222
  <h2 id="api"><picture><source media="(prefers-color-scheme: dark)" srcset="assets/tags/light/section-api.svg"><img src="assets/tags/section-api.svg" alt="API" height="32" /></picture></h2>
1401
1223
 
1402
- 146 endpoints on port `3111`. The REST API binds to `127.0.0.1` by default. Protected endpoints require `Authorization: Bearer <secret>`, and mesh sync endpoints require an explicitly set `AGENTMEMORY_SECRET` on both peers.
1224
+ 147 endpoints on port `3111`. The REST API binds to `127.0.0.1` by default. Protected endpoints require `Authorization: Bearer <secret>`, and mesh sync endpoints require an explicitly set `AGENTMEMORY_SECRET` on both peers.
1403
1225
 
1404
1226
  **Authentication is on by default.** When `AGENTMEMORY_SECRET` is not set (in the shell or in `~/.agentmemory/.env`), the CLI generates a random secret on first start and stores it at `~/.agentmemory/secret`, mirrored to the selected data directory as `secret`, with mode `0600` (the platform-specific default data directory is described above). Bundled clients read the canonical secret first when they talk to a local server: the CLI, the viewer, the hooks under `plugin/scripts`, the MCP server and the `@agentmemory/mcp` shim, the configs written by `agentmemory connect`, and the bundled OpenCode, Pi, OpenClaw, Hermes and filesystem-watcher integrations. The stored secret is only sent to loopback URLs (`localhost`, `127.0.0.0/8`, `::1`). An explicit `AGENTMEMORY_SECRET` always wins, and remote clients need the secret set in their environment. Repository-based Docker self-host deployments and the `deploy/` entrypoints generate and export their own secret. To call the API by hand:
1405
1227
 
@@ -1485,7 +1307,7 @@ curl -X POST http://localhost:3111/agentmemory/graph/compact -H "Authorization:
1485
1307
  ```bash
1486
1308
  npm run dev # Hot reload
1487
1309
  npm run build # Production build
1488
- npm test # 4,000+ tests
1310
+ npm test # 4,400+ tests
1489
1311
  npm run test:integration # API tests (requires running services)
1490
1312
  ```
1491
1313