diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 2806b98182..5b1b5de327 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -72,5 +72,7 @@ jobs:
- run: npm install --legacy-peer-deps --no-audit --no-fund
- run: npm run build
- run: npm run skills:check
+ - if: matrix.os == 'ubuntu-latest' && matrix.node-version == 22
+ run: npm run docs:check
- run: npx tsc --noEmit --project tsconfig.eval.json
- run: npm test
diff --git a/AGENTS.md b/AGENTS.md
index c2e9d97cc5..c4ffbc28fb 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -11,7 +11,7 @@ agentmemory is a persistent memory system for AI coding agents, built on iii-eng
## Consistency Rules
-**Before every commit, run `npm run docs:sync` and commit what it changes.** It computes MCP tool counts (all, core, local fallback), REST endpoints, skills, hooks, tests, iii functions, source files, lines of code and KV scopes from the source, and rewrites them in README.md, the translated READMEs, AGENTS.md, INSTALL_FOR_AGENTS.md, plugin manifests, integration READMEs, the stat badges and the `src/index.ts` banner. The last synced values live in `scripts/docs-sync.state.json`; commit that file with the rest. `npm run docs:check` exits non-zero when anything is out of date. When the sync prints `check left in `, open that line: either fix it by hand or add its noun to the fact in `scripts/docs-sync.ts` so the next sync catches it. Never hand-edit these numbers or versions in the docs; change the source and sync.
+**Before every commit, run `npm run docs:sync` and commit what it changes.** It computes MCP tool counts (all, core, local fallback), REST endpoints, skills, hooks, tests, iii functions, source files, lines of code and KV scopes from the source, and rewrites them in README.md, the translated READMEs, AGENTS.md, INSTALL_FOR_AGENTS.md, plugin manifests, integration READMEs, the stat badges and the `src/index.ts` banner. The last synced values live in `scripts/docs-sync.state.json`; commit that file with the rest. `npm run docs:check` exits non-zero when anything is out of date. When the sync prints `check left in `, open that line: either fix it by hand or add its noun to the fact in `scripts/docs-sync.ts` so the next sync catches it. Never hand-edit these numbers or versions in the docs; change the source and sync. The same sync renders the README diagrams in `assets/diagrams/` from `scripts/readme-diagrams.ts`: their counts, ports, RRF k, token budget and per-session cap come from the source, and the check fails when a diagram names an environment variable that no longer exists in `src/`. Edit the generator, never the SVG files.
**When adding or removing MCP tools, update:**
1. `src/mcp/tools-registry.ts` — tool definition + `getAllTools()` array
@@ -101,7 +101,7 @@ Hook scripts in `src/hooks/` are standalone Node.js scripts (no iii-sdk import).
## Testing
-- Before every commit run, in order: `npm run build`, `npm run skills:gen`, `npm run docs:sync`, `npm run skills:check`, `npm test` (4,900+ tests). Commit anything the generators changed. CI runs the same build, skills check and tests.
+- Before every commit run, in order: `npm run build`, `npm run skills:gen`, `npm run docs:sync`, `npm run skills:check`, `npm test` (5,000+ tests). Commit anything the generators changed. CI runs the same build, skills check, docs check and tests.
- Before any npm publish: `npm run release:gate` must pass. It installs the packed tarballs into a clean home and runs capture, recovery, restart, export/import, MCP and status checks against the installed CLI (see CONTRIBUTING.md, Release process)
- Mock pattern: `vi.mock("iii-sdk")` with mock `sdk.trigger`, `kv.get/set/list`
- Test files go in `test/` with `.test.ts` extension
@@ -114,4 +114,4 @@ Hook scripts in `src/hooks/` are standalone Node.js scripts (no iii-sdk import).
- 6 MCP resources, 3 MCP prompts
- 12 hooks, 17 skills
- 322+ iii functions
-- 4,900+ tests
+- 5,000+ tests
diff --git a/README.md b/README.md
index 2d76daf6c9..be25d9645f 100644
--- a/README.md
+++ b/README.md
@@ -69,7 +69,7 @@
-
+
@@ -84,6 +84,7 @@
Benchmarks •
vs Competitors •
Agents •
+ Architecture •
How It Works •
MCP •
Viewer •
@@ -309,6 +310,26 @@ agentmemory works with any agent that supports hooks, MCP, or REST API. All agen
---
+
Architecture
+
+One local server sits between your agents and your memory. Each lane runs locally by default; the dashed line marks what you opt into.
+
+
+
+
+
+Every tool call goes through the write path; every new session reads back through hybrid search within a token budget.
+
+
+
+
+
+
+
+
+
+---
+
### Data storage
Memories stay outside your repository by default:
@@ -780,6 +801,8 @@ Agent instructions and memory files remain useful for stable project guidance. A
### Memory Pipeline
+The [architecture diagrams](#architecture) show the same flow.
+
```text
PostToolUse hook fires
-> Stable event ID, durable capture inbox, offline spool when unavailable
@@ -1324,7 +1347,7 @@ curl -X POST http://localhost:3111/agentmemory/graph/compact -H "Authorization:
```bash
npm run dev # Hot reload
npm run build # Production build
-npm test # 4,900+ tests
+npm test # 5,000+ tests
npm run test:integration # API tests (requires running services)
```
diff --git a/READMEs/README.ar-SA.md b/READMEs/README.ar-SA.md
index de713f7766..1cd7f0ab07 100644
--- a/READMEs/README.ar-SA.md
+++ b/READMEs/README.ar-SA.md
@@ -71,7 +71,7 @@
-
+
@@ -1244,7 +1244,7 @@ curl -X POST http://localhost:3111/agentmemory/graph/compact -H "Authorization:
```bash
npm run dev # Hot reload
npm run build # Production build
-npm test # 4,900+ tests
+npm test # 5,000+ tests
npm run test:integration # API tests (requires running services)
```
diff --git a/READMEs/README.bn-BD.md b/READMEs/README.bn-BD.md
index c878a5d8c8..5a0df4e07e 100644
--- a/READMEs/README.bn-BD.md
+++ b/READMEs/README.bn-BD.md
@@ -69,7 +69,7 @@
-
+
@@ -1257,7 +1257,7 @@ curl -X POST http://localhost:3111/agentmemory/graph/compact -H "Authorization:
```bash
npm run dev # Hot reload
npm run build # Production build
-npm test # 4,900+ tests
+npm test # 5,000+ tests
npm run test:integration # API tests (requires running services)
```
diff --git a/READMEs/README.cs-CZ.md b/READMEs/README.cs-CZ.md
index 05d3df1055..d072aec821 100644
--- a/READMEs/README.cs-CZ.md
+++ b/READMEs/README.cs-CZ.md
@@ -69,7 +69,7 @@
-
+
@@ -1243,7 +1243,7 @@ curl -X POST http://localhost:3111/agentmemory/graph/compact -H "Authorization:
```bash
npm run dev # Hot reload
npm run build # Production build
-npm test # 4,900+ tests
+npm test # 5,000+ tests
npm run test:integration # API tests (requires running services)
```
diff --git a/READMEs/README.da-DK.md b/READMEs/README.da-DK.md
index 62c1373564..da82729e8d 100644
--- a/READMEs/README.da-DK.md
+++ b/READMEs/README.da-DK.md
@@ -69,7 +69,7 @@
-
+
@@ -1251,7 +1251,7 @@ curl -X POST http://localhost:3111/agentmemory/graph/compact -H "Authorization:
```bash
npm run dev # Hot reload
npm run build # Production build
-npm test # 4,900+ tests
+npm test # 5,000+ tests
npm run test:integration # API tests (requires running services)
```
diff --git a/READMEs/README.de-DE.md b/READMEs/README.de-DE.md
index 60cbd1df16..e85c8c3484 100644
--- a/READMEs/README.de-DE.md
+++ b/READMEs/README.de-DE.md
@@ -69,7 +69,7 @@
-
+
@@ -1249,7 +1249,7 @@ curl -X POST http://localhost:3111/agentmemory/graph/compact -H "Authorization:
```bash
npm run dev # Hot reload
npm run build # Production build
-npm test # 4,900+ tests
+npm test # 5,000+ tests
npm run test:integration # API tests (requires running services)
```
diff --git a/READMEs/README.el-GR.md b/READMEs/README.el-GR.md
index 4962170a4c..70b8978d19 100644
--- a/READMEs/README.el-GR.md
+++ b/READMEs/README.el-GR.md
@@ -69,7 +69,7 @@
-
+
@@ -1243,7 +1243,7 @@ curl -X POST http://localhost:3111/agentmemory/graph/compact -H "Authorization:
```bash
npm run dev # Hot reload
npm run build # Production build
-npm test # 4,900+ tests
+npm test # 5,000+ tests
npm run test:integration # API tests (requires running services)
```
diff --git a/READMEs/README.es-ES.md b/READMEs/README.es-ES.md
index 71d33dbb10..230c598b9b 100644
--- a/READMEs/README.es-ES.md
+++ b/READMEs/README.es-ES.md
@@ -69,7 +69,7 @@
-
+
@@ -1245,7 +1245,7 @@ curl -X POST http://localhost:3111/agentmemory/graph/compact -H "Authorization:
```bash
npm run dev # Hot reload
npm run build # Production build
-npm test # 4,900+ tests
+npm test # 5,000+ tests
npm run test:integration # API tests (requires running services)
```
diff --git a/READMEs/README.fi-FI.md b/READMEs/README.fi-FI.md
index 175efd508c..c0dbc4d478 100644
--- a/READMEs/README.fi-FI.md
+++ b/READMEs/README.fi-FI.md
@@ -69,7 +69,7 @@
-
+
@@ -1243,7 +1243,7 @@ curl -X POST http://localhost:3111/agentmemory/graph/compact -H "Authorization:
```bash
npm run dev # Hot reload
npm run build # Production build
-npm test # 4,900+ tests
+npm test # 5,000+ tests
npm run test:integration # API tests (requires running services)
```
diff --git a/READMEs/README.fr-FR.md b/READMEs/README.fr-FR.md
index c898e17a93..b783f2f903 100644
--- a/READMEs/README.fr-FR.md
+++ b/READMEs/README.fr-FR.md
@@ -69,7 +69,7 @@
-
+
@@ -1252,7 +1252,7 @@ curl -X POST http://localhost:3111/agentmemory/graph/compact -H "Authorization:
```bash
npm run dev # Hot reload
npm run build # Production build
-npm test # 4,900+ tests
+npm test # 5,000+ tests
npm run test:integration # API tests (requires running services)
```
diff --git a/READMEs/README.he-IL.md b/READMEs/README.he-IL.md
index 0586f40d7b..e46d6ca37a 100644
--- a/READMEs/README.he-IL.md
+++ b/READMEs/README.he-IL.md
@@ -71,7 +71,7 @@
-
+
@@ -1244,7 +1244,7 @@ curl -X POST http://localhost:3111/agentmemory/graph/compact -H "Authorization:
```bash
npm run dev # Hot reload
npm run build # Production build
-npm test # 4,900+ tests
+npm test # 5,000+ tests
npm run test:integration # API tests (requires running services)
```
diff --git a/READMEs/README.hi-IN.md b/READMEs/README.hi-IN.md
index 9185983cda..413fe9e772 100644
--- a/READMEs/README.hi-IN.md
+++ b/READMEs/README.hi-IN.md
@@ -69,7 +69,7 @@
-
+
@@ -1258,7 +1258,7 @@ curl -X POST http://localhost:3111/agentmemory/graph/compact -H "Authorization:
```bash
npm run dev # Hot reload
npm run build # Production build
-npm test # 4,900+ tests
+npm test # 5,000+ tests
npm run test:integration # API tests (requires running services)
```
diff --git a/READMEs/README.hu-HU.md b/READMEs/README.hu-HU.md
index b1fcd2e91e..3508e743c1 100644
--- a/READMEs/README.hu-HU.md
+++ b/READMEs/README.hu-HU.md
@@ -69,7 +69,7 @@
-
+
@@ -1241,7 +1241,7 @@ curl -X POST http://localhost:3111/agentmemory/graph/compact -H "Authorization:
```bash
npm run dev # Hot reload
npm run build # Production build
-npm test # 4,900+ tests
+npm test # 5,000+ tests
npm run test:integration # API tests (requires running services)
```
diff --git a/READMEs/README.id-ID.md b/READMEs/README.id-ID.md
index 6be8f90a25..19a052fde3 100644
--- a/READMEs/README.id-ID.md
+++ b/READMEs/README.id-ID.md
@@ -69,7 +69,7 @@
-
+
@@ -1258,7 +1258,7 @@ curl -X POST http://localhost:3111/agentmemory/graph/compact -H "Authorization:
```bash
npm run dev # Hot reload
npm run build # Production build
-npm test # 4,900+ tests
+npm test # 5,000+ tests
npm run test:integration # API tests (requires running services)
```
diff --git a/READMEs/README.it-IT.md b/READMEs/README.it-IT.md
index 341799588d..ec565f5eeb 100644
--- a/READMEs/README.it-IT.md
+++ b/READMEs/README.it-IT.md
@@ -69,7 +69,7 @@
-
+
@@ -1251,7 +1251,7 @@ curl -X POST http://localhost:3111/agentmemory/graph/compact -H "Authorization:
```bash
npm run dev # Hot reload
npm run build # Production build
-npm test # 4,900+ tests
+npm test # 5,000+ tests
npm run test:integration # API tests (requires running services)
```
diff --git a/READMEs/README.ja-JP.md b/READMEs/README.ja-JP.md
index 43913c0fd7..31180870ec 100644
--- a/READMEs/README.ja-JP.md
+++ b/READMEs/README.ja-JP.md
@@ -69,7 +69,7 @@
-
+
@@ -1257,7 +1257,7 @@ curl -X POST http://localhost:3111/agentmemory/graph/compact -H "Authorization:
```bash
npm run dev # Hot reload
npm run build # Production build
-npm test # 4,900+ tests
+npm test # 5,000+ tests
npm run test:integration # API tests (requires running services)
```
diff --git a/READMEs/README.ko-KR.md b/READMEs/README.ko-KR.md
index a70c02477a..ae1f96e09f 100644
--- a/READMEs/README.ko-KR.md
+++ b/READMEs/README.ko-KR.md
@@ -69,7 +69,7 @@
-
+
@@ -1256,7 +1256,7 @@ curl -X POST http://localhost:3111/agentmemory/graph/compact -H "Authorization:
```bash
npm run dev # Hot reload
npm run build # Production build
-npm test # 4,900+ tests
+npm test # 5,000+ tests
npm run test:integration # API tests (requires running services)
```
diff --git a/READMEs/README.nb-NO.md b/READMEs/README.nb-NO.md
index 9cce02dcf8..3c61b500e9 100644
--- a/READMEs/README.nb-NO.md
+++ b/READMEs/README.nb-NO.md
@@ -69,7 +69,7 @@
-
+
@@ -1249,7 +1249,7 @@ curl -X POST http://localhost:3111/agentmemory/graph/compact -H "Authorization:
```bash
npm run dev # Hot reload
npm run build # Production build
-npm test # 4,900+ tests
+npm test # 5,000+ tests
npm run test:integration # API tests (requires running services)
```
diff --git a/READMEs/README.nl-NL.md b/READMEs/README.nl-NL.md
index 6af924de0f..7eaf3fa71b 100644
--- a/READMEs/README.nl-NL.md
+++ b/READMEs/README.nl-NL.md
@@ -69,7 +69,7 @@
-
+
@@ -1245,7 +1245,7 @@ curl -X POST http://localhost:3111/agentmemory/graph/compact -H "Authorization:
```bash
npm run dev # Hot reload
npm run build # Production build
-npm test # 4,900+ tests
+npm test # 5,000+ tests
npm run test:integration # API tests (requires running services)
```
diff --git a/READMEs/README.pl-PL.md b/READMEs/README.pl-PL.md
index 098d6dbdd2..18bce09522 100644
--- a/READMEs/README.pl-PL.md
+++ b/READMEs/README.pl-PL.md
@@ -69,7 +69,7 @@
-
+
@@ -1241,7 +1241,7 @@ curl -X POST http://localhost:3111/agentmemory/graph/compact -H "Authorization:
```bash
npm run dev # Hot reload
npm run build # Production build
-npm test # 4,900+ tests
+npm test # 5,000+ tests
npm run test:integration # API tests (requires running services)
```
diff --git a/READMEs/README.pt-BR.md b/READMEs/README.pt-BR.md
index fee630c5cd..faf3585631 100644
--- a/READMEs/README.pt-BR.md
+++ b/READMEs/README.pt-BR.md
@@ -69,7 +69,7 @@
-
+
@@ -1249,7 +1249,7 @@ curl -X POST http://localhost:3111/agentmemory/graph/compact -H "Authorization:
```bash
npm run dev # Hot reload
npm run build # Production build
-npm test # 4,900+ tests
+npm test # 5,000+ tests
npm run test:integration # API tests (requires running services)
```
diff --git a/READMEs/README.pt-PT.md b/READMEs/README.pt-PT.md
index 91747393a5..8f2d384d46 100644
--- a/READMEs/README.pt-PT.md
+++ b/READMEs/README.pt-PT.md
@@ -69,7 +69,7 @@
-
+
@@ -1245,7 +1245,7 @@ curl -X POST http://localhost:3111/agentmemory/graph/compact -H "Authorization:
```bash
npm run dev # Hot reload
npm run build # Production build
-npm test # 4,900+ tests
+npm test # 5,000+ tests
npm run test:integration # API tests (requires running services)
```
diff --git a/READMEs/README.ro-RO.md b/READMEs/README.ro-RO.md
index d6173acd64..a305986973 100644
--- a/READMEs/README.ro-RO.md
+++ b/READMEs/README.ro-RO.md
@@ -69,7 +69,7 @@
-
+
@@ -1237,7 +1237,7 @@ curl -X POST http://localhost:3111/agentmemory/graph/compact -H "Authorization:
```bash
npm run dev # Hot reload
npm run build # Production build
-npm test # 4,900+ tests
+npm test # 5,000+ tests
npm run test:integration # API tests (requires running services)
```
diff --git a/READMEs/README.ru-RU.md b/READMEs/README.ru-RU.md
index be1e91e4e4..52f937c423 100644
--- a/READMEs/README.ru-RU.md
+++ b/READMEs/README.ru-RU.md
@@ -69,7 +69,7 @@
-
+
@@ -1243,7 +1243,7 @@ curl -X POST http://localhost:3111/agentmemory/graph/compact -H "Authorization:
```bash
npm run dev # Hot reload
npm run build # Production build
-npm test # 4,900+ tests
+npm test # 5,000+ tests
npm run test:integration # API tests (requires running services)
```
diff --git a/READMEs/README.sv-SE.md b/READMEs/README.sv-SE.md
index 82f04762eb..dece59a678 100644
--- a/READMEs/README.sv-SE.md
+++ b/READMEs/README.sv-SE.md
@@ -69,7 +69,7 @@
-
+
@@ -1251,7 +1251,7 @@ curl -X POST http://localhost:3111/agentmemory/graph/compact -H "Authorization:
```bash
npm run dev # Hot reload
npm run build # Production build
-npm test # 4,900+ tests
+npm test # 5,000+ tests
npm run test:integration # API tests (requires running services)
```
diff --git a/READMEs/README.th-TH.md b/READMEs/README.th-TH.md
index c93db2f895..47868c8b97 100644
--- a/READMEs/README.th-TH.md
+++ b/READMEs/README.th-TH.md
@@ -69,7 +69,7 @@
-
+
@@ -1244,7 +1244,7 @@ curl -X POST http://localhost:3111/agentmemory/graph/compact -H "Authorization:
```bash
npm run dev # Hot reload
npm run build # Production build
-npm test # 4,900+ tests
+npm test # 5,000+ tests
npm run test:integration # API tests (requires running services)
```
diff --git a/READMEs/README.tl-PH.md b/READMEs/README.tl-PH.md
index 6d50865f29..46e8525e75 100644
--- a/READMEs/README.tl-PH.md
+++ b/READMEs/README.tl-PH.md
@@ -69,7 +69,7 @@
-
+
@@ -1253,7 +1253,7 @@ curl -X POST http://localhost:3111/agentmemory/graph/compact -H "Authorization:
```bash
npm run dev # Hot reload
npm run build # Production build
-npm test # 4,900+ tests
+npm test # 5,000+ tests
npm run test:integration # API tests (requires running services)
```
diff --git a/READMEs/README.tr-TR.md b/READMEs/README.tr-TR.md
index d4ef91d08b..9449a9fcc4 100644
--- a/READMEs/README.tr-TR.md
+++ b/READMEs/README.tr-TR.md
@@ -69,7 +69,7 @@
-
+
@@ -1243,7 +1243,7 @@ curl -X POST http://localhost:3111/agentmemory/graph/compact -H "Authorization:
```bash
npm run dev # Hot reload
npm run build # Production build
-npm test # 4,900+ tests
+npm test # 5,000+ tests
npm run test:integration # API tests (requires running services)
```
diff --git a/READMEs/README.uk-UA.md b/READMEs/README.uk-UA.md
index b26305144d..d8724f82b5 100644
--- a/READMEs/README.uk-UA.md
+++ b/READMEs/README.uk-UA.md
@@ -69,7 +69,7 @@
-
+
@@ -1244,7 +1244,7 @@ curl -X POST http://localhost:3111/agentmemory/graph/compact -H "Authorization:
```bash
npm run dev # Hot reload
npm run build # Production build
-npm test # 4,900+ tests
+npm test # 5,000+ tests
npm run test:integration # API tests (requires running services)
```
diff --git a/READMEs/README.ur-PK.md b/READMEs/README.ur-PK.md
index 31250f113a..79984684a2 100644
--- a/READMEs/README.ur-PK.md
+++ b/READMEs/README.ur-PK.md
@@ -71,7 +71,7 @@
-
+
@@ -1248,7 +1248,7 @@ curl -X POST http://localhost:3111/agentmemory/graph/compact -H "Authorization:
```bash
npm run dev # Hot reload
npm run build # Production build
-npm test # 4,900+ tests
+npm test # 5,000+ tests
npm run test:integration # API tests (requires running services)
```
diff --git a/READMEs/README.vi-VN.md b/READMEs/README.vi-VN.md
index fd842721a3..144f2433c6 100644
--- a/READMEs/README.vi-VN.md
+++ b/READMEs/README.vi-VN.md
@@ -69,7 +69,7 @@
-
+
@@ -1253,7 +1253,7 @@ curl -X POST http://localhost:3111/agentmemory/graph/compact -H "Authorization:
```bash
npm run dev # Hot reload
npm run build # Production build
-npm test # 4,900+ tests
+npm test # 5,000+ tests
npm run test:integration # API tests (requires running services)
```
diff --git a/READMEs/README.zh-CN.md b/READMEs/README.zh-CN.md
index 4c56b9e1e0..5791cf5ce7 100644
--- a/READMEs/README.zh-CN.md
+++ b/READMEs/README.zh-CN.md
@@ -69,7 +69,7 @@
-
+
@@ -1254,7 +1254,7 @@ curl -X POST http://localhost:3111/agentmemory/graph/compact -H "Authorization:
```bash
npm run dev # Hot reload
npm run build # Production build
-npm test # 4,900+ tests
+npm test # 5,000+ tests
npm run test:integration # API tests (requires running services)
```
diff --git a/READMEs/README.zh-TW.md b/READMEs/README.zh-TW.md
index 16d550226f..f22939d49b 100644
--- a/READMEs/README.zh-TW.md
+++ b/READMEs/README.zh-TW.md
@@ -69,7 +69,7 @@
-
+
@@ -1246,7 +1246,7 @@ curl -X POST http://localhost:3111/agentmemory/graph/compact -H "Authorization:
```bash
npm run dev # Hot reload
npm run build # Production build
-npm test # 4,900+ tests
+npm test # 5,000+ tests
npm run test:integration # API tests (requires running services)
```
diff --git a/assets/diagrams/architecture.svg b/assets/diagrams/architecture.svg
new file mode 100644
index 0000000000..14316203d9
--- /dev/null
+++ b/assets/diagrams/architecture.svg
@@ -0,0 +1,159 @@
+
+
+
+YOUR CODING AGENTS
+
+
+Claude Code
+
+
+
+Codex
+
+
+
+Cursor
+
+
+
+Copilot CLI
+
+
+
+OpenCode
+
+
+
+Gemini CLI
+
+
+
+Pi
+
+
+
+Hermes
+
+
+
+OpenClaw
+
+
+
+Orca
+
+
+
+hooks · MCP · REST, bearer secret
+
+YOUR MACHINE
+
+binds to 127.0.0.1 by default
+Keyless by default: nothing leaves until you opt in
+
+agentmemory server
+
+:3111
+REST · 147 endpoints · MCP · 54 tools, 6 resources, 3 prompts
+Privacy filter on every write · per-agent scope · audit log · circuit breaker
+
+
+Viewer
+
+:3113
+Sessions, memories, graph, replay
+Live events streamed from :3111
+
+
+
+
+
+
+
+CAPTURE
+hook events
+
+Capture pipeline
+Durable inbox, offline spool
+Secrets stripped before storage
+Synthetic compression, no LLM
+
+AGENTMEMORY_LLM_PROVIDER
+
+LLM provider
+Summaries and consolidation
+
+
+
+
+
+
++ vLLM
+
+
+RECALL
+RRF fusion, k = 60
+
+Hybrid search
+BM25, always on
+Session-diversified results
+2,000-token context budget
+
+EMBEDDING_PROVIDER
+
+Embedding provider
+Local all-MiniLM-L6-v2, or
+
+
+
+
+
++ OpenRouter
+
+
+STORE
+versioned
+
+State store
+File store, no database service
+Four memory tiers, decay, TTL
+Git snapshots and rollback
+
+
+AGENTMEMORY_STATE_BACKEND
+
+Redis and peers
+Redis state backend
+Mesh sync between instances
+Shared secret on both peers
+
+
diff --git a/assets/diagrams/pipeline.svg b/assets/diagrams/pipeline.svg
new file mode 100644
index 0000000000..0b29b40cd9
--- /dev/null
+++ b/assets/diagrams/pipeline.svg
@@ -0,0 +1,139 @@
+
+
+
+MEMORY PIPELINE
+dashed = opt-in
+
+PostToolUse
+every tool call
+
+
+Event
+01
+stable event ID
+dedupe on replay
+
+Inbox
+02
+durable capture
+spool if offline
+
+Privacy filter
+03
+keys, tokens, URLs
+<private> tags
+
+Observation
+04
+raw, per session
+provenance stamp
+
+Compress
+05
+synthetic default
+LLM opt-in
+
+Index
+06
+BM25 always
+vectors opt-in
+
+Stop · SessionEnd
+end of turn or session
+
+
+Summary
+01
+incremental, only
+new observations
+
+Graph
+02
+entities and
+relations
+
+Reflection
+03
+updates memory
+slots
+
+
+STATE STORE
+file store by default
+
+Working
+
+Episodic
+
+Semantic
+
+Procedural
+decay · TTL · contradiction checks
+git snapshots · version chains
+
+
+
+
+
+
+SessionStart
+new session
+
+
+Profile
+01
+top concepts,
+files, patterns
+
+Hybrid search
+02
+BM25 + vector
++ graph, RRF k=60
+
+Token budget
+03
+2,000 by default
+max 3 per session
+
+Inject context
+04
+when the host
+allows it
+
+
+
+agent prompt
+$AGENTMEMORY_INJECT_CONTEXT=true
+Opt-in switches: AGENTMEMORY_AUTO_COMPRESS · EMBEDDING_PROVIDER · GRAPH_EXTRACTION_ENABLED · AGENTMEMORY_SLOTS + AGENTMEMORY_REFLECT
+Keyless installs skip every dashed step and all LLM calls: synthetic compression and BM25 recall still work.
+Secrets are scrubbed on every write path, including imports, mesh sync, summaries and graph nodes.
+
diff --git a/assets/diagrams/stack.svg b/assets/diagrams/stack.svg
new file mode 100644
index 0000000000..8bc91e8f77
--- /dev/null
+++ b/assets/diagrams/stack.svg
@@ -0,0 +1,80 @@
+
+
+
+
+
+
+WRITE PATH · DOWN, EVERY TOOL CALL
+READ PATH · UP, SESSION START AND RECALL
+
+FILE STATE STORE macOS ~/Library/Application Support/agentmemory Linux $XDG_DATA_HOME/agentmemory Windows %APPDATA%\agentmemory
+
+BM25 always on VECTOR EMBEDDING_PROVIDER GRAPH GRAPH_EXTRACTION_ENABLED
+
+WORKING raw observations EPISODIC session summaries SEMANTIC facts and patterns PROCEDURAL workflows, decisions
+
+Capture privacy filter Compress synthetic Recall hybrid search Consolidate decay, TTL
+
+Hooks 12 lifecycle events MCP 54 tools REST 147 endpoints
+
+Claude Code Codex Cursor Copilot CLI OpenCode Gemini CLI Pi Hermes OpenClaw Orca
+
+
+Your agents
+Claude Code, Codex, Cursor, Copilot CLI,
+OpenCode, Gemini CLI, Hermes, Orca and more.
+
+
+Hooks, MCP, REST
+Hooks capture each tool call. MCP and REST
+save and recall, behind a bearer secret.
+
+
+agentmemory server
+One local process: API on :3111, viewer on :3113.
+Secrets are stripped before anything is stored.
+
+
+Four memory tiers
+Raw observations become summaries, facts and
+workflows. Stale memories decay and evict.
+
+
+Three recall streams
+BM25 is always on. Vectors and graph join when
+you opt in. Results fuse with RRF, k = 60.
+
+
+Your machine
+File state store in the OS data folder.
+Loopback only. Redis and mesh sync are optional.
+
diff --git a/assets/tags/light/stat-tests.svg b/assets/tags/light/stat-tests.svg
index e6fccac91e..ab7d6c3b5c 100644
--- a/assets/tags/light/stat-tests.svg
+++ b/assets/tags/light/stat-tests.svg
@@ -1,5 +1,5 @@
-
+
- 4900+
+ 5000+
TESTS PASSING
diff --git a/assets/tags/stat-tests.svg b/assets/tags/stat-tests.svg
index 3b31eea1ea..f28674a600 100644
--- a/assets/tags/stat-tests.svg
+++ b/assets/tags/stat-tests.svg
@@ -1,5 +1,5 @@
-
+
- 4900+
+ 5000+
TESTS PASSING
diff --git a/scripts/diagram-icons.ts b/scripts/diagram-icons.ts
new file mode 100644
index 0000000000..12d2baee89
--- /dev/null
+++ b/scripts/diagram-icons.ts
@@ -0,0 +1,230 @@
+export interface DiagramIcon {
+ vb: string;
+ paths: Array<{ d: string; stroke?: number; evenodd?: boolean }>;
+}
+
+export const ICONS: Record = {
+ claude: {
+ vb: "0 0 24 24",
+ paths: [
+ {
+ d: "m4.7144 15.9555 4.7174-2.6471.079-.2307-.079-.1275h-.2307l-.7893-.0486-2.6956-.0729-2.3375-.0971-2.2646-.1214-.5707-.1215-.5343-.7042.0546-.3522.4797-.3218.686.0608 1.5179.1032 2.2767.1578 1.6514.0972 2.4468.255h.3886l.0546-.1579-.1336-.0971-.1032-.0972L6.973 9.8356l-2.55-1.6879-1.3356-.9714-.7225-.4918-.3643-.4614-.1578-1.0078.6557-.7225.8803.0607.2246.0607.8925.686 1.9064 1.4754 2.4893 1.8336.3643.3035.1457-.1032.0182-.0728-.164-.2733-1.3539-2.4467-1.445-2.4893-.6435-1.032-.17-.6194c-.0607-.255-.1032-.4674-.1032-.7285L6.287.1335 6.6997 0l.9957.1336.419.3642.6192 1.4147 1.0018 2.2282 1.5543 3.0296.4553.8985.2429.8318.091.255h.1579v-.1457l.1275-1.706.2368-2.0947.2307-2.6957.0789-.7589.3764-.9107.7468-.4918.5828.2793.4797.686-.0668.4433-.2853 1.8517-.5586 2.9021-.3643 1.9429h.2125l.2429-.2429.9835-1.3053 1.6514-2.0643.7286-.8196.85-.9046.5464-.4311h1.0321l.759 1.1293-.34 1.1657-1.0625 1.3478-.8804 1.1414-1.2628 1.7-.7893 1.36.0729.1093.1882-.0183 2.8535-.607 1.5421-.2794 1.8396-.3157.8318.3886.091.3946-.3278.8075-1.967.4857-2.3072.4614-3.4364.8136-.0425.0304.0486.0607 1.5482.1457.6618.0364h1.621l3.0175.2247.7892.522.4736.6376-.079.4857-1.2142.6193-1.6393-.3886-3.825-.9107-1.3113-.3279h-.1822v.1093l1.0929 1.0686 2.0035 1.8092 2.5075 2.3314.1275.5768-.3218.4554-.34-.0486-2.2039-1.6575-.85-.7468-1.9246-1.621h-.1275v.17l.4432.6496 2.3436 3.5214.1214 1.0807-.17.3521-.6071.2125-.6679-.1214-1.3721-1.9246L14.38 17.959l-1.1414-1.9428-.1397.079-.674 7.2552-.3156.3703-.7286.2793-.6071-.4614-.3218-.7468.3218-1.4753.3886-1.9246.3157-1.53.2853-1.9004.17-.6314-.0121-.0425-.1397.0182-1.4328 1.9672-2.1796 2.9446-1.7243 1.8456-.4128.164-.7164-.3704.0667-.6618.4008-.5889 2.386-3.0357 1.4389-1.882.929-1.0868-.0062-.1579h-.0546l-6.3385 4.1164-1.1293.1457-.4857-.4554.0608-.7467.2307-.2429 1.9064-1.3114Z"
+ }
+ ]
+ },
+ openai: {
+ vb: "0 0 24 24",
+ paths: [
+ {
+ d: "M22.2819 9.8211a5.9847 5.9847 0 0 0-.5157-4.9108 6.0462 6.0462 0 0 0-6.5098-2.9A6.0651 6.0651 0 0 0 4.9807 4.1818a5.9847 5.9847 0 0 0-3.9977 2.9 6.0462 6.0462 0 0 0 .7427 7.0966 5.98 5.98 0 0 0 .511 4.9107 6.051 6.051 0 0 0 6.5146 2.9001A5.9847 5.9847 0 0 0 13.2599 24a6.0557 6.0557 0 0 0 5.7718-4.2058 5.9894 5.9894 0 0 0 3.9977-2.9001 6.0557 6.0557 0 0 0-.7475-7.0729zm-9.022 12.6081a4.4755 4.4755 0 0 1-2.8764-1.0408l.1419-.0804 4.7783-2.7582a.7948.7948 0 0 0 .3927-.6813v-6.7369l2.02 1.1686a.071.071 0 0 1 .038.052v5.5826a4.504 4.504 0 0 1-4.4945 4.4944zm-9.6607-4.1254a4.4708 4.4708 0 0 1-.5346-3.0137l.142.0852 4.783 2.7582a.7712.7712 0 0 0 .7806 0l5.8428-3.3685v2.3324a.0804.0804 0 0 1-.0332.0615L9.74 19.9502a4.4992 4.4992 0 0 1-6.1408-1.6464zM2.3408 7.8956a4.485 4.485 0 0 1 2.3655-1.9728V11.6a.7664.7664 0 0 0 .3879.6765l5.8144 3.3543-2.0201 1.1685a.0757.0757 0 0 1-.071 0l-4.8303-2.7865A4.504 4.504 0 0 1 2.3408 7.872zm16.5963 3.8558L13.1038 8.364 15.1192 7.2a.0757.0757 0 0 1 .071 0l4.8303 2.7913a4.4944 4.4944 0 0 1-.6765 8.1042v-5.6772a.79.79 0 0 0-.407-.667zm2.0107-3.0231l-.142-.0852-4.7735-2.7818a.7759.7759 0 0 0-.7854 0L9.409 9.2297V6.8974a.0662.0662 0 0 1 .0284-.0615l4.8303-2.7866a4.4992 4.4992 0 0 1 6.6802 4.66zM8.3065 12.863l-2.02-1.1638a.0804.0804 0 0 1-.038-.0567V6.0742a4.4992 4.4992 0 0 1 7.3757-3.4537l-.142.0805L8.704 5.459a.7948.7948 0 0 0-.3927.6813zm1.0976-2.3654l2.602-1.4998 2.6069 1.4998v2.9994l-2.5974 1.4997-2.6067-1.4997Z"
+ }
+ ]
+ },
+ anthropic: {
+ vb: "0 0 24 24",
+ paths: [
+ {
+ d: "M17.3041 3.541h-3.6718l6.696 16.918H24Zm-10.6082 0L0 20.459h3.7442l1.3693-3.5527h7.0052l1.3693 3.5528h3.7442L10.5363 3.5409Zm-.3712 10.2232 2.2914-5.9456 2.2914 5.9456Z"
+ }
+ ]
+ },
+ copilot: {
+ vb: "0 0 24 24",
+ paths: [
+ {
+ d: "M23.922 16.997C23.061 18.492 18.063 22.02 12 22.02 5.937 22.02.939 18.492.078 16.997A.641.641 0 0 1 0 16.741v-2.869a.883.883 0 0 1 .053-.22c.372-.935 1.347-2.292 2.605-2.656.167-.429.414-1.055.644-1.517a10.098 10.098 0 0 1-.052-1.086c0-1.331.282-2.499 1.132-3.368.397-.406.89-.717 1.474-.952C7.255 2.937 9.248 1.98 11.978 1.98c2.731 0 4.767.957 6.166 2.093.584.235 1.077.546 1.474.952.85.869 1.132 2.037 1.132 3.368 0 .368-.014.733-.052 1.086.23.462.477 1.088.644 1.517 1.258.364 2.233 1.721 2.605 2.656a.841.841 0 0 1 .053.22v2.869a.641.641 0 0 1-.078.256Zm-11.75-5.992h-.344a4.359 4.359 0 0 1-.355.508c-.77.947-1.918 1.492-3.508 1.492-1.725 0-2.989-.359-3.782-1.259a2.137 2.137 0 0 1-.085-.104L4 11.746v6.585c1.435.779 4.514 2.179 8 2.179 3.486 0 6.565-1.4 8-2.179v-6.585l-.098-.104s-.033.045-.085.104c-.793.9-2.057 1.259-3.782 1.259-1.59 0-2.738-.545-3.508-1.492a4.359 4.359 0 0 1-.355-.508Zm2.328 3.25c.549 0 1 .451 1 1v2c0 .549-.451 1-1 1-.549 0-1-.451-1-1v-2c0-.549.451-1 1-1Zm-5 0c.549 0 1 .451 1 1v2c0 .549-.451 1-1 1-.549 0-1-.451-1-1v-2c0-.549.451-1 1-1Zm3.313-6.185c.136 1.057.403 1.913.878 2.497.442.544 1.134.938 2.344.938 1.573 0 2.292-.337 2.657-.751.384-.435.558-1.15.558-2.361 0-1.14-.243-1.847-.705-2.319-.477-.488-1.319-.862-2.824-1.025-1.487-.161-2.192.138-2.533.529-.269.307-.437.808-.438 1.578v.021c0 .265.021.562.063.893Zm-1.626 0c.042-.331.063-.628.063-.894v-.02c-.001-.77-.169-1.271-.438-1.578-.341-.391-1.046-.69-2.533-.529-1.505.163-2.347.537-2.824 1.025-.462.472-.705 1.179-.705 2.319 0 1.211.175 1.926.558 2.361.365.414 1.084.751 2.657.751 1.21 0 1.902-.394 2.344-.938.475-.584.742-1.44.878-2.497Z"
+ }
+ ]
+ },
+ gemini: {
+ vb: "0 0 24 24",
+ paths: [
+ {
+ d: "M11.04 19.32Q12 21.51 12 24q0-2.49.93-4.68.96-2.19 2.58-3.81t3.81-2.55Q21.51 12 24 12q-2.49 0-4.68-.93a12.3 12.3 0 0 1-3.81-2.58 12.3 12.3 0 0 1-2.58-3.81Q12 2.49 12 0q0 2.49-.96 4.68-.93 2.19-2.55 3.81a12.3 12.3 0 0 1-3.81 2.58Q2.49 12 0 12q2.49 0 4.68.96 2.19.93 3.81 2.55t2.55 3.81"
+ }
+ ]
+ },
+ ollama: {
+ vb: "0 0 24 24",
+ paths: [
+ {
+ d: "M16.361 10.26a.894.894 0 0 0-.558.47l-.072.148.001.207c0 .193.004.217.059.353.076.193.152.312.291.448.24.238.51.3.872.205a.86.86 0 0 0 .517-.436.752.752 0 0 0 .08-.498c-.064-.453-.33-.782-.724-.897a1.06 1.06 0 0 0-.466 0zm-9.203.005c-.305.096-.533.32-.65.639a1.187 1.187 0 0 0-.06.52c.057.309.31.59.598.667.362.095.632.033.872-.205.14-.136.215-.255.291-.448.055-.136.059-.16.059-.353l.001-.207-.072-.148a.894.894 0 0 0-.565-.472 1.02 1.02 0 0 0-.474.007Zm4.184 2c-.131.071-.223.25-.195.383.031.143.157.288.353.407.105.063.112.072.117.136.004.038-.01.146-.029.243-.02.094-.036.194-.036.222.002.074.07.195.143.253.064.052.076.054.255.059.164.005.198.001.264-.03.169-.082.212-.234.15-.525-.052-.243-.042-.28.087-.355.137-.08.281-.219.324-.314a.365.365 0 0 0-.175-.48.394.394 0 0 0-.181-.033c-.126 0-.207.03-.355.124l-.085.053-.053-.032c-.219-.13-.259-.145-.391-.143a.396.396 0 0 0-.193.032zm.39-2.195c-.373.036-.475.05-.654.086-.291.06-.68.195-.951.328-.94.46-1.589 1.226-1.787 2.114-.04.176-.045.234-.045.53 0 .294.005.357.043.524.264 1.16 1.332 2.017 2.714 2.173.3.033 1.596.033 1.896 0 1.11-.125 2.064-.727 2.493-1.571.114-.226.169-.372.22-.602.039-.167.044-.23.044-.523 0-.297-.005-.355-.045-.531-.288-1.29-1.539-2.304-3.072-2.497a6.873 6.873 0 0 0-.855-.031zm.645.937a3.283 3.283 0 0 1 1.44.514c.223.148.537.458.671.662.166.251.26.508.303.82.02.143.01.251-.043.482-.08.345-.332.705-.672.957a3.115 3.115 0 0 1-.689.348c-.382.122-.632.144-1.525.138-.582-.006-.686-.01-.853-.042-.57-.107-1.022-.334-1.35-.68-.264-.28-.385-.535-.45-.946-.03-.192.025-.509.137-.776.136-.326.488-.73.836-.963.403-.269.934-.46 1.422-.512.187-.02.586-.02.773-.002zm-5.503-11a1.653 1.653 0 0 0-.683.298C5.617.74 5.173 1.666 4.985 2.819c-.07.436-.119 1.04-.119 1.503 0 .544.064 1.24.155 1.721.02.107.031.202.023.208a8.12 8.12 0 0 1-.187.152 5.324 5.324 0 0 0-.949 1.02 5.49 5.49 0 0 0-.94 2.339 6.625 6.625 0 0 0-.023 1.357c.091.78.325 1.438.727 2.04l.13.195-.037.064c-.269.452-.498 1.105-.605 1.732-.084.496-.095.629-.095 1.294 0 .67.009.803.088 1.266.095.555.288 1.143.503 1.534.071.128.243.393.264.407.007.003-.014.067-.046.141a7.405 7.405 0 0 0-.548 1.873c-.062.417-.071.552-.071.991 0 .56.031.832.148 1.279L3.42 24h1.478l-.05-.091c-.297-.552-.325-1.575-.068-2.597.117-.472.25-.819.498-1.296l.148-.29v-.177c0-.165-.003-.184-.057-.293a.915.915 0 0 0-.194-.25 1.74 1.74 0 0 1-.385-.543c-.424-.92-.506-2.286-.208-3.451.124-.486.329-.918.544-1.154a.787.787 0 0 0 .223-.531c0-.195-.07-.355-.224-.522a3.136 3.136 0 0 1-.817-1.729c-.14-.96.114-2.005.69-2.834.563-.814 1.353-1.336 2.237-1.475.199-.033.57-.028.776.01.226.04.367.028.512-.041.179-.085.268-.19.374-.431.093-.215.165-.333.36-.576.234-.29.46-.489.822-.729.413-.27.884-.467 1.352-.561.17-.035.25-.04.569-.04.319 0 .398.005.569.04a4.07 4.07 0 0 1 1.914.997c.117.109.398.457.488.602.034.057.095.177.132.267.105.241.195.346.374.43.14.068.286.082.503.045.343-.058.607-.053.943.016 1.144.23 2.14 1.173 2.581 2.437.385 1.108.276 2.267-.296 3.153-.097.15-.193.27-.333.419-.301.322-.301.722-.001 1.053.493.539.801 1.866.708 3.036-.062.772-.26 1.463-.533 1.854a2.096 2.096 0 0 1-.224.258.916.916 0 0 0-.194.25c-.054.109-.057.128-.057.293v.178l.148.29c.248.476.38.823.498 1.295.253 1.008.231 2.01-.059 2.581a.845.845 0 0 0-.044.098c0 .006.329.009.732.009h.73l.02-.074.036-.134c.019-.076.057-.3.088-.516.029-.217.029-1.016 0-1.258-.11-.875-.295-1.57-.597-2.226-.032-.074-.053-.138-.046-.141.008-.005.057-.074.108-.152.376-.569.607-1.284.724-2.228.031-.26.031-1.378 0-1.628-.083-.645-.182-1.082-.348-1.525a6.083 6.083 0 0 0-.329-.7l-.038-.064.131-.194c.402-.604.636-1.262.727-2.04a6.625 6.625 0 0 0-.024-1.358 5.512 5.512 0 0 0-.939-2.339 5.325 5.325 0 0 0-.95-1.02 8.097 8.097 0 0 1-.186-.152.692.692 0 0 1 .023-.208c.208-1.087.201-2.443-.017-3.503-.19-.924-.535-1.658-.98-2.082-.354-.338-.716-.482-1.15-.455-.996.059-1.8 1.205-2.116 3.01a6.805 6.805 0 0 0-.097.726c0 .036-.007.066-.015.066a.96.96 0 0 1-.149-.078A4.857 4.857 0 0 0 12 3.03c-.832 0-1.687.243-2.456.698a.958.958 0 0 1-.148.078c-.008 0-.015-.03-.015-.066a6.71 6.71 0 0 0-.097-.725C8.997 1.392 8.337.319 7.46.048a2.096 2.096 0 0 0-.585-.041Zm.293 1.402c.248.197.523.759.682 1.388.03.113.06.244.069.292.007.047.026.152.041.233.067.365.098.76.102 1.24l.002.475-.12.175-.118.178h-.278c-.324 0-.646.041-.954.124l-.238.06c-.033.007-.038-.003-.057-.144a8.438 8.438 0 0 1 .016-2.323c.124-.788.413-1.501.696-1.711.067-.05.079-.049.157.013zm9.825-.012c.17.126.358.46.498.888.28.854.36 2.028.212 3.145-.019.14-.024.151-.057.144l-.238-.06a3.693 3.693 0 0 0-.954-.124h-.278l-.119-.178-.119-.175.002-.474c.004-.669.066-1.19.214-1.772.157-.623.434-1.185.68-1.382.078-.062.09-.063.159-.012z"
+ }
+ ]
+ },
+ redis: {
+ vb: "0 0 24 24",
+ paths: [
+ {
+ d: "M22.71 13.145c-1.66 2.092-3.452 4.483-7.038 4.483-3.203 0-4.397-2.825-4.48-5.12.701 1.484 2.073 2.685 4.214 2.63 4.117-.133 6.94-3.852 6.94-7.239 0-4.05-3.022-6.972-8.268-6.972-3.752 0-8.4 1.428-11.455 3.685C2.59 6.937 3.885 9.958 4.35 9.626c2.648-1.904 4.748-3.13 6.784-3.744C8.12 9.244.886 17.05 0 18.425c.1 1.261 1.66 4.648 2.424 4.648.232 0 .431-.133.664-.365a100.49 100.49 0 0 0 5.54-6.765c.222 3.104 1.748 6.898 6.014 6.898 3.819 0 7.604-2.756 9.33-8.965.2-.764-.73-1.361-1.261-.73zm-4.349-5.013c0 1.959-1.926 2.922-3.685 2.922-.941 0-1.664-.247-2.235-.568 1.051-1.592 2.092-3.225 3.21-4.973 1.972.334 2.71 1.43 2.71 2.619z"
+ }
+ ]
+ },
+ git: {
+ vb: "0 0 24 24",
+ paths: [
+ {
+ d: "M23.546 10.93L13.067.452c-.604-.603-1.582-.603-2.188 0L8.708 2.627l2.76 2.76c.645-.215 1.379-.07 1.889.441.516.515.658 1.258.438 1.9l2.658 2.66c.645-.223 1.387-.078 1.9.435.721.72.721 1.884 0 2.604-.719.719-1.881.719-2.6 0-.539-.541-.674-1.337-.404-1.996L12.86 8.955v6.525c.176.086.342.203.488.348.713.721.713 1.883 0 2.6-.719.721-1.889.721-2.609 0-.719-.719-.719-1.879 0-2.598.182-.18.387-.316.605-.406V8.835c-.217-.091-.424-.222-.6-.401-.545-.545-.676-1.342-.396-2.009L7.636 3.7.45 10.881c-.6.605-.6 1.584 0 2.189l10.48 10.477c.604.604 1.582.604 2.186 0l10.43-10.43c.605-.603.605-1.582 0-2.187"
+ }
+ ]
+ },
+ huggingface: {
+ vb: "0 0 24 24",
+ paths: [
+ {
+ d: "M12.025 1.13c-5.77 0-10.449 4.647-10.449 10.378 0 1.112.178 2.181.503 3.185.064-.222.203-.444.416-.577a.96.96 0 0 1 .524-.15c.293 0 .584.124.84.284.278.173.48.408.71.694.226.282.458.611.684.951v-.014c.017-.324.106-.622.264-.874s.403-.487.762-.543c.3-.047.596.06.787.203s.31.313.4.467c.15.257.212.468.233.542.01.026.653 1.552 1.657 2.54.616.605 1.01 1.223 1.082 1.912.055.537-.096 1.059-.38 1.572.637.121 1.294.187 1.967.187.657 0 1.298-.063 1.921-.178-.287-.517-.44-1.041-.384-1.581.07-.69.465-1.307 1.081-1.913 1.004-.987 1.647-2.513 1.657-2.539.021-.074.083-.285.233-.542.09-.154.208-.323.4-.467a1.08 1.08 0 0 1 .787-.203c.359.056.604.29.762.543s.247.55.265.874v.015c.225-.34.457-.67.683-.952.23-.286.432-.52.71-.694.257-.16.547-.284.84-.285a.97.97 0 0 1 .524.151c.228.143.373.388.43.625l.006.04a10.3 10.3 0 0 0 .534-3.273c0-5.731-4.678-10.378-10.449-10.378M8.327 6.583a1.5 1.5 0 0 1 .713.174 1.487 1.487 0 0 1 .617 2.013c-.183.343-.762-.214-1.102-.094-.38.134-.532.914-.917.71a1.487 1.487 0 0 1 .69-2.803m7.486 0a1.487 1.487 0 0 1 .689 2.803c-.385.204-.536-.576-.916-.71-.34-.12-.92.437-1.103.094a1.487 1.487 0 0 1 .617-2.013 1.5 1.5 0 0 1 .713-.174m-10.68 1.55a.96.96 0 1 1 0 1.921.96.96 0 0 1 0-1.92m13.838 0a.96.96 0 1 1 0 1.92.96.96 0 0 1 0-1.92M8.489 11.458c.588.01 1.965 1.157 3.572 1.164 1.607-.007 2.984-1.155 3.572-1.164.196-.003.305.12.305.454 0 .886-.424 2.328-1.563 3.202-.22-.756-1.396-1.366-1.63-1.32q-.011.001-.02.006l-.044.026-.01.008-.03.024q-.018.017-.035.036l-.032.04a1 1 0 0 0-.058.09l-.014.025q-.049.088-.11.19a1 1 0 0 1-.083.116 1.2 1.2 0 0 1-.173.18q-.035.029-.075.058a1.3 1.3 0 0 1-.251-.243 1 1 0 0 1-.076-.107c-.124-.193-.177-.363-.337-.444-.034-.016-.104-.008-.2.022q-.094.03-.216.087-.06.028-.125.063l-.13.074q-.067.04-.136.086a3 3 0 0 0-.135.096 3 3 0 0 0-.26.219 2 2 0 0 0-.12.121 2 2 0 0 0-.106.128l-.002.002a2 2 0 0 0-.09.132l-.001.001a1.2 1.2 0 0 0-.105.212q-.013.036-.024.073c-1.139-.875-1.563-2.317-1.563-3.203 0-.334.109-.457.305-.454m.836 10.354c.824-1.19.766-2.082-.365-3.194-1.13-1.112-1.789-2.738-1.789-2.738s-.246-.945-.806-.858-.97 1.499.202 2.362c1.173.864-.233 1.45-.685.64-.45-.812-1.683-2.896-2.322-3.295s-1.089-.175-.938.647 2.822 2.813 2.562 3.244-1.176-.506-1.176-.506-2.866-2.567-3.49-1.898.473 1.23 2.037 2.16c1.564.932 1.686 1.178 1.464 1.53s-3.675-2.511-4-1.297c-.323 1.214 3.524 1.567 3.287 2.405-.238.839-2.71-1.587-3.216-.642-.506.946 3.49 2.056 3.522 2.064 1.29.33 4.568 1.028 5.713-.624m5.349 0c-.824-1.19-.766-2.082.365-3.194 1.13-1.112 1.789-2.738 1.789-2.738s.246-.945.806-.858.97 1.499-.202 2.362c-1.173.864.233 1.45.685.64.451-.812 1.683-2.896 2.322-3.295s1.089-.175.938.647-2.822 2.813-2.562 3.244 1.176-.506 1.176-.506 2.866-2.567 3.49-1.898-.473 1.23-2.037 2.16c-1.564.932-1.686 1.178-1.464 1.53s3.675-2.511 4-1.297c.323 1.214-3.524 1.567-3.287 2.405.238.839 2.71-1.587 3.216-.642.506.946-3.49 2.056-3.522 2.064-1.29.33-4.568 1.028-5.713-.624"
+ }
+ ]
+ },
+ cursor: {
+ vb: "0 0 24 24",
+ paths: [
+ {
+ d: "M22.106 5.68L12.5.135a.998.998 0 00-.998 0L1.893 5.68a.84.84 0 00-.419.726v11.186c0 .3.16.577.42.727l9.607 5.547a.999.999 0 00.998 0l9.608-5.547a.84.84 0 00.42-.727V6.407a.84.84 0 00-.42-.726zm-.603 1.176L12.228 22.92c-.063.108-.228.064-.228-.061V12.34a.59.59 0 00-.295-.51l-9.11-5.26c-.107-.062-.063-.228.062-.228h18.55c.264 0 .428.286.296.514z",
+ evenodd: true
+ }
+ ]
+ },
+ openrouter: {
+ vb: "0 0 24 24",
+ paths: [
+ {
+ d: "M18.654 3.87a5.087 5.087 0 110 10.174L23.7 19.09c.64.641.187 1.737-.72 1.737H8.48a8.479 8.479 0 010-16.958h10.175zM8.479 7.26a5.087 5.087 0 100 10.176 5.087 5.087 0 000-10.175z",
+ evenodd: true
+ }
+ ]
+ },
+ opencode: {
+ vb: "0 0 24 24",
+ paths: [
+ {
+ d: "M16 6H8v12h8V6zm4 16H4V2h16v20z",
+ evenodd: true
+ }
+ ]
+ },
+ cohere: {
+ vb: "0 0 24 24",
+ paths: [
+ {
+ d: "M8.128 14.099c.592 0 1.77-.033 3.398-.703 1.897-.781 5.672-2.2 8.395-3.656 1.905-1.018 2.74-2.366 2.74-4.18A4.56 4.56 0 0018.1 1H7.549A6.55 6.55 0 001 7.55c0 3.617 2.745 6.549 7.128 6.549z",
+ evenodd: true
+ },
+ {
+ d: "M9.912 18.61a4.387 4.387 0 012.705-4.052l3.323-1.38c3.361-1.394 7.06 1.076 7.06 4.715a5.104 5.104 0 01-5.105 5.104l-3.597-.001a4.386 4.386 0 01-4.386-4.387z",
+ evenodd: true
+ },
+ {
+ d: "M4.776 14.962A3.775 3.775 0 001 18.738v.489a3.776 3.776 0 007.551 0v-.49a3.775 3.775 0 00-3.775-3.775z",
+ evenodd: true
+ }
+ ]
+ },
+ hermes: {
+ vb: "0 0 24 24",
+ paths: [
+ {
+ d: "M5.938 12.835c.127-.039.285.02.373.143.028.038.036.092.046.14.003.014-.02.033-.04.05-.124-.098-.24-.194-.354-.291-.011-.01-.016-.027-.025-.042zM8.396 9.412c.195-.032.39-.06.588-.05a.54.54 0 01.148.026c.202.071.402.147.601.224.028.01.05.036.075.055l-.013.027a9.203 9.203 0 01-.26-.089c-.115-.038-.213-.077-.315-.098-.25-.05-.25-.046-.292-.014l.574.144c.275.139.55.276.823.417.042.022.09.057.107.098.026.06.063.076.117.072.066-.006.132-.017.213-.027l-.04.086c.051.08.142.02.216.064-.074.13-.247.09-.334.199l.061.074-.12.087c0 .106-.038.168-.306.243l.026.085-.196.042.07.124h-.25l-.007.137c-.081-.01-.161-.018-.244-.027l-.053.123c-.027-.008-.052-.011-.073-.023-.067-.038-.128-.056-.195.006-.019.017-.063.014-.093.008-.026-.006-.05-.029-.07-.042-.11.095-.11.095-.208.003-.057.046-.12.074-.186.011-.063.027-.123-.02-.178-.014-.07.007-.097-.035-.133-.07l-.13.033c-.013-.236-.194-.19-.34-.203.005-.072.05-.092.095-.094a.474.474 0 01.159.022c.164.05.32.12.496.138.203.021.405.029.601-.015.265-.059.52-.149.707-.365.049-.056.083-.127.117-.195.019-.038.02-.084-.02-.116a1.397 1.397 0 00-.382-.217c.024.12-.031.182-.115.221 0 .014-.004.025 0 .03.08.115.084.16-.007.267a1.39 1.39 0 01-.218.211.477.477 0 01-.641-.05 1.36 1.36 0 01-.133-.152c-.078-.107-.076-.108-.033-.236-.165-.08-.128-.226-.104-.364.008-.05.028-.096.049-.163-.04.014-.067.017-.087.032a.897.897 0 00-.316.357c-.007.016-.01.034-.02.047-.012.015-.034.038-.045.035-.02-.006-.037-.027-.05-.045-.008-.012-.007-.032-.012-.057h-.126l.053-.172a14.82 14.82 0 00-.039-.049l.11-.284c-.06.026-.091.044-.124.051-.03.007-.064 0-.095 0 0-.031-.01-.07.004-.092.149-.22.305-.428.593-.476z",
+ evenodd: true
+ },
+ {
+ d: "M8.06 10.788c-.003-.038-.004-.075.037-.062.016.006.034.048.028.067-.01.04-.038.032-.064-.005z",
+ evenodd: true
+ },
+ {
+ d: "M11.981.009c.226-.012.453-.011.679 0 .247.01.495.024.74.062.401.064.798.157 1.19.273.463.138.92.299 1.356.511a7.31 7.31 0 012.948 2.642c.292.469.536.963.739 1.479.219.556.446 1.11.623 1.683.204.654.329 1.326.458 1.997.097.504.182 1.01.29 1.511.156.722.329 1.44.494 2.16.186.812.4 1.615.63 2.415.102.355.193.713.282 1.072.11.436.202.876.254 1.323.031.278.066.557.073.837a7.56 7.56 0 01-.017.88c-.037.413-.1.818-.226 1.212a5.017 5.017 0 01-.915 1.649l-.13.156.018.023c.043-.023.088-.041.127-.068.2-.138.373-.307.531-.49.4-.46.721-.973.975-1.529a3.59 3.59 0 00.325-1.72c-.024-.424-.097-.834-.3-1.213-.013-.027-.015-.06-.03-.121.05.035.082.048.101.072.107.13.22.258.315.398.33.494.46 1.052.486 1.64a3.75 3.75 0 01-.47 1.97c-.36.655-.887 1.14-1.526 1.506-.193.111-.394.21-.595.308-.157.078-.248.211-.318.365a.522.522 0 00-.033.406.359.359 0 01.013.139c-.005.077-.077.155-.14.162-.054.006-.125-.043-.15-.116a1.206 1.206 0 01-.06-.233c-.04-.314-.155-.6-.308-.87a3.906 3.906 0 00-.73-.91 2.129 2.129 0 00-.897-.524 4.093 4.093 0 00-.692-.131c-.075-.008-.15-.04-.22.01.18.06.363.11.538.18.434.173.82.43 1.18.728.308.255.58.543.794.884.098.155.186.315.227.496.027.123.042.25.067.375.013.062-.002.109-.053.144-.047.033-.122.034-.163-.01a.455.455 0 01-.08-.14c-.03-.073-.038-.159-.078-.225a7.314 7.314 0 00-1.423-1.664c-.16-.137-.329-.26-.537-.323-.376-.114-.753-.203-1.15-.154-.213.025-.427.032-.64.053a1.6 1.6 0 00-.736.278 5.14 5.14 0 00-.834.72c-.329.342-.642.699-.955 1.055-.136.155-.264.319-.314.531a5.227 5.227 0 00-.012.051.096.096 0 01-.09.076h-.31c-.046 0-.082-.048-.072-.094.023-.108.045-.216.07-.324.075-.325.19-.635.368-.917.024-.039.04-.088.104-.08l.01.049.027.077c.28-.435.571-.834.996-1.135.283-.204.584-.378.89-.55a.196.196 0 00-.098-.002c-.162.043-.325.084-.485.134-.402.124-.764.33-1.11.566-.147.1-.298.193-.414.333a7.314 7.314 0 00-1.07 1.767.845.845 0 00-.04.12.075.075 0 01-.072.056h-.494c-.04 0-.062-.051-.036-.082.123-.14.246-.282.377-.415.275-.281.58-.532.777-.884.027-.048.063-.09.095-.135.238-.333.54-.607.818-.902.082-.086.175-.16.26-.24.029-.027.053-.057.079-.085l-.018-.025-.135.041c-.034.017-.07.031-.102.05-.248.144-.494.292-.743.433-.408.23-.825.439-1.209.711-.281.2-.591.358-.889.533-.02.012-.044.015-.08.028-.015-.135.143-.201.108-.336-.033.014-.064.02-.085.038-.111.096-.227.19-.328.296-.148.157-.284.325-.425.488-.125.143-.25.286-.373.431A.153.153 0 019.89 24H8.762a.316.316 0 00.016-.042c.028-.09.085-.172.083-.28-.091-.018-.162.001-.212.077a4.45 4.45 0 00-.136.215c-.01.016-.024.03-.042.03h-.093c-.019 0-.029-.022-.017-.037.071-.088.14-.178.209-.268.001-.002-.006-.012-.012-.024-.014.004-.03.006-.045.013-.176.09-.352.181-.527.274a.363.363 0 01-.168.042H5.202c-.026 0-.039-.036-.019-.053.21-.178.402-.374.558-.605.335-.496.538-1.047.667-1.629.004-.02-.003-.043-.006-.091-.037.048-.059.072-.076.1a1.943 1.943 0 01-.334.415c-.28.258-.59.448-.983.464-.297.012-.588 0-.865-.127-.46-.21-.722-.57-.794-1.072-.025-.17-.017-.171-.182-.219A3.513 3.513 0 011.97 20.6a2.286 2.286 0 01-.808-1.13 3.569 3.569 0 01-.16-1.245c.002-.034.016-.067.024-.1.032.023.046.043.05.066.033.153.059.308.096.46.086.355.257.664.516.92.258.256.571.419.91.532.358.118.717.138 1.07-.016a1.89 1.89 0 00.621-.452c.328-.348.533-.76.648-1.223.009-.034.005-.071.007-.11-.015.006-.026.006-.03.011-.031.05-.064.1-.093.152-.284.502-.679.887-1.196 1.135-.351.17-.718.255-1.11.159a1.607 1.607 0 01-.971-.64 2.006 2.006 0 01-.368-.924 2.903 2.903 0 01.02-.886c.05-.439.466-1.17.742-1.271-.02.063-.035.112-.053.16-.043.116-.097.227-.13.345a1.901 1.901 0 00-.05.82c.033.212.09.416.204.6.147.236.346.407.62.465.11.023.225.014.338.018a.576.576 0 00.386-.131c.164-.128.282-.292.366-.481.168-.375.24-.777.309-1.179.05-.296.093-.594.133-.893.039-.281.071-.563.104-.845.026-.232.048-.464.074-.696.024-.228.052-.455.076-.683.024-.227.047-.455.069-.683.013-.14.022-.28.034-.42l.037-.417c.022-.25.041-.5.065-.748.008-.082-.02-.132-.09-.177a2.46 2.46 0 01-.492-.418c-.1-.109-.188-.228-.282-.342-.035-.042-.056-.097-.116-.118a2.084 2.084 0 00.275.597c.06.092.131.176.196.265.063.086.182.115.234.226-.028.003-.046.01-.06.006a4.74 4.74 0 01-.22-.057 2.71 2.71 0 01-1.287-.819c-.435-.487-.656-1.076-.71-1.723a5.206 5.206 0 01.014-1.06c.072-.602.22-1.186.45-1.745.155-.376.338-.741.526-1.102.205-.393.466-.75.765-1.076.512-.559 1.104-1.024 1.726-1.448.717-.49 1.478-.898 2.277-1.233C8.244.828 8.767.632 9.31.494c.655-.166 1.31-.33 1.982-.415.229-.03.458-.058.688-.07zm-1.847 22.82c-.07.06-.147.111-.207.18-.238.27-.464.549-.668.869l-.044.108a.177.177 0 00.093-.057c.174-.19.351-.378.519-.574.104-.122.195-.255.288-.386.024-.034.03-.08.046-.12l-.027-.02zm1.65-3.695a5.51 5.51 0 00-.653.593l-.37.386a.963.963 0 01-.377.25 1.372 1.372 0 01-.467.09c-.044 0-.087.006-.151.012.028.058.043.097.064.131.15.242.301.482.45.724.136.22.276.438.399.666.068.125.105.267.156.404.077.027.14-.018.202-.048.29-.135.579-.274.867-.412.213-.101.437-.186.636-.31.347-.215.68-.455 1.018-.685.015-.01.026-.028.042-.046-.023-.019-.038-.037-.056-.044-.287-.111-.527-.3-.77-.482a5.319 5.319 0 01-.506-.42 1.757 1.757 0 01-.41-.653c-.019-.049-.045-.095-.075-.156zm-5.847.264c-.06.096-.097.194-.132.293a3.38 3.38 0 01-.555 1.01c-.2.25-.455.412-.762.493-.23.06-.464.076-.7.07-.048-.002-.097.002-.158.005.016.04.021.066.035.085.1.145.23.246.4.295.157.046.316.034.498.023.181-.037.343-.115.485-.234.238-.199.402-.454.536-.732.175-.363.264-.751.342-1.144.01-.053.008-.11.011-.164zm14.945-4.586c.008.029.016.057.027.107.024.155.051.31.072.464.03.219.067.437.078.657.017.344.027.689-.014 1.033-.037.315-.063.633-.116.946a6.153 6.153 0 01-.46 1.518c-.008.018-.01.039-.02.082.047-.03.077-.042.098-.064.085-.083.17-.167.248-.255.271-.305.458-.66.596-1.043.18-.498.228-1.011.145-1.531-.103-.65-.33-1.263-.597-1.881a9.055 9.055 0 00-.024-.055l-.033.022zM5.797 8.29a.26.26 0 00.018.153c.124.251.25.501.379.75.025.049.066.09.03.163-.284.06-.578.119-.88.255.059.038.097.06.132.087.042.032.112.058.09.12-.01.033-.075.048-.117.072.017.01.043.021.067.036.166.102.33.207.447.368.138.192.229.404.188.644-.079.469-.306.85-.69 1.132-.054.04-.106.083-.161.122a.243.243 0 00-.103.245.77.77 0 00.055.195c.083.196.22.35.375.492.083.076.159.164.222.257a.37.37 0 01.025.377c-.023.05-.05.099-.076.148-.03.06-.028.111.022.162.041.042.08.089.112.138.038.058.078.079.147.05a.486.486 0 01.333-.006c.16.046.302.126.444.21.13.077.264.149.4.219.067.035.14.05.219.026.071-.022.124.01.145.076.02.064-.003.108-.074.139-.07.03-.137.063-.209.088-.1.035-.201.073-.314.077-.013-.107.11-.088.127-.159-.206-.126-.643-.145-.801-.034.063.112.035.21-.096.313-.13-.1-.025-.202.002-.3a.209.209 0 00-.249.17c-.015.101.067.216.178.224.108.007.218-.005.326-.012.06-.005.12-.027.199 0-.103.123-.248.127-.357.19.002.05.07.086.019.131-.053.048-.095-.001-.132-.03-.08-.063-.16-.126-.231-.197a.474.474 0 01-.157-.311.52.52 0 00-.043-.172c-.032-.074-.032-.137.033-.19-.018-.03-.028-.053-.045-.072a1.222 1.222 0 01-.196-.369c-.053-.137-.046-.264.048-.381.024-.03.05-.06.064-.095a.664.664 0 00.047-.168c.017-.165-.064-.287-.182-.387-.186-.156-.36-.322-.46-.551-.005-.011-.024-.017-.037-.026-.011.017-.024.027-.025.038-.019.185-.045.37-.052.557-.014.377.058.743.162 1.104.118.41.289.798.488 1.173.267.502.537 1.002.812 1.5.055.098.13.189.208.27.198.202.452.272.724.273.202 0 .404-.006.605-.026.295-.03.59-.073.884-.113.183-.025.365-.057.548-.08.21-.026.38.073.522.21.16.156.305.327.447.5.22.265.397.56.554.867.05.098.07.1.147.03.13-.121.26-.242.394-.36.067-.059.088-.12.067-.213a3.535 3.535 0 01-.085-.796c.002-.157.006-.314.018-.471.015-.224.03-.45.06-.672a59.114 59.114 0 01.362-2.298c.087-.493.182-.984.268-1.477.06-.347.118-.694.162-1.043.034-.273.055-.55.063-.825.011-.332.003-.665.002-.998 0-.077.004-.155-.01-.23-.028-.142-.01-.155-.162-.19a5.826 5.826 0 00-.607-.107c-.146-.018-.207-.053-.221-.19-.006-.049-.025-.098-.041-.146-.009-.025-.024-.048-.046-.09l-.025.264c-.009.096-.029.116-.127.115-.055 0-.11-.008-.164-.008-.476 0-.952-.008-1.426.032-.095.008-.173-.015-.226-.103-.04-.066-.088-.126-.134-.186-.063-.084-.086-.093-.182-.06-.195.068-.388.138-.582.21a2.71 2.71 0 00-.675.394.986.986 0 01-.323.168c-.033.01-.07.008-.127.013.02-.066.024-.114.047-.15.064-.105.135-.205.205-.306.023-.033.049-.063.073-.095l-.015-.023-.201.037c-.146.04-.296.07-.437.122-.148.053-.266.023-.386-.072a3.623 3.623 0 01-.733-.786l-.093-.132zm8.592 8.963l-.147.09c-.22.134-.44.266-.659.402-.093.058-.184.12-.27.188-.085.07-.124.161-.072.272.047.1.093.2.147.294.047.08.124.138.213.147.11.01.228.012.336-.012.217-.05.372-.205.528-.357a.291.291 0 00.087-.308c-.046-.18-.079-.365-.118-.547-.011-.052-.027-.103-.045-.169zm-.257-2.409c-.12.291-.205.597-.325.91-.151.433-.294.87-.435 1.323.036-.01.054-.01.067-.018.261-.16.522-.324.785-.484.054-.033.071-.078.065-.138-.012-.13-.024-.262-.034-.393l-.068-.886c-.008-.103-.02-.206-.029-.31-.009 0-.017-.002-.026-.004zm3.081-8.13l.099.285c.08.231.159.463.24.714l.58 1.952c.187.63.372 1.262.558 1.893.114.382.235.762.343 1.146.072.257.126.519.186.799.044.206.087.413.127.64.034.106.023.226.077.325l.025-.006-.068-.362c-.038-.206-.077-.412-.113-.638-.015-.07-.029-.141-.046-.211-.095-.396-.177-.796-.29-1.187-.196-.685-.413-1.364-.618-2.046-.165-.549-.322-1.1-.488-1.648-.069-.227-.15-.45-.226-.695l-.117-.336c-.037-.107-.075-.216-.115-.322-.04-.106-.084-.21-.127-.314a7.558 7.558 0 01-.027.01zM6.225 14.304c-.063-.001-.115.014-.134.083a.35.35 0 00.41.012 4.533 4.533 0 00-.276-.095zM5.23 11.98c-.026-.027-.057-.048-.075.002-.012.032-.007.07-.01.113.082-.037.082-.037.085-.115zm.062-1.189a.135.135 0 00-.088.056.197.197 0 00-.025.11c.005.152.01.306.026.457a.751.751 0 00.066.218c.061.136.157.167.288.101.055-.027.06-.054.025-.11a4.52 4.52 0 01-.129-.211c-.015-.068-.066-.131-.033-.207.04-.09-.076-.116-.074-.19V10.874c-.003-.038-.006-.087-.056-.083zm-.017-.968a.867.867 0 00-.467.127c-.076.045-.084.07-.05.158.034.087.07.173.115.254.064.117.09.125.21.077a.657.657 0 01.336-.053c.202.022.357.136.504.264l.092.077c.007-.006.014-.013.022-.018-.019-.105-.035-.226-.149-.264-.157-.053-.324-.075-.508-.117l-.24-.005c.24-.169.452-.044.687.009-.063-.115-.153-.147-.23-.193-.082-.05-.17-.092-.25-.144-.06-.037-.12-.08-.072-.172zm10.233.325c-.23-.01-.427.08-.608.211-.034.026-.06.065-.105.117.087.026.15.046.232.065.044-.015.088-.03.13-.046.306-.114.61-.115.904.031.126.063.237.04.366-.005-.02-.031-.03-.054-.045-.071a.986.986 0 00-.448-.273c-.14-.044-.284-.024-.426-.03zM7.99 6.483a.308.308 0 00.002.133c.08.321.156.643.242.962.104.387.27.75.456 1.103.02.037.061.08.098.087a.404.404 0 00.253-.051l-.472-.84c-.23-.448-.405-.92-.579-1.394zM10.397.497c-.2-.008-.405.004-.603.034-.236.035-.47.087-.7.152-.287.08-.569.18-.852.273-.04.013-.074.038-.11.058.028.014.05.018.07.014.287-.068.58-.085.873-.09.134-.002.269.009.402.025.19.024.382.048.57.09.456.104.874.3 1.265.556.464.306.888.66 1.257 1.078.205.232.395.475.56.739.17.274.315.561.449.856.273.601.456 1.232.6 1.876.04.173.07.348.1.524.017.104.065.167.17.19.122.028.2.105.22.251-.003.102-.06.174-.129.24a1.065 1.065 0 00-.268.358.164.164 0 00.083-.039c.08-.086.162-.172.235-.265a.56.56 0 00.13-.333c.009-.05.022-.1.024-.15.007-.124-.017-.15-.143-.168-.025-.004-.049-.014-.073-.015-.082-.007-.125-.063-.137-.131-.033-.198-.004-.355.247-.408.086-.018.174-.03.26-.042.158-.023.315-.053.473-.067.14-.012.19.033.226.167.008.029.018.057.021.087.019.179-.008.225-.141.288-.027.013-.055.024-.078.042a.148.148 0 00-.051.067c-.039.144.073.382.206.445l.673.32c.023.011.05.015.075.023l.018-.026c-.015-.008-.032-.013-.044-.024a2.27 2.27 0 00-.544-.32 4.898 4.898 0 00-.173-.075.203.203 0 01-.126-.191c-.003-.085.045-.154.128-.187l.059-.025c.099-.044.118-.076.112-.187a.384.384 0 00-.008-.063c-.067-.294-.123-.59-.205-.88a9.478 9.478 0 00-.826-2.036 7.465 7.465 0 00-1.39-1.805 4.536 4.536 0 00-1.177-.824 3.656 3.656 0 00-1.016-.328 6.155 6.155 0 00-.712-.074zm6.719 5.955c.01.014.018.028.038.034l-.022-.044-.016.01zM4.103 3.917a.062.062 0 01-.03.012.455.455 0 01-.04.039c-.01.01-.02.02-.045.04l-.363.354c-.088.085-.17.178-.266.253-.284.22-.425.53-.544.855a.132.132 0 00-.007.071c.013.055.033.108.052.168l.074.026c-.017.056-.03.105-.047.152-.058.164-.118.327-.175.491-.005.015.008.036.019.077.08-.175.158-.33.225-.489.228-.544.484-1.074.819-1.561.09-.133.182-.266.283-.401.004-.006.007-.013.022-.03.001-.016.003-.032.015-.04l.008-.017zm12.976 2.408a.023.023 0 01.009.019.073.073 0 00-.006.01.188.188 0 00.007.02l.018.022c.002-.007.007-.016.005-.021-.003-.01-.012-.018-.02-.038a1.331 1.331 0 01-.013-.012zM4.199 4.48c-.003.004-.008.008-.027.014-.005.013-.011.025-.031.047a2.085 2.085 0 01-.124.167c-.048.07-.116.055-.181.041-.134-.028-.228.016-.287.143-.089.187-.187.37-.273.56-.049.108-.11.216-.118.36.081.003.154.007.228.008h.228a2.563 2.563 0 01-.079.264c-.01.052-.022.103-.033.155l.02.004c.018-.046.037-.092.067-.153.066-.142.13-.285.2-.426.02-.04.034-.1.116-.092 0 .043.004.084 0 .124-.005.045-.017.09-.028.143.141.043.086.174.115.269.102-.022.104-.195.248-.144v.205l.017.002.439-1.059c-.13 0-.246-.02-.358.033-.024.011-.058-.001-.108-.004.075-.15.139-.278.211-.417a.128.128 0 01.025-.036c0-.015-.001-.03.008-.038l.006-.02c-.005.006-.01.011-.028.017-.004.012-.009.024-.026.045a.085.085 0 01-.032.033c-.123.157-.09.164-.258.106-.079-.027-.078-.028-.047-.144.028-.046.056-.093.098-.15 0-.016-.001-.032.007-.042L4.2 4.48zm2.073-.67c-.003.006-.007.011-.027.016-.094.125-.194.246-.28.377-.155.238-.301.481-.451.723-.14.224-.345.368-.575.481-.017.008-.04.006-.079.011.012-.059.016-.109.033-.153a6.076 6.076 0 01.229-.518l-.007-.02a.138.138 0 01-.035.025c-.028.05-.055.1-.093.164-.26.424-.443.817-.442.95.024.004.048.011.073.013.177.013.188.007.26-.165.03-.07.077-.12.147-.15l.175-.07c.044-.018.085-.057.146-.032.003.05-.01.11.014.145.042.062.044.125.047.193.002.049.017.098.026.147.029-.034.039-.065.05-.097.142-.39.277-.782.428-1.17.1-.256.22-.504.33-.756.013-.03.013-.067.03-.092V3.81zm3.987-.34c0 .045.01.084.021.123.042.16.094.318.124.48.024.133.023.27.028.406 0 .033-.019.067-.032.11-.094-.058-.047-.158-.106-.215h-.125c-.015.072-.01.152-.046.2-.066.085-.155.154-.236.227-.043.038-.078.018-.103-.025l-.046-.087c-.065.035-.117.069-.172.093-.116.051-.235.095-.35.147-.085.038-.09.053-.07.147.014.075.034.148.047.223.013.072.05.109.123.124.233.05.462.115.657.265.058-.102.058-.102.168-.151.03-.014.06-.03.092-.042.08-.03.115-.017.15.06.023.048.041.098.066.158.06-.14-.042-.267.017-.416.157.18.24.39.375.567a.235.235 0 00.022-.098c.002-.124 0-.247.002-.371 0-.034.013-.067.02-.1l.032-.003c.11.155.13.354.226.52a3.036 3.036 0 00-.01-.392c-.004-.045 0-.074.05-.088.08.036.116.14.215.158-.03-.275-.423-1.137-.798-1.635-.114-.127-.2-.28-.34-.386zm-2.667.696c-.019.034-.03.05-.037.067-.061.185-.125.37-.18.556-.031.105-.087.169-.195.19-.09.019-.178.052-.268.073-.038.009-.089.015-.118-.003-.024-.016-.025-.069-.036-.106-.064.076-.082.087-.17.047-.133-.062-.262-.135-.393-.201-.048-.025-.093-.063-.17-.03-.043.12-.091.25-.137.382-.099.28-.087.242.095.453.046.048.102.03.154.023.054-.009.106-.03.16-.036.13-.013.26-.08.367-.015.204-.064.387-.122.571-.178.05-.015.089.005.114.054.022.042.034.093.082.121.038-.056-.013-.128.063-.178l.14.241-.042-1.46zm.278.358c-.096-.01-.107.01-.11.108-.002.038-.003.078.002.115.03.2.099.386.174.57.002.006.012.01.022.015l.078-.05c.052.036.081.088.153.088.205-.002.41.014.616.012.099-.001.158.042.205.12.018.03.024.077.088.066l-.08-.394c-.05-.195-.085-.395-.172-.589-.057.057-.114.068-.18.046a.72.72 0 00-.135-.028c-.22-.028-.44-.059-.66-.08zm10.254-1.727c.089.163.155.316.139.491-.016.168.026.342-.044.516-.047-.033-.088-.082-.112-.075-.117.035-.164-.057-.227-.115a4.772 4.772 0 01-.286-.29l-.104-.113a4.856 4.856 0 01-.023.019c.035.046.07.093.11.156.04.064.084.127.122.193.034.058.065.118.031.205-.082-.01-.164-.019-.246-.032-.06-.01-.101 0-.124.07-.031.098-.037.096-.15.09.02.042.036.08.057.116.041.074.03.138-.03.196-.06.06-.118.122-.178.181a.175.175 0 01-.185.046c-.222-.061-.447-.113-.67-.174-.032-.009-.063-.04-.086-.068-.03-.04-.052-.087-.08-.13-.044-.07-.09-.138-.136-.207a.18.18 0 00-.014.105c.012.127.03.253.035.38.005.1-.024.12-.121.104-.104-.017-.206-.04-.31-.058-.064-.012-.131-.028-.202.03l.081.208c.09 0 .166-.01.237.002a.819.819 0 01.458.251c.078.083.154.168.241.26l.018-.005c-.004-.006-.008-.013-.01-.04.014-.056-.062-.118.018-.178.031.03.064.057.088.09.058.078.111.159.169.257l.089.141.024-.013a2093.819 2093.819 0 01-.427-.934c.055.007.083.007.108.016.193.07.385.142.577.216.074.028.147.06.219.094.062.028.112.018.157-.033.05-.056.102-.112.154-.167.05-.051.095-.046.132.014.016.025.026.053.04.08.071.138.143.277.217.433l.159.308.025-.011c-.044-.106-.07-.218-.138-.334-.057-.182-.168-.346-.206-.545.136.034.362.326.567.732l.057.074.018-.011a1.563 1.563 0 01-.052-.127c-.046-.145-.097-.29-.136-.436-.022-.083-.036-.173.022-.26l.109.058-.026-.207.027-.016c.022.02.05.036.065.06.073.108.143.22.215.33.01.016.029.029.043.043-.036-.217-.2-.38-.229-.626l.155.112c.014-.166.012-.319.042-.465.032-.158-.023-.297-.063-.445.024.004.036.006.055.025.092.124.183.249.277.371.02.027.05.047.069.087l.04.063.019-.015a.293.293 0 01-.053-.082 27.922 27.922 0 01-.332-.49c-.221-.311-.363-.467-.485-.521zm-6.57.327c-.003.161.092.275.069.415l-.368.087c.09.139.032.237-.052.331-.05.057-.092.122-.143.178-.037.04-.046.078-.018.126l.16.275c.029.048.072.066.128.064.076-.003.152 0 .228-.001.116-.003.216.022.275.137.006.014.02.024.044.052.004-.059-.003-.098.01-.13.016-.04.04-.099.072-.108.084-.023.173-.024.26-.03.013-.001.027.018.04.029l.071.065c.019-.11-.082-.198-.024-.31l.126.04c-.026-.123-.07-.245-.071-.366 0-.123.051-.243.115-.36.107.062.16.156.234.253.183.265.36.533.494.834.165-.078.27.068.407.088-.003-.106-.133-.441-.197-.492a.142.142 0 00-.102-.028c-.06.011-.119.039-.191.063-.025-.039-.056-.078-.077-.122a3.936 3.936 0 00-.473-.783c-.076-.094-.16-.182-.228-.26l-.391.285c-.049.035-.094.03-.132-.017l-.169-.207c-.025-.03-.053-.059-.097-.108z",
+ evenodd: true
+ }
+ ]
+ },
+ openclaw: {
+ vb: "0 0 24 24",
+ paths: [
+ {
+ d: "M9.046 7.104a.527.527 0 110 1.055.527.527 0 010-1.055z",
+ evenodd: true
+ },
+ {
+ d: "M15.376 7.104a.528.528 0 110 1.056.528.528 0 010-1.056z",
+ evenodd: true
+ },
+ {
+ d: "M16.877 1.912c.58-.27 1.14-.323 1.616-.037a.317.317 0 01-.326.542c-.227-.136-.547-.153-1.022.068-.352.165-.765.45-1.234.866 2.683 1.17 4.4 3.5 5.148 5.921a6.421 6.421 0 00-.704.184c-.578.016-1.174.204-1.502.735-.338.55-.268 1.276.072 2.069l.005.012.007.014c.523 1.045 1.318 1.91 2.2 2.284-.912 3.274-3.44 6.144-5.972 6.988v2.109h-2.11v-2.11c-1.043.417-2.086.01-2.11 0v2.11h-2.11v-2.11c-2.531-.843-5.061-3.713-5.973-6.987.882-.373 1.678-1.238 2.2-2.284l.007-.014.006-.012c.34-.793.41-1.518.071-2.069-.327-.531-.923-.719-1.503-.735a6.409 6.409 0 00-.704-.183c.749-2.421 2.466-4.751 5.149-5.922-.47-.416-.88-.701-1.234-.866-.474-.221-.794-.204-1.021-.068a.318.318 0 01-.435-.109.317.317 0 01.109-.433c.476-.286 1.036-.233 1.615.037.49.229 1.031.628 1.621 1.182A9.924 9.924 0 0112 2.568c1.199 0 2.284.19 3.256.526.59-.554 1.13-.953 1.62-1.182zM8.835 6.577a1.266 1.266 0 100 2.532 1.266 1.266 0 000-2.532zm6.33 0a1.267 1.267 0 100 2.533 1.267 1.267 0 000-2.533z",
+ evenodd: true
+ },
+ {
+ d: "M.395 13.118c-.966-1.932-.163-3.863 2.41-3.365v-.001l.05.01c.084.018.17.038.26.06.033.009.067.017.1.027.084.022.168.048.255.076l.09.027c.528 0 .95.158 1.16.501.212.343.212.87-.105 1.61-.085.17-.178.333-.276.489l-.01.017a4.967 4.967 0 01-.62.791l-.019.02c-1.092 1.117-2.496 1.336-3.295-.262z",
+ evenodd: true
+ },
+ {
+ d: "M21.193 9.753c2.574-.5 3.378 1.433 2.411 3.365-.58 1.159-1.476 1.361-2.342.96l-.011-.005a2.419 2.419 0 01-.114-.056l-.019-.01a2.751 2.751 0 01-.115-.067l-.023-.014c-.035-.022-.071-.044-.106-.068l-.05-.035c-.55-.388-1.062-1.007-1.44-1.76-.276-.647-.311-1.132-.174-1.472.176-.439.636-.639 1.23-.639.032-.011.066-.02.099-.03.08-.026.16-.05.238-.072l.117-.03a5.502 5.502 0 01.3-.067z",
+ evenodd: true
+ }
+ ]
+ },
+ minimax: {
+ vb: "0 0 24 24",
+ paths: [
+ {
+ d: "M16.278 2c1.156 0 2.093.927 2.093 2.07v12.501a.74.74 0 00.744.709.74.74 0 00.743-.709V9.099a2.06 2.06 0 012.071-2.049A2.06 2.06 0 0124 9.1v6.561a.649.649 0 01-.652.645.649.649 0 01-.653-.645V9.1a.762.762 0 00-.766-.758.762.762 0 00-.766.758v7.472a2.037 2.037 0 01-2.048 2.026 2.037 2.037 0 01-2.048-2.026v-12.5a.785.785 0 00-.788-.753.785.785 0 00-.789.752l-.001 15.904A2.037 2.037 0 0113.441 22a2.037 2.037 0 01-2.048-2.026V18.04c0-.356.292-.645.652-.645.36 0 .652.289.652.645v1.934c0 .263.142.506.372.638.23.131.514.131.744 0a.734.734 0 00.372-.638V4.07c0-1.143.937-2.07 2.093-2.07zm-5.674 0c1.156 0 2.093.927 2.093 2.07v11.523a.648.648 0 01-.652.645.648.648 0 01-.652-.645V4.07a.785.785 0 00-.789-.78.785.785 0 00-.789.78v14.013a2.06 2.06 0 01-2.07 2.048 2.06 2.06 0 01-2.071-2.048V9.1a.762.762 0 00-.766-.758.762.762 0 00-.766.758v3.8a2.06 2.06 0 01-2.071 2.049A2.06 2.06 0 010 12.9v-1.378c0-.357.292-.646.652-.646.36 0 .653.29.653.646V12.9c0 .418.343.757.766.757s.766-.339.766-.757V9.099a2.06 2.06 0 012.07-2.048 2.06 2.06 0 012.071 2.048v8.984c0 .419.343.758.767.758.423 0 .766-.339.766-.758V4.07c0-1.143.937-2.07 2.093-2.07z",
+ evenodd: true
+ }
+ ]
+ },
+ voyage: {
+ vb: "0 0 24 24",
+ paths: [
+ {
+ d: "M5.407 0v.066a.974.974 0 00-.048.245c-.011.11-.016.208-.016.295 0 .339.043.715.128 1.13.097.405.274.912.531 1.524l7.125 16.366L20.011 3.39c.161-.404.333-.846.515-1.327.182-.48.273-.966.273-1.458a1.406 1.406 0 00-.096-.54V0H24v.066c-.204.207-.45.578-.74 1.114-.29.535-.606 1.195-.949 1.982L13.095 24h-1.287L3.075 3.965c-.204-.47-.418-.923-.644-1.36-.214-.437-.418-.83-.61-1.18-.194-.36-.365-.66-.515-.9A5.666 5.666 0 001 .064V0h4.407z",
+ evenodd: true
+ }
+ ]
+ },
+ orca: {
+ vb: "6.6666669 70.666669 318.60232 202.66667",
+ paths: [
+ {
+ d: "m 177.81311,248.33334 c 23.82304,-41.29793 40.54045,-66.84626 49.51207,-75.66667 6.81685,-6.70196 10.07373,-8.7374 20.07265,-12.54475 34.57822,-13.16655 61.04674,-26.78733 72.37222,-37.24295 9.62924,-8.88966 9.34286,-9.01142 -23.43671,-9.964 -35.71756,-1.03796 -43.72989,0.42119 -62.17546,11.323 -16.72118,9.88265 -34.20103,30.11225 -42.74704,49.47157 -2.57353,5.82985 -14.81294,44.3056 -27.96399,87.90747 -2.86036,9.48343 -3.02466,11.71633 -0.86213,11.71633 0.44382,0 7.29659,-11.25 15.22839,-25 z m -65.14644,-8.32267 C 120,239.3326 130.5,237.50979 136,235.95998 c 5.5,-1.5498 12.25,-3.13783 15,-3.52895 2.75,-0.39111 5,-0.95485 5,-1.25275 0,-0.29789 2.15135,-7.58487 4.78078,-16.19328 8.49209,-27.80201 12.21334,-40.41629 21.13747,-71.65166 4.81891,-16.86667 11.23502,-39.185 14.25802,-49.596301 5.12803,-17.66103 5.74763,-23.07037 2.64253,-23.07037 -1.84887,0 -4.07048,6.908293 -16.72243,52.000001 -21.78975,77.65896 -20.80806,74.74393 -26.84794,79.72251 -7.5925,6.25838 -25.03916,14.82524 -36.10856,17.73044 -17.0947,4.48656 -33.410599,3.86724 -53.116765,-2.01622 -18.569242,-5.54403 -23.142662,-5.80284 -33.639754,-1.9037 -5.875424,2.18242 -9.864152,5.04363 -16.716684,11.99127 -4.95,5.0187 -9.0000001,10.02884 -9.0000001,11.13364 0,1.75174 5.9276921,2.00299 46.3333351,1.96383 25.483334,-0.0247 52.333338,-0.59969 59.666668,-1.27777 z M 252.69513,104.63708 c 12.18267,-3.48651 15.77304,-7.895503 9.63821,-11.835773 -10.19296,-6.546726 -36.19849,-1.77301 -41.19436,7.561863 -1.2556,2.3461 -0.98698,3.2037 1.68353,5.375 2.69471,2.19098 4.59991,2.47691 12.53928,1.88189 5.14899,-0.3859 12.94899,-1.72824 17.33334,-2.98298 z"
+ }
+ ]
+ },
+ pi: {
+ vb: "0 0 800 800",
+ paths: [
+ {
+ d: "M165.29 165.29 H517.36 V400 H400 V517.36 H282.65 V634.72 H165.29 Z M282.65 282.65 V400 H400 V282.65 Z",
+ evenodd: true
+ },
+ {
+ d: "M517.36 400 H634.72 V634.72 H517.36 Z"
+ }
+ ]
+ },
+ search: {
+ vb: "0 0 24 24",
+ paths: [
+ {
+ d: "M10.5 4a6.5 6.5 0 1 0 0 13 6.5 6.5 0 0 0 0-13Z M15.3 15.3 20 20",
+ stroke: 2
+ }
+ ]
+ },
+ store: {
+ vb: "0 0 24 24",
+ paths: [
+ {
+ d: "M4 6c0-1.66 3.58-3 8-3s8 1.34 8 3v12c0 1.66-3.58 3-8 3s-8-1.34-8-3Z M4 6c0 1.66 3.58 3 8 3s8-1.34 8-3 M4 12c0 1.66 3.58 3 8 3s8-1.34 8-3",
+ stroke: 2
+ }
+ ]
+ },
+ hook: {
+ vb: "0 0 24 24",
+ paths: [
+ {
+ d: "M15 3v10.5a5 5 0 0 1-10 0V11 M15 3h-3 M5 11l2.5 2.5",
+ stroke: 2
+ }
+ ]
+ }
+};
diff --git a/scripts/docs-sync.state.json b/scripts/docs-sync.state.json
index 7f6afbb042..5425d72610 100644
--- a/scripts/docs-sync.state.json
+++ b/scripts/docs-sync.state.json
@@ -20,7 +20,7 @@
"12"
],
"tests": [
- "4900+"
+ "5000+"
],
"functions": [
"323"
diff --git a/scripts/docs-sync.ts b/scripts/docs-sync.ts
index 7c38f1196a..68374c3ce6 100644
--- a/scripts/docs-sync.ts
+++ b/scripts/docs-sync.ts
@@ -3,6 +3,7 @@ import { existsSync, readFileSync, writeFileSync } from "node:fs";
import { dirname, join } from "node:path";
import { fileURLToPath } from "node:url";
import { ESSENTIAL_TOOLS, getAllTools } from "../src/mcp/tools-registry.js";
+import { renderReadmeDiagrams, type DiagramFacts } from "./readme-diagrams.js";
const ROOT = join(dirname(fileURLToPath(import.meta.url)), "..");
const STATE_PATH = "scripts/docs-sync.state.json";
@@ -56,6 +57,49 @@ function countFallbackTools(): number {
return (body.slice(0, body.indexOf("]);")).match(/"memory_\w+"/g) ?? []).length;
}
+function sourceNumber(path: string, pattern: RegExp, problems: string[]): number {
+ const match = read(path).match(pattern);
+ if (!match) problems.push(`${path} no longer matches ${pattern}`);
+ return match ? Number(match[1]) : 0;
+}
+
+function countInBlock(path: string, start: string, item: RegExp, problems: string[]): number {
+ const src = read(path);
+ const at = src.indexOf(start);
+ if (at < 0) {
+ problems.push(`${path} no longer contains ${start}`);
+ return 0;
+ }
+ const body = src.slice(at, src.indexOf("\n ];", at));
+ return body.match(item)?.length ?? 0;
+}
+
+function diagramFacts(problems: string[]): DiagramFacts {
+ const restPort = sourceNumber("src/config.ts", /env\["III_REST_PORT"\] \|\| "(\d+)"/, problems);
+ return {
+ restPort,
+ viewerPort: restPort + sourceNumber("src/config.ts", /\|\| restPort \+ (\d+);/, problems),
+ restEndpoints: Number(FACTS.find((f) => f.key === "restEndpoints")!.value()),
+ mcpTools: getAllTools().length,
+ resources: countInBlock("src/mcp/server.ts", "const MCP_RESOURCES = [", /uri: "agentmemory:\/\//g, problems),
+ prompts: countInBlock("src/mcp/server.ts", "const MCP_PROMPTS = [", /^ {4}\{/gm, problems),
+ hooks: countHookTypes(),
+ rrfK: sourceNumber("src/state/hybrid-search.ts", /const RRF_K = (\d+);/, problems),
+ tokenBudget: sourceNumber("src/config.ts", /tokenBudget: safeParseInt\(env\["TOKEN_BUDGET"\], (\d+)\)/, problems),
+ maxPerSession: sourceNumber("src/state/hybrid-search.ts", /maxPerSession = (\d+)/, problems),
+ };
+}
+
+function checkDiagramNames(svgs: Record, problems: string[]): void {
+ const source = sourceFiles().map(read).join("\n");
+ for (const [path, svg] of Object.entries(svgs)) {
+ const names = new Set(svg.replace(/`;
+
+type TextOpts = { size?: number; cls?: string; weight?: number; anchor?: string; ls?: number };
+
+function txt(x: number, y: number, s: unknown, { size = 12, cls = "ink sans", weight = 400, anchor = "start", ls = 0 }: TextOpts = {}): string {
+ return `${esc(s)} `;
+}
+
+function icon(name: string, x: number, y: number, size: number, kind: "logo" | "glyph" = "logo"): string {
+ const ic = ICONS[name];
+ const paths = ic.paths.map((path) => path.stroke
+ ? ` `
+ : ` `).join("");
+ const [, , vw, vh] = ic.vb.split(" ").map(Number);
+ const w = size * Math.min(vw / vh, 1.6);
+ return `${paths} `;
+}
+
+const AGENT_LOGOS: Record = {
+ "Claude Code": "claude",
+ Codex: "openai",
+ Cursor: "cursor",
+ "Copilot CLI": "copilot",
+ OpenCode: "opencode",
+ "Gemini CLI": "gemini",
+ Pi: "pi",
+ Hermes: "hermes",
+ OpenClaw: "openclaw",
+ Orca: "orca",
+};
+
+function architecture(f: DiagramFacts): string {
+ const W = 960, H = 650;
+ const p: string[] = [];
+ p.push(txt(W / 2, 26, "YOUR CODING AGENTS", { size: 11, cls: "acc sans", weight: 700, anchor: "middle", ls: 1.6 }));
+ const agents = ["Claude Code", "Codex", "Cursor", "Copilot CLI", "OpenCode", "Gemini CLI", "Pi", "Hermes", "OpenClaw", "Orca"];
+ const cw = 84, gap = 8, x0 = (W - (agents.length * cw + (agents.length - 1) * gap)) / 2;
+ agents.forEach((a, i) => {
+ const x = x0 + i * (cw + gap);
+ const logo = AGENT_LOGOS[a];
+ p.push(` `);
+ if (logo) p.push(icon(logo, x + cw / 2 - 8, 43, 16));
+ p.push(txt(x + cw / 2, logo ? 73 : 64, a, { size: 11.5, weight: 600, anchor: "middle" }));
+ p.push(` `);
+ });
+ p.push(` `);
+ p.push(` `);
+ p.push(txt(492, 118, "hooks · MCP · REST, bearer secret", { size: 12, cls: "muted sans" }));
+
+ p.push(` `);
+ p.push(txt(36, 152, "YOUR MACHINE", { size: 11, cls: "acc sans", weight: 700, ls: 1.6 }));
+ p.push(` `);
+ p.push(txt(160, 152, "binds to 127.0.0.1 by default", { size: 12.5, weight: 600 }));
+ p.push(txt(924, 152, "Keyless by default: nothing leaves until you opt in", { size: 12, cls: "muted sans", anchor: "end" }));
+
+ p.push(` `);
+ p.push(txt(56, 196, "agentmemory server", { size: 17, weight: 700 }));
+ p.push(` `);
+ p.push(txt(264, 195, `:${f.restPort}`, { size: 11, cls: "pilltx mono", weight: 700, anchor: "middle" }));
+ p.push(txt(56, 224, `REST · ${f.restEndpoints} endpoints · MCP · ${f.mcpTools} tools, ${f.resources} resources, ${f.prompts} prompts`, { size: 12.5 }));
+ p.push(txt(56, 248, "Privacy filter on every write · per-agent scope · audit log · circuit breaker", { size: 12, cls: "muted sans" }));
+
+ p.push(` `);
+ p.push(` `);
+ p.push(txt(680, 196, "Viewer", { size: 17, weight: 700 }));
+ p.push(` `);
+ p.push(txt(768, 195, `:${f.viewerPort}`, { size: 11, cls: "pilltx mono", weight: 700, anchor: "middle" }));
+ p.push(txt(680, 224, "Sessions, memories, graph, replay", { size: 12.5 }));
+ p.push(txt(680, 248, `Live events streamed from :${f.restPort}`, { size: 12, cls: "muted sans" }));
+
+ p.push(` `);
+ p.push(` `);
+ [176, 480, 784].forEach((x) => p.push(` `));
+
+ type Box = { lines: string[]; corner?: string; logos?: string[]; note?: string };
+ const lanes: Array<{ x: number; name: string; glyph: string; tag: string; hot?: boolean; top: Box; env: string; bot: Box }> = [
+ {
+ x: 36, name: "CAPTURE", glyph: "hook", tag: "hook events", hot: true,
+ top: { lines: ["Capture pipeline", "Durable inbox, offline spool", "Secrets stripped before storage", "Synthetic compression, no LLM"] },
+ env: "AGENTMEMORY_LLM_PROVIDER",
+ bot: { lines: ["LLM provider", "Summaries and consolidation"], logos: ["anthropic", "openai", "gemini", "openrouter", "minimax", "ollama"], note: "+ vLLM" },
+ },
+ {
+ x: 340, name: "RECALL", glyph: "search", tag: `RRF fusion, k = ${f.rrfK}`,
+ top: { lines: ["Hybrid search", "BM25, always on", "Session-diversified results", `${fmt(f.tokenBudget)}-token context budget`] },
+ env: "EMBEDDING_PROVIDER",
+ bot: { lines: ["Embedding provider", "Local all-MiniLM-L6-v2, or"], logos: ["huggingface", "gemini", "openai", "voyage", "cohere"], note: "+ OpenRouter" },
+ },
+ {
+ x: 644, name: "STORE", glyph: "store", tag: "versioned",
+ top: { lines: ["State store", "File store, no database service", "Four memory tiers, decay, TTL", "Git snapshots and rollback"], corner: "git" },
+ env: "AGENTMEMORY_STATE_BACKEND",
+ bot: { lines: ["Redis and peers", "Redis state backend", "Mesh sync between instances", "Shared secret on both peers"], corner: "redis" },
+ },
+ ];
+ for (const l of lanes) {
+ p.push(` `);
+ p.push(icon(l.glyph, l.x + 14, 330, 15, "glyph"));
+ p.push(txt(l.x + 36, 342, l.name, { size: 11, cls: "acc sans", weight: 700, ls: 1.6 }));
+ p.push(txt(l.x + 266, 342, l.tag, { size: 11.5, cls: "muted sans", weight: 600, anchor: "end" }));
+ const box = (y: number, b: Box): void => {
+ p.push(` `);
+ p.push(txt(l.x + 26, y + 26, b.lines[0], { size: 14.5, weight: 700 }));
+ b.lines.slice(1).forEach((s, i) => p.push(txt(l.x + 26, y + 48 + i * 18, s, { size: 12, cls: i === 0 ? "ink sans" : "muted sans" })));
+ if (b.corner) p.push(icon(b.corner, l.x + 240, y + 12, 18));
+ if (b.logos) {
+ b.logos.forEach((name, i) => p.push(icon(name, l.x + 26 + i * 26, y + 62, 17)));
+ if (b.note) p.push(txt(l.x + 26 + b.logos.length * 26 + 4, y + 75, b.note, { size: 11.5, cls: "muted sans" }));
+ }
+ };
+ box(356, l.top);
+ const ew = l.env.length * 6.7 + 22;
+ p.push(` `);
+ p.push(txt(l.x + 140, 492, l.env, { size: 11, cls: "acc mono", weight: 600, anchor: "middle" }));
+ box(514, l.bot);
+ }
+
+ return svgWrap(W, H, p.join("\n"),
+ "agentmemory architecture: coding agents connect through hooks, MCP and REST to a local server on its REST port with a viewer beside it; capture, recall and store lanes each have a local default and an opt-in provider.");
+}
+
+function iso(f: DiagramFacts): string {
+ const W = 1060, H = 1130;
+ const k = 0.866, h = 0.5;
+ const S = 340, D = 120, T = 14, OX = 220, GAP = 172, OY0 = 34;
+ const P = (ox: number, oy: number, u: number, v: number, z = 0): [number, number] => [ox + (u - v) * k, oy + (u + v) * h - z];
+ const poly = (pts: Array<[number, number]>, cls: string, extra = ""): string => ` `;
+ const mat = (ox: number, oy: number): string => `matrix(${k} ${h} ${-k} ${h} ${ox} ${oy})`;
+ const p: string[] = [];
+ const layers: Layer[] = [];
+
+ function slab(ox: number, oy: number, w: number, d: number, acc?: boolean): string {
+ const top = [P(ox, oy, 0, 0), P(ox, oy, w, 0), P(ox, oy, w, d), P(ox, oy, 0, d)];
+ const left = [P(ox, oy, 0, d), P(ox, oy, w, d), P(ox, oy, w, d, -T), P(ox, oy, 0, d, -T)];
+ const right = [P(ox, oy, w, 0), P(ox, oy, w, d), P(ox, oy, w, d, -T), P(ox, oy, w, 0, -T)];
+ return poly(left, acc ? "aleft" : "left") + poly(right, acc ? "aright" : "right") + poly(top, acc ? "atop" : "top");
+ }
+ const rectUV = (u: number, v: number, w: number, d: number, cls: string, dash?: boolean): string => ` `;
+ const tUV = (u: number, v: number, s: string, o?: TextOpts): string => txt(u, v, s, o);
+
+ const defs: LayerDef[] = [
+ {
+ title: "Your agents", lines: ["Claude Code, Codex, Cursor, Copilot CLI,", "OpenCode, Gemini CLI, Hermes, Orca and more."],
+ face() {
+ const names = ["Claude Code", "Codex", "Cursor", "Copilot CLI", "OpenCode", "Gemini CLI", "Pi", "Hermes", "OpenClaw", "Orca"];
+ const out: string[] = [];
+ names.forEach((n, i) => {
+ const c = i % 5, r = Math.floor(i / 5);
+ const u = 6 + c * 66, v = 12 + r * 52;
+ out.push(rectUV(u, v, 60, 42, "tile"));
+ const logo = AGENT_LOGOS[n];
+ if (logo) out.push(icon(logo, u + 23, v + 5, 14));
+ out.push(tUV(u + 30, logo ? v + 33 : v + 25, n, { size: 10, weight: 600, anchor: "middle" }));
+ });
+ return out.join("");
+ },
+ },
+ {
+ title: "Hooks, MCP, REST", lines: ["Hooks capture each tool call. MCP and REST", "save and recall, behind a bearer secret."],
+ face() {
+ const tiles: Array<[string, string]> = [["Hooks", `${f.hooks} lifecycle events`], ["MCP", `${f.mcpTools} tools`], ["REST", `${f.restEndpoints} endpoints`]];
+ return tiles.map(([a, b], i) => {
+ const u = i * 117;
+ return rectUV(u, 16, 106, 88, "tile") + tUV(u + 53, 56, a, { size: 17, weight: 700, anchor: "middle" }) + tUV(u + 53, 78, b, { size: 11, cls: "muted sans", anchor: "middle" });
+ }).join("");
+ },
+ },
+ {
+ title: "agentmemory server", acc: true, lines: [`One local process: API on :${f.restPort}, viewer on :${f.viewerPort}.`, "Secrets are stripped before anything is stored."],
+ face() {
+ const tiles: Array<[string, string]> = [["Capture", "privacy filter"], ["Compress", "synthetic"], ["Recall", "hybrid search"], ["Consolidate", "decay, TTL"]];
+ return tiles.map(([a, b], i) => {
+ const u = i * 87.3;
+ return rectUV(u, 16, 78, 88, "atile") + tUV(u + 39, 56, a, { size: 11.5, weight: 700, anchor: "middle" }) + tUV(u + 39, 75, b, { size: 10, cls: "muted sans", anchor: "middle" });
+ }).join("");
+ },
+ },
+ {
+ title: "Four memory tiers", lines: ["Raw observations become summaries, facts and", "workflows. Stale memories decay and evict."],
+ face() {
+ const tiers: Array<[string, string, string, string]> = [["WORKING", "raw observations", "t1", "t1x"], ["EPISODIC", "session summaries", "t2", "t1x"], ["SEMANTIC", "facts and patterns", "t3", "t4x"], ["PROCEDURAL", "workflows, decisions", "t4", "t4x"]];
+ return tiers.map(([a, b, c, x], i) => {
+ const v = 4 + i * 28.5;
+ return ` ` + tUV(18, v + 17, a, { size: 10.5, cls: `${x} sans`, weight: 700, ls: 1.2 }) + tUV(322, v + 17, b, { size: 10, cls: `${x} sans`, anchor: "end" });
+ }).join("");
+ },
+ },
+ {
+ title: "Three recall streams", lines: ["BM25 is always on. Vectors and graph join when", `you opt in. Results fuse with RRF, k = ${f.rrfK}.`],
+ face() {
+ const lanes: Array<[string, string, boolean]> = [["BM25", "always on", false], ["VECTOR", "EMBEDDING_PROVIDER", true], ["GRAPH", "GRAPH_EXTRACTION_ENABLED", true]];
+ return lanes.map(([a, b, dash], i) => {
+ const v = 5 + i * 38;
+ return rectUV(6, v, 328, 32, dash ? "card" : "atile", dash) + tUV(18, v + 21, a, { size: 11, cls: "ink sans", weight: 700, ls: 1.2 }) + tUV(322, v + 21, b, { size: dash ? 8.5 : 10, cls: dash ? "acc mono" : "muted sans", anchor: "end" });
+ }).join("");
+ },
+ },
+ {
+ title: "Your machine", base: true, lines: ["File state store in the OS data folder.", "Loopback only. Redis and mesh sync are optional."],
+ face() {
+ const g: string[] = [];
+ for (let u = 40; u < 380; u += 40) g.push(` `);
+ for (let v = 40; v < 160; v += 40) g.push(` `);
+ const rows: Array<[string, string]> = [["macOS", "~/Library/Application Support/agentmemory"], ["Linux", "$XDG_DATA_HOME/agentmemory"], ["Windows", "%APPDATA%\\agentmemory"]];
+ return g.join("") + icon("store", 22, 21, 16, "glyph") + tUV(44, 34, "FILE STATE STORE", { size: 11, cls: "acc sans", weight: 700, ls: 1.4 }) + rows.map(([os, path], j) => tUV(24, 66 + j * 26, os, { size: 11, weight: 700 }) + tUV(92, 66 + j * 26, path, { size: 11, cls: "muted mono" })).join("");
+ },
+ },
+ ];
+
+ const guides: string[] = [];
+ defs.forEach((d, i) => {
+ const pad = d.base ? 20 : 0;
+ const w = S + pad * 2, dd = D + pad * 2;
+ const oy = OY0 + i * GAP;
+ const ox = OX;
+ const o = P(ox, oy, -pad, -pad);
+ layers.push({ d, ox: o[0], oy: o[1], w, dd, i });
+ });
+ const first = layers[0];
+ for (const [u, v] of [[0, D], [S, 0], [S, D]]) {
+ const a = P(first.ox, first.oy, u, v), b = P(OX, OY0 + 5 * GAP, u, v);
+ guides.push(` `);
+ }
+ p.push(guides.join(""));
+ const yTop = OY0 + 60, yBot = OY0 + 4 * GAP + 120;
+ p.push(` `);
+ p.push(` `);
+ p.push(`WRITE PATH · DOWN, EVERY TOOL CALL `);
+ p.push(`READ PATH · UP, SESSION START AND RECALL `);
+
+ for (let i = layers.length - 1; i >= 0; i--) {
+ const L = layers[i];
+ p.push(slab(L.ox, L.oy, L.w, L.dd, L.d.acc));
+ p.push(`${L.d.face()} `);
+ }
+ for (const L of layers) {
+ const c = P(L.ox, L.oy, L.w, 0);
+ const ly = L.oy + 92;
+ const lx = 660;
+ p.push(` `);
+ p.push(` `);
+ p.push(txt(lx, ly, L.d.title, { size: 24, weight: 700 }));
+ L.d.lines.forEach((s, j) => p.push(txt(lx, ly + 26 + j * 22, s, { size: 15.5, cls: "muted sans" })));
+ }
+ return svgWrap(W, H, p.join("\n"), "agentmemory exploded view: agents, hooks/MCP/REST, the agentmemory server, four memory tiers, three recall streams, and the local machine that stores everything.");
+}
+
+
+function pipeline(f: DiagramFacts): string {
+ const W = 960, H = 560;
+ const p: string[] = [];
+ const BW = 118, G = 14, X0 = 166;
+ const col = (i: number): number => X0 + i * (BW + G);
+ const box = (i: number, y: number, lines: string[], opt: { n?: number; hot?: boolean; dash?: boolean } = {}): void => {
+ const x = col(i);
+ p.push(` `);
+ p.push(txt(x + 12, y + 22, lines[0], { size: 13, weight: 700 }));
+ if (opt.n) p.push(txt(x + BW - 10, y + 70, String(opt.n).padStart(2, "0"), { size: 10, cls: "faint mono", anchor: "end" }));
+ lines.slice(1).forEach((s, j) => p.push(txt(x + 12, y + 42 + j * 16, s, { size: 11, cls: s.startsWith("$") ? "acc mono" : "muted sans" })));
+ };
+ const flow = (y: number, n: number): void => {
+ p.push(` `);
+ };
+ const lane = (y: number, hook: string, sub: string, tone: string): void => {
+ p.push(` `);
+ p.push(txt(32, y + 22, hook, { size: 12.5, cls: "acc mono", weight: 700 }));
+ p.push(txt(32, y + 42, sub, { size: 11.5, cls: "muted sans" }));
+ };
+ p.push(txt(16, 24, "MEMORY PIPELINE", { size: 11, cls: "acc sans", weight: 700, ls: 1.6 }));
+ p.push(txt(944, 24, "dashed = opt-in", { size: 11.5, cls: "muted sans", anchor: "end" }));
+
+ lane(48, "PostToolUse", "every tool call", "hot");
+ flow(48, 6);
+ box(0, 48, ["Event", "stable event ID", "dedupe on replay"], { n: 1 });
+ box(1, 48, ["Inbox", "durable capture", "spool if offline"], { n: 2 });
+ box(2, 48, ["Privacy filter", "keys, tokens, URLs", " tags"], { n: 3, hot: true });
+ box(3, 48, ["Observation", "raw, per session", "provenance stamp"], { n: 4 });
+ box(4, 48, ["Compress", "synthetic default", "LLM opt-in"], { n: 5 });
+ box(5, 48, ["Index", "BM25 always", "vectors opt-in"], { n: 6 });
+
+ lane(170, "Stop · SessionEnd", "end of turn or session", "wash");
+ flow(170, 3);
+ box(0, 170, ["Summary", "incremental, only", "new observations"], { n: 1 });
+ box(1, 170, ["Graph", "entities and", "relations"], { n: 2, dash: true });
+ box(2, 170, ["Reflection", "updates memory", "slots"], { n: 3, dash: true });
+
+ const sy = 292;
+ p.push(` `);
+ p.push(icon("store", 32, sy + 13, 15, "glyph"));
+ p.push(txt(52, sy + 25, "STATE STORE", { size: 11, cls: "acc sans", weight: 700, ls: 1.6 }));
+ p.push(txt(32, sy + 43, "file store by default", { size: 11.5, cls: "muted sans" }));
+ const tiers: Array<[string, string, string]> = [["Working", "t1", "t1x"], ["Episodic", "t2", "t1x"], ["Semantic", "t3", "t4x"], ["Procedural", "t4", "t4x"]];
+ tiers.forEach(([n, c, x], i) => {
+ const tx = col(0) + i * 112;
+ p.push(` `);
+ p.push(txt(tx + 52, sy + 33, n, { size: 11.5, cls: `${x} sans`, weight: 700, anchor: "middle" }));
+ });
+ p.push(txt(928, sy + 25, "decay · TTL · contradiction checks", { size: 11.5, weight: 600, anchor: "end" }));
+ p.push(txt(928, sy + 43, "git snapshots · version chains", { size: 11.5, cls: "muted sans", anchor: "end" }));
+
+ const down = (x: number, y1: number, y2: number): number => p.push(` `);
+ down(col(3) + BW / 2, 126, sy);
+ down(col(5) + BW / 2, 126, sy);
+ down(col(0) + BW / 2, 248, sy);
+ down(col(1) + BW / 2, 248, sy);
+ down(col(2) + BW / 2, 248, sy);
+
+ lane(392, "SessionStart", "new session", "wash");
+ flow(392, 4);
+ box(0, 392, ["Profile", "top concepts,", "files, patterns"], { n: 1 });
+ box(1, 392, ["Hybrid search", "BM25 + vector", `+ graph, RRF k=${f.rrfK}`], { n: 2 });
+ box(2, 392, ["Token budget", `${fmt(f.tokenBudget)} by default`, `max ${f.maxPerSession} per session`], { n: 3 });
+ box(3, 392, ["Inject context", "when the host", "allows it"], { n: 4, dash: true });
+ [0, 1].forEach((i) => p.push(` `));
+ p.push(` `);
+ p.push(txt(col(4) + 36, 427, "agent prompt", { size: 12.5, weight: 700 }));
+ p.push(txt(col(4) + 36, 445, "$AGENTMEMORY_INJECT_CONTEXT=true", { size: 10.5, cls: "acc mono" }));
+
+ p.push(txt(16, 500, "Opt-in switches: AGENTMEMORY_AUTO_COMPRESS · EMBEDDING_PROVIDER · GRAPH_EXTRACTION_ENABLED · AGENTMEMORY_SLOTS + AGENTMEMORY_REFLECT", { size: 11, cls: "acc mono" }));
+ p.push(txt(16, 520, "Keyless installs skip every dashed step and all LLM calls: synthetic compression and BM25 recall still work.", { size: 12, cls: "muted sans" }));
+ p.push(txt(16, 540, "Secrets are scrubbed on every write path, including imports, mesh sync, summaries and graph nodes.", { size: 12, cls: "muted sans" }));
+
+ return svgWrap(W, H, p.join("\n"),
+ "agentmemory memory pipeline: PostToolUse captures, filters, stores, compresses and indexes each tool call; Stop and SessionEnd summarize; SessionStart builds a profile, runs hybrid search within a token budget and injects context.");
+}
+
+function svgWrap(w: number, h: number, body: string, label: string): string {
+ return `
+${STYLE}
+${body}
+
+`;
+}
+
+export function renderReadmeDiagrams(f: DiagramFacts): Record {
+ return {
+ "assets/diagrams/architecture.svg": architecture(f),
+ "assets/diagrams/pipeline.svg": pipeline(f),
+ "assets/diagrams/stack.svg": iso(f),
+ };
+}