@agentmemory/agentmemory 0.9.27 → 0.9.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env.example +15 -6
- package/AGENTS.md +7 -7
- package/README.md +292 -164
- package/dist/.env.example +15 -6
- package/dist/cli.d.mts.map +1 -1
- package/dist/cli.mjs +427 -177
- package/dist/cli.mjs.map +1 -1
- package/dist/{connect-bmZ5eqYN.mjs → connect-Qaeq15TQ.mjs} +717 -65
- package/dist/connect-Qaeq15TQ.mjs.map +1 -0
- package/dist/docker-compose.yml +2 -2
- package/dist/hooks/antigravity-bridge.d.mts +8 -0
- package/dist/hooks/antigravity-bridge.d.mts.map +1 -0
- package/dist/hooks/antigravity-bridge.mjs +114 -0
- package/dist/hooks/antigravity-bridge.mjs.map +1 -0
- package/dist/hooks/notification.mjs +21 -5
- package/dist/hooks/notification.mjs.map +1 -1
- package/dist/hooks/post-commit.mjs +15 -2
- package/dist/hooks/post-commit.mjs.map +1 -1
- package/dist/hooks/post-tool-failure.mjs +16 -4
- package/dist/hooks/post-tool-failure.mjs.map +1 -1
- package/dist/hooks/post-tool-use.mjs +16 -4
- package/dist/hooks/post-tool-use.mjs.map +1 -1
- package/dist/hooks/pre-compact.mjs +14 -3
- package/dist/hooks/pre-compact.mjs.map +1 -1
- package/dist/hooks/pre-tool-use.mjs +3 -2
- package/dist/hooks/pre-tool-use.mjs.map +1 -1
- package/dist/hooks/prompt-submit.mjs +16 -4
- package/dist/hooks/prompt-submit.mjs.map +1 -1
- package/dist/hooks/session-end.mjs +84 -19
- package/dist/hooks/session-end.mjs.map +1 -1
- package/dist/hooks/session-start.mjs +24 -5
- package/dist/hooks/session-start.mjs.map +1 -1
- package/dist/hooks/stop.mjs +3 -8
- package/dist/hooks/stop.mjs.map +1 -1
- package/dist/hooks/subagent-start.mjs +16 -4
- package/dist/hooks/subagent-start.mjs.map +1 -1
- package/dist/hooks/subagent-stop.mjs +16 -4
- package/dist/hooks/subagent-stop.mjs.map +1 -1
- package/dist/hooks/task-completed.mjs +16 -4
- package/dist/hooks/task-completed.mjs.map +1 -1
- package/dist/{image-refs-B5Zf_Djo.mjs → image-refs-BKLmp_sD.mjs} +4 -22
- package/dist/image-refs-BKLmp_sD.mjs.map +1 -0
- package/dist/image-refs-CJgZmb9X.mjs +34 -0
- package/dist/image-refs-CJgZmb9X.mjs.map +1 -0
- package/dist/index.mjs +1681 -911
- package/dist/index.mjs.map +1 -1
- package/dist/{image-store-Gpo2mgM9.mjs → keyed-mutex-DTHtcZrt.mjs} +14 -11
- package/dist/keyed-mutex-DTHtcZrt.mjs.map +1 -0
- package/dist/{logger-yHTcEBAI.mjs → logger-BEB7pCI9.mjs} +1 -1
- package/dist/{logger-yHTcEBAI.mjs.map → logger-BEB7pCI9.mjs.map} +1 -1
- package/dist/schema-BFZhNTF7.mjs +197 -0
- package/dist/schema-BFZhNTF7.mjs.map +1 -0
- package/dist/{src-MOg2zKJs.mjs → src-G7yt8gGm.mjs} +1521 -854
- package/dist/src-G7yt8gGm.mjs.map +1 -0
- package/dist/{standalone-BORXC71-.mjs → standalone-BqNJDJ04.mjs} +30 -16
- package/dist/standalone-BqNJDJ04.mjs.map +1 -0
- package/dist/standalone.d.mts.map +1 -1
- package/dist/standalone.mjs +55 -15
- package/dist/standalone.mjs.map +1 -1
- package/dist/{tools-registry-D8XVVPbJ.mjs → tools-registry-BV_2bu7z.mjs} +55 -17
- package/dist/tools-registry-BV_2bu7z.mjs.map +1 -0
- package/dist/viewer/favicon.svg +35 -1
- package/dist/viewer/index.html +473 -83
- package/docker-compose.yml +2 -2
- package/integrations/pi/README.md +77 -0
- package/integrations/pi/index.ts +403 -0
- package/integrations/pi/package.json +32 -0
- package/integrations/pi/security.ts +35 -0
- package/package.json +6 -4
- package/plugin/.claude-plugin/plugin.json +2 -2
- package/plugin/.codex-plugin/plugin.json +2 -2
- package/plugin/.devin-plugin/plugin.json +32 -0
- package/plugin/cursor/hooks.json +41 -0
- package/plugin/cursor/mcp.json +12 -0
- package/plugin/hooks/hooks.antigravity.json +43 -0
- package/plugin/hooks/hooks.devin.json +67 -0
- package/plugin/hooks/hooks.droid.json +55 -0
- package/plugin/opencode/README.md +1 -1
- package/plugin/opencode/agentmemory-capture.ts +73 -13
- package/plugin/opencode/plugin.json +1 -1
- package/plugin/plugin.json +2 -2
- package/plugin/scripts/antigravity-bridge.d.mts +8 -0
- package/plugin/scripts/antigravity-bridge.d.mts.map +1 -0
- package/plugin/scripts/antigravity-bridge.mjs +114 -0
- package/plugin/scripts/antigravity-bridge.mjs.map +1 -0
- package/plugin/scripts/notification.mjs +21 -5
- package/plugin/scripts/notification.mjs.map +1 -1
- package/plugin/scripts/post-commit.mjs +15 -2
- package/plugin/scripts/post-commit.mjs.map +1 -1
- package/plugin/scripts/post-tool-failure.mjs +16 -4
- package/plugin/scripts/post-tool-failure.mjs.map +1 -1
- package/plugin/scripts/post-tool-use.mjs +16 -4
- package/plugin/scripts/post-tool-use.mjs.map +1 -1
- package/plugin/scripts/pre-compact.mjs +14 -3
- package/plugin/scripts/pre-compact.mjs.map +1 -1
- package/plugin/scripts/pre-tool-use.mjs +3 -2
- package/plugin/scripts/pre-tool-use.mjs.map +1 -1
- package/plugin/scripts/prompt-submit.mjs +16 -4
- package/plugin/scripts/prompt-submit.mjs.map +1 -1
- package/plugin/scripts/session-end.mjs +84 -19
- package/plugin/scripts/session-end.mjs.map +1 -1
- package/plugin/scripts/session-start.mjs +24 -5
- package/plugin/scripts/session-start.mjs.map +1 -1
- package/plugin/scripts/stop.mjs +3 -8
- package/plugin/scripts/stop.mjs.map +1 -1
- package/plugin/scripts/subagent-start.mjs +16 -4
- package/plugin/scripts/subagent-start.mjs.map +1 -1
- package/plugin/scripts/subagent-stop.mjs +16 -4
- package/plugin/scripts/subagent-stop.mjs.map +1 -1
- package/plugin/scripts/task-completed.mjs +16 -4
- package/plugin/scripts/task-completed.mjs.map +1 -1
- package/plugin/skills/_shared/TROUBLESHOOTING.md +38 -0
- package/plugin/skills/agentmemory-agents/REFERENCE.md +31 -0
- package/plugin/skills/agentmemory-agents/SKILL.md +34 -0
- package/plugin/skills/agentmemory-architecture/SKILL.md +33 -0
- package/plugin/skills/agentmemory-config/REFERENCE.md +45 -0
- package/plugin/skills/agentmemory-config/SKILL.md +37 -0
- package/plugin/skills/agentmemory-hooks/REFERENCE.md +20 -0
- package/plugin/skills/agentmemory-hooks/SKILL.md +39 -0
- package/plugin/skills/agentmemory-mcp-tools/REFERENCE.md +66 -0
- package/plugin/skills/agentmemory-mcp-tools/SKILL.md +39 -0
- package/plugin/skills/agentmemory-rest-api/REFERENCE.md +142 -0
- package/plugin/skills/agentmemory-rest-api/SKILL.md +43 -0
- package/plugin/skills/commit-context/EXAMPLES.md +71 -0
- package/plugin/skills/commit-context/SKILL.md +53 -8
- package/plugin/skills/commit-history/EXAMPLES.md +71 -0
- package/plugin/skills/commit-history/SKILL.md +51 -9
- package/plugin/skills/forget/EXAMPLES.md +75 -0
- package/plugin/skills/forget/SKILL.md +57 -14
- package/plugin/skills/handoff/EXAMPLES.md +56 -0
- package/plugin/skills/handoff/SKILL.md +56 -9
- package/plugin/skills/lesson/SKILL.md +64 -0
- package/plugin/skills/memory-discipline/SKILL.md +57 -0
- package/plugin/skills/recall/EXAMPLES.md +74 -0
- package/plugin/skills/recall/SKILL.md +53 -11
- package/plugin/skills/recap/EXAMPLES.md +60 -0
- package/plugin/skills/recap/SKILL.md +51 -13
- package/plugin/skills/remember/EXAMPLES.md +67 -0
- package/plugin/skills/remember/SKILL.md +58 -17
- package/plugin/skills/session-history/EXAMPLES.md +59 -0
- package/plugin/skills/session-history/SKILL.md +54 -11
- package/plugin/skills/write-agentmemory-skill/SKILL.md +40 -0
- package/dist/connect-bmZ5eqYN.mjs.map +0 -1
- package/dist/image-refs-B5Zf_Djo.mjs.map +0 -1
- package/dist/image-store-Gpo2mgM9.mjs.map +0 -1
- package/dist/rolldown-runtime-twds-ZHy.mjs +0 -14
- package/dist/schema-CNiCWzV9.mjs +0 -78
- package/dist/schema-CNiCWzV9.mjs.map +0 -1
- package/dist/src-MOg2zKJs.mjs.map +0 -1
- package/dist/standalone-BORXC71-.mjs.map +0 -1
- package/dist/tools-registry-D8XVVPbJ.mjs.map +0 -1
- package/dist/version-9DNrRyph.mjs +0 -6
- package/dist/version-9DNrRyph.mjs.map +0 -1
- package/plugin/scripts/diagnostics.d.mts +0 -17
- package/plugin/scripts/diagnostics.d.mts.map +0 -1
- package/plugin/scripts/diagnostics.mjs.map +0 -1
package/README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<p align="center">
|
|
2
|
-
<img src="assets/banner.png" alt="agentmemory
|
|
2
|
+
<img src="assets/banner.png" alt="agentmemory: persistent memory for AI coding agents" width="720" />
|
|
3
3
|
</p>
|
|
4
4
|
|
|
5
5
|
<p align="center">
|
|
@@ -30,17 +30,7 @@
|
|
|
30
30
|
</p>
|
|
31
31
|
|
|
32
32
|
<p align="center">
|
|
33
|
-
<a href="https://
|
|
34
|
-
<picture>
|
|
35
|
-
<source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/chart?repos=rohitg00/agentmemory&type=date&theme=dark&legend=top-left" />
|
|
36
|
-
<source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/chart?repos=rohitg00/agentmemory&type=date&legend=top-left" />
|
|
37
|
-
<img alt="Star History Chart" src="https://api.star-history.com/chart?repos=rohitg00/agentmemory&type=date&legend=top-left" />
|
|
38
|
-
</picture>
|
|
39
|
-
</a>
|
|
40
|
-
</p>
|
|
41
|
-
|
|
42
|
-
<p align="center">
|
|
43
|
-
<a href="https://gist.github.com/rohitg00/2067ab416f7bbe447c1977edaaa681e2"><img src="https://img.shields.io/badge/Viral%20GitHub%20Gist-1.3k%20stars%20%2F%20182%20forks-FF6B35?style=for-the-badge&logo=github&logoColor=white&labelColor=1a1a1a" alt="Design doc: 1.3k stars / 182 forks on the gist" /></a>
|
|
33
|
+
<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>
|
|
44
34
|
</p>
|
|
45
35
|
|
|
46
36
|
<p align="center">
|
|
@@ -49,7 +39,6 @@
|
|
|
49
39
|
|
|
50
40
|
<p align="center">
|
|
51
41
|
<a href="https://www.npmjs.com/package/@agentmemory/agentmemory"><img src="https://img.shields.io/npm/v/@agentmemory/agentmemory?color=CB3837&label=npm&style=for-the-badge&logo=npm" alt="npm version" /></a>
|
|
52
|
-
<a href="https://www.npmjs.com/package/@agentmemory/agentmemory"><img src="https://img.shields.io/npm/dm/@agentmemory/agentmemory?color=CB3837&label=downloads&style=for-the-badge&logo=npm" alt="npm downloads" /></a>
|
|
53
42
|
<a href="https://github.com/rohitg00/agentmemory/actions"><img src="https://img.shields.io/github/actions/workflow/status/rohitg00/agentmemory/ci.yml?label=tests&style=for-the-badge&logo=github" alt="CI" /></a>
|
|
54
43
|
<a href="https://github.com/rohitg00/agentmemory/blob/main/LICENSE"><img src="https://img.shields.io/github/license/rohitg00/agentmemory?color=blue&style=for-the-badge" alt="License" /></a>
|
|
55
44
|
<a href="https://github.com/rohitg00/agentmemory/stargazers"><img src="https://img.shields.io/github/stars/rohitg00/agentmemory?style=for-the-badge&color=yellow&logo=github" alt="Stars" /></a>
|
|
@@ -58,10 +47,10 @@
|
|
|
58
47
|
<p align="center">
|
|
59
48
|
<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>
|
|
60
49
|
<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>
|
|
61
|
-
<picture><source media="(prefers-color-scheme: dark)" srcset="assets/tags/light/stat-tools.svg"><img src="assets/tags/stat-tools.svg" alt="
|
|
50
|
+
<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>
|
|
62
51
|
<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>
|
|
63
52
|
<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>
|
|
64
|
-
<picture><source media="(prefers-color-scheme: dark)" srcset="assets/tags/light/stat-tests.svg"><img src="assets/tags/stat-tests.svg" alt="1,
|
|
53
|
+
<picture><source media="(prefers-color-scheme: dark)" srcset="assets/tags/light/stat-tests.svg"><img src="assets/tags/stat-tests.svg" alt="1,674+ tests passing" height="38" /></picture>
|
|
65
54
|
</p>
|
|
66
55
|
|
|
67
56
|
<p align="center">
|
|
@@ -77,7 +66,6 @@
|
|
|
77
66
|
<a href="#how-it-works">How It Works</a> •
|
|
78
67
|
<a href="#mcp-server">MCP</a> •
|
|
79
68
|
<a href="#real-time-viewer">Viewer</a> •
|
|
80
|
-
<a href="#iii-console">iii Console</a> •
|
|
81
69
|
<a href="#powered-by-iii">Powered by iii</a> •
|
|
82
70
|
<a href="#configuration">Config</a> •
|
|
83
71
|
<a href="#api">API</a>
|
|
@@ -87,25 +75,58 @@
|
|
|
87
75
|
|
|
88
76
|
## Install
|
|
89
77
|
|
|
78
|
+
One command:
|
|
79
|
+
|
|
90
80
|
```bash
|
|
91
|
-
|
|
92
|
-
# If you hit EACCES on macOS/Linux system Node installs, retry with:
|
|
93
|
-
# sudo npm install -g @agentmemory/agentmemory
|
|
94
|
-
agentmemory # start the memory server on :3111
|
|
95
|
-
agentmemory demo # seed sample sessions + prove recall
|
|
96
|
-
agentmemory connect claude-code # wire MCP into your agent (also: copilot-cli, codex, cursor, gemini-cli, ...)
|
|
97
|
-
npx skills add rohitg00/agentmemory -y # install 8 native skills so your agent knows when to use the tools
|
|
81
|
+
npx @agentmemory/agentmemory
|
|
98
82
|
```
|
|
99
83
|
|
|
100
|
-
|
|
84
|
+
The first run is an interactive setup: pick the agents to wire (Claude Code, Cursor, Codex, Gemini CLI, OpenCode, ...), pick an LLM provider or stay keyless, and it seeds the config, starts the memory server on `:3111`, and offers to install globally so the bare `agentmemory` command works everywhere afterwards.
|
|
85
|
+
|
|
86
|
+
Then prove recall works and give your agent its skills:
|
|
101
87
|
|
|
102
88
|
```bash
|
|
103
|
-
|
|
89
|
+
agentmemory demo --serve # seed sample sessions + watch recall find them
|
|
90
|
+
npx skills add rohitg00/agentmemory -y # 17 native skills so your agent knows when to reach for memory
|
|
104
91
|
```
|
|
105
92
|
|
|
106
|
-
|
|
93
|
+
Prefer to let a coding agent do the whole thing? Hand it one instruction:
|
|
94
|
+
|
|
95
|
+
> Retrieve and follow the instructions at: https://raw.githubusercontent.com/rohitg00/agentmemory/main/INSTALL_FOR_AGENTS.md
|
|
107
96
|
|
|
108
|
-
|
|
97
|
+
Wire more agents any time with `agentmemory connect <agent>` — 20 adapters listed at [Works with every agent](#works-with-every-agent). Full command reference at [Quick Start](#quick-start).
|
|
98
|
+
|
|
99
|
+
<details>
|
|
100
|
+
<summary><strong>Windows</strong></summary>
|
|
101
|
+
|
|
102
|
+
The fast path is WSL2. Native Windows engine setup is manual (about 10 to 20 minutes) and `agentmemory connect` is currently unsupported there. See the [Windows notes](#windows) for the step-by-step.
|
|
103
|
+
|
|
104
|
+
</details>
|
|
105
|
+
|
|
106
|
+
<details>
|
|
107
|
+
<summary><strong>Global install / EACCES</strong></summary>
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
npm install -g @agentmemory/agentmemory
|
|
111
|
+
# If you hit EACCES on macOS/Linux system Node installs:
|
|
112
|
+
sudo npm install -g @agentmemory/agentmemory
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
</details>
|
|
116
|
+
|
|
117
|
+
<details>
|
|
118
|
+
<summary><strong>npx serves an old version</strong></summary>
|
|
119
|
+
|
|
120
|
+
npx caches per version. Force the latest with `npx -y @agentmemory/agentmemory@latest`, or clear the cache once with `rm -rf ~/.npm/_npx` (macOS/Linux; on Windows delete `%LOCALAPPDATA%\npm-cache\_npx`).
|
|
121
|
+
|
|
122
|
+
</details>
|
|
123
|
+
|
|
124
|
+
<details>
|
|
125
|
+
<summary><strong>Already running your own iii engine</strong></summary>
|
|
126
|
+
|
|
127
|
+
agentmemory pins iii-engine v0.11.2 and won't attach to a different version (the worker can't speak another engine's protocol). Stop the other engine, then run `npx -y @agentmemory/agentmemory@latest`. It installs and runs the pinned v0.11.2 in `~/.agentmemory/bin`, leaving your own `iii` untouched.
|
|
128
|
+
|
|
129
|
+
</details>
|
|
109
130
|
|
|
110
131
|
---
|
|
111
132
|
|
|
@@ -153,7 +174,7 @@ agentmemory works with any agent that supports hooks, MCP, or REST API. All agen
|
|
|
153
174
|
<td align="center" width="12.5%">
|
|
154
175
|
<a href="https://cursor.com"><picture><source media="(prefers-color-scheme: dark)" srcset="https://svgl.app/library/cursor_dark.svg"><img src="https://svgl.app/library/cursor_light.svg" alt="Cursor" width="48" height="48" /></picture></a><br/>
|
|
155
176
|
<strong>Cursor</strong><br/>
|
|
156
|
-
<sub>MCP
|
|
177
|
+
<sub>native plugin + MCP</sub>
|
|
157
178
|
</td>
|
|
158
179
|
<td align="center" width="12.5%">
|
|
159
180
|
<a href="https://github.com/google-gemini/gemini-cli"><img src="https://github.com/google-gemini.png?size=120" alt="Gemini CLI" width="48" height="48" /></a><br/>
|
|
@@ -193,9 +214,9 @@ agentmemory works with any agent that supports hooks, MCP, or REST API. All agen
|
|
|
193
214
|
<sub>MCP server</sub>
|
|
194
215
|
</td>
|
|
195
216
|
<td align="center" width="12.5%">
|
|
196
|
-
<a href="https://
|
|
197
|
-
<strong>
|
|
198
|
-
<sub>MCP
|
|
217
|
+
<a href="https://devin.ai"><img src="https://raw.githubusercontent.com/rohitg00/agentmemory/main/website/public/devin.png" alt="Devin" width="48" height="48" /></a><br/>
|
|
218
|
+
<strong>Devin</strong><br/>
|
|
219
|
+
<sub>6 hooks + MCP</sub>
|
|
199
220
|
</td>
|
|
200
221
|
<td align="center" width="12.5%">
|
|
201
222
|
<a href="https://github.com/RooCodeInc/Roo-Code"><img src="https://github.com/RooCodeInc.png?size=120" alt="Roo Code" width="48" height="48" /></a><br/>
|
|
@@ -220,12 +241,19 @@ agentmemory works with any agent that supports hooks, MCP, or REST API. All agen
|
|
|
220
241
|
|
|
221
242
|
You explain the same architecture every session. You re-discover the same bugs. You re-teach the same preferences. Built-in memory (CLAUDE.md, .cursorrules) caps out at 200 lines and goes stale. agentmemory fixes this. It silently captures what your agent does, compresses it into searchable memory, and injects the right context when the next session starts. One command. Works across agents.
|
|
222
243
|
|
|
223
|
-
**What changes:** Session 1 you set up JWT auth. Session 2 you ask for rate limiting. The agent already knows your auth uses jose middleware in `src/middleware/auth.ts`, your tests cover token validation, and you chose jose over jsonwebtoken for Edge compatibility
|
|
244
|
+
**What changes:** Session 1 you set up JWT auth. Session 2 you ask for rate limiting. The agent already knows your auth uses jose middleware in `src/middleware/auth.ts`, your tests cover token validation, and you chose jose over jsonwebtoken for Edge compatibility, with no re-explaining and no copy-pasting.
|
|
224
245
|
|
|
225
246
|
```bash
|
|
226
247
|
npx @agentmemory/agentmemory
|
|
227
248
|
```
|
|
228
249
|
|
|
250
|
+
By default, agentmemory stores iii-engine state outside the repository you start it from: `~/Library/Application Support/agentmemory` on macOS, `$XDG_DATA_HOME/agentmemory` or `~/.local/share/agentmemory` on Linux, and `%APPDATA%\agentmemory` on Windows. To choose a location, pass `--data-dir <path>` or set `AGENTMEMORY_DATA_DIR`:
|
|
251
|
+
|
|
252
|
+
```bash
|
|
253
|
+
npx @agentmemory/agentmemory --data-dir ~/.agentmemory-projects/main
|
|
254
|
+
AGENTMEMORY_DATA_DIR=~/.agentmemory-projects/main npx @agentmemory/agentmemory
|
|
255
|
+
```
|
|
256
|
+
|
|
229
257
|
Latest release notes: [CHANGELOG.md](CHANGELOG.md).
|
|
230
258
|
|
|
231
259
|
---
|
|
@@ -245,7 +273,7 @@ Latest release notes: [CHANGELOG.md](CHANGELOG.md).
|
|
|
245
273
|
| **agentmemory hybrid** | **0.240** | **1.000** | **15 / 15** | 14 ms |
|
|
246
274
|
| grep baseline | 0.227 | 0.967 | 15 / 15 | 0 ms |
|
|
247
275
|
|
|
248
|
-
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
|
|
276
|
+
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).
|
|
249
277
|
|
|
250
278
|
**LongMemEval-S** (ICLR 2025, 500 questions)
|
|
251
279
|
|
|
@@ -270,9 +298,9 @@ Latest release notes: [CHANGELOG.md](CHANGELOG.md).
|
|
|
270
298
|
</tr>
|
|
271
299
|
</table>
|
|
272
300
|
|
|
273
|
-
> 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)
|
|
301
|
+
> 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.
|
|
274
302
|
|
|
275
|
-
**Reproduce locally:** [`eval/README.md`](eval/README.md)
|
|
303
|
+
**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/).
|
|
276
304
|
|
|
277
305
|
**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).
|
|
278
306
|
|
|
@@ -282,17 +310,29 @@ Latest release notes: [CHANGELOG.md](CHANGELOG.md).
|
|
|
282
310
|
|
|
283
311
|
<table>
|
|
284
312
|
<tr>
|
|
285
|
-
<th
|
|
286
|
-
<th
|
|
287
|
-
<th
|
|
288
|
-
<th
|
|
289
|
-
<th
|
|
313
|
+
<th></th>
|
|
314
|
+
<th>agentmemory</th>
|
|
315
|
+
<th>mem0 (63K ⭐)</th>
|
|
316
|
+
<th>Letta / MemGPT (24K ⭐)</th>
|
|
317
|
+
<th>Khoj (36K ⭐)</th>
|
|
318
|
+
<th>supermemory (29K ⭐)</th>
|
|
319
|
+
<th>TencentDB Agent Memory (22K ⭐)</th>
|
|
320
|
+
<th>MemPalace (54K ⭐)</th>
|
|
321
|
+
<th>oracleagentmemory</th>
|
|
322
|
+
<th>Hippo</th>
|
|
323
|
+
<th>Built-in (CLAUDE.md)</th>
|
|
290
324
|
</tr>
|
|
291
325
|
<tr>
|
|
292
326
|
<td><strong>Type</strong></td>
|
|
293
327
|
<td>Memory engine + MCP server</td>
|
|
294
328
|
<td>Memory layer API</td>
|
|
295
329
|
<td>Full agent runtime</td>
|
|
330
|
+
<td>Personal AI</td>
|
|
331
|
+
<td>Memory API + app</td>
|
|
332
|
+
<td>Team memory hub (LLM proxy)</td>
|
|
333
|
+
<td>Vector memory (OSS)</td>
|
|
334
|
+
<td>Memory engine (Oracle DB)</td>
|
|
335
|
+
<td>Memory system</td>
|
|
296
336
|
<td>Static file</td>
|
|
297
337
|
</tr>
|
|
298
338
|
<tr>
|
|
@@ -300,6 +340,12 @@ Latest release notes: [CHANGELOG.md](CHANGELOG.md).
|
|
|
300
340
|
<td><strong>95.2%</strong></td>
|
|
301
341
|
<td>68.5% (LoCoMo)</td>
|
|
302
342
|
<td>83.2% (LoCoMo)</td>
|
|
343
|
+
<td>N/A</td>
|
|
344
|
+
<td>Self-reported</td>
|
|
345
|
+
<td>PersonaMem 76% (self-reported)</td>
|
|
346
|
+
<td>~96.6% (self-reported)</td>
|
|
347
|
+
<td>94.4% (self-reported)</td>
|
|
348
|
+
<td>N/A</td>
|
|
303
349
|
<td>N/A (grep)</td>
|
|
304
350
|
</tr>
|
|
305
351
|
<tr>
|
|
@@ -307,6 +353,12 @@ Latest release notes: [CHANGELOG.md](CHANGELOG.md).
|
|
|
307
353
|
<td>12 hooks (zero manual effort)</td>
|
|
308
354
|
<td>Manual <code>add()</code> calls</td>
|
|
309
355
|
<td>Agent self-edits</td>
|
|
356
|
+
<td>Manual</td>
|
|
357
|
+
<td>API-side extraction</td>
|
|
358
|
+
<td>Proxy interception (base-URL swap)</td>
|
|
359
|
+
<td>Manual</td>
|
|
360
|
+
<td>API extraction</td>
|
|
361
|
+
<td>Manual</td>
|
|
310
362
|
<td>Manual editing</td>
|
|
311
363
|
</tr>
|
|
312
364
|
<tr>
|
|
@@ -314,6 +366,12 @@ Latest release notes: [CHANGELOG.md](CHANGELOG.md).
|
|
|
314
366
|
<td>BM25 + Vector + Graph (RRF fusion)</td>
|
|
315
367
|
<td>Vector + Graph</td>
|
|
316
368
|
<td>Vector (archival)</td>
|
|
369
|
+
<td>Semantic</td>
|
|
370
|
+
<td>Vector + RAG</td>
|
|
371
|
+
<td>4 asset types (Chat / Skill / Wiki / CodeGraph)</td>
|
|
372
|
+
<td>Vector-only</td>
|
|
373
|
+
<td>Vector + semantic</td>
|
|
374
|
+
<td>Decay-weighted</td>
|
|
317
375
|
<td>Loads everything into context</td>
|
|
318
376
|
</tr>
|
|
319
377
|
<tr>
|
|
@@ -321,6 +379,12 @@ Latest release notes: [CHANGELOG.md](CHANGELOG.md).
|
|
|
321
379
|
<td>MCP + REST + leases + signals</td>
|
|
322
380
|
<td>API (no coordination)</td>
|
|
323
381
|
<td>Within Letta runtime only</td>
|
|
382
|
+
<td>No</td>
|
|
383
|
+
<td>No</td>
|
|
384
|
+
<td>Team roles + shared assets</td>
|
|
385
|
+
<td>No</td>
|
|
386
|
+
<td>Scoped only</td>
|
|
387
|
+
<td>Multi-agent shared</td>
|
|
324
388
|
<td>Per-agent files</td>
|
|
325
389
|
</tr>
|
|
326
390
|
<tr>
|
|
@@ -328,6 +392,12 @@ Latest release notes: [CHANGELOG.md](CHANGELOG.md).
|
|
|
328
392
|
<td>None (any MCP client)</td>
|
|
329
393
|
<td>None</td>
|
|
330
394
|
<td>High (must use Letta)</td>
|
|
395
|
+
<td>Standalone</td>
|
|
396
|
+
<td>None</td>
|
|
397
|
+
<td>Proxy fronts every model call</td>
|
|
398
|
+
<td>None</td>
|
|
399
|
+
<td>Oracle Database</td>
|
|
400
|
+
<td>None</td>
|
|
331
401
|
<td>Per-agent format</td>
|
|
332
402
|
</tr>
|
|
333
403
|
<tr>
|
|
@@ -335,6 +405,12 @@ Latest release notes: [CHANGELOG.md](CHANGELOG.md).
|
|
|
335
405
|
<td>None (SQLite + iii-engine)</td>
|
|
336
406
|
<td>Qdrant / pgvector</td>
|
|
337
407
|
<td>Postgres + vector DB</td>
|
|
408
|
+
<td>Multiple</td>
|
|
409
|
+
<td>Managed cloud</td>
|
|
410
|
+
<td>Docker stack (Core + Hub + Proxy)</td>
|
|
411
|
+
<td>Vector store</td>
|
|
412
|
+
<td>Oracle AI Database</td>
|
|
413
|
+
<td>None</td>
|
|
338
414
|
<td>None</td>
|
|
339
415
|
</tr>
|
|
340
416
|
<tr>
|
|
@@ -342,6 +418,12 @@ Latest release notes: [CHANGELOG.md](CHANGELOG.md).
|
|
|
342
418
|
<td>4-tier consolidation + decay + auto-forget</td>
|
|
343
419
|
<td>Passive extraction</td>
|
|
344
420
|
<td>Agent-managed</td>
|
|
421
|
+
<td>Manual</td>
|
|
422
|
+
<td>Auto-forget</td>
|
|
423
|
+
<td>Manual review; auto-routing in progress</td>
|
|
424
|
+
<td>None</td>
|
|
425
|
+
<td>Not stated</td>
|
|
426
|
+
<td>Decay + consolidation</td>
|
|
345
427
|
<td>Manual pruning</td>
|
|
346
428
|
</tr>
|
|
347
429
|
<tr>
|
|
@@ -349,6 +431,12 @@ Latest release notes: [CHANGELOG.md](CHANGELOG.md).
|
|
|
349
431
|
<td>~1,900 tokens/session ($10/yr)</td>
|
|
350
432
|
<td>Varies by integration</td>
|
|
351
433
|
<td>Core memory in context</td>
|
|
434
|
+
<td>Varies</td>
|
|
435
|
+
<td>Cloud pricing</td>
|
|
436
|
+
<td>Not stated</td>
|
|
437
|
+
<td>No token budget</td>
|
|
438
|
+
<td>LLM-backed (varies)</td>
|
|
439
|
+
<td>Varies</td>
|
|
352
440
|
<td>22K+ tokens at 240 obs</td>
|
|
353
441
|
</tr>
|
|
354
442
|
<tr>
|
|
@@ -356,6 +444,12 @@ Latest release notes: [CHANGELOG.md](CHANGELOG.md).
|
|
|
356
444
|
<td>Yes (port 3113)</td>
|
|
357
445
|
<td>Cloud dashboard</td>
|
|
358
446
|
<td>Cloud dashboard</td>
|
|
447
|
+
<td>Web UI</td>
|
|
448
|
+
<td>Cloud dashboard</td>
|
|
449
|
+
<td>Hub web UI</td>
|
|
450
|
+
<td>No</td>
|
|
451
|
+
<td>No</td>
|
|
452
|
+
<td>No</td>
|
|
359
453
|
<td>No</td>
|
|
360
454
|
</tr>
|
|
361
455
|
<tr>
|
|
@@ -364,9 +458,26 @@ Latest release notes: [CHANGELOG.md](CHANGELOG.md).
|
|
|
364
458
|
<td>Optional</td>
|
|
365
459
|
<td>Optional</td>
|
|
366
460
|
<td>Yes</td>
|
|
461
|
+
<td>No (cloud-only)</td>
|
|
462
|
+
<td>Yes (Docker)</td>
|
|
463
|
+
<td>Yes</td>
|
|
464
|
+
<td>Yes (Oracle DB)</td>
|
|
465
|
+
<td>Yes</td>
|
|
466
|
+
<td>Yes</td>
|
|
367
467
|
</tr>
|
|
368
468
|
</table>
|
|
369
469
|
|
|
470
|
+
<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>
|
|
471
|
+
|
|
472
|
+
**Newer entrants** worth knowing, compared in depth in [`benchmark/COMPARISON.md`](benchmark/COMPARISON.md):
|
|
473
|
+
|
|
474
|
+
| System | ⭐ | Angle |
|
|
475
|
+
|--------|---|-------|
|
|
476
|
+
| Zep / Graphiti | 30K | Temporal knowledge graph; strongest published temporal-query results (LongMemEval 63.8%), but graph builds asynchronously so fresh facts can lag |
|
|
477
|
+
| Cognee | 30K | Document-to-knowledge-graph ingestion, Python-only, built for structured entity extraction rather than session capture |
|
|
478
|
+
|
|
479
|
+
None of these auto-capture from coding-agent hooks, ship a local-first viewer, or run keyless — the combination agentmemory is built around.
|
|
480
|
+
|
|
370
481
|
---
|
|
371
482
|
|
|
372
483
|
<h2 id="quick-start"><picture><source media="(prefers-color-scheme: dark)" srcset="assets/tags/light/section-quickstart.svg"><img src="assets/tags/section-quickstart.svg" alt="Quick Start" height="32" /></picture></h2>
|
|
@@ -383,39 +494,27 @@ npx @agentmemory/agentmemory
|
|
|
383
494
|
npx @agentmemory/agentmemory demo
|
|
384
495
|
```
|
|
385
496
|
|
|
386
|
-
`demo` seeds 3 realistic sessions (JWT auth, N+1 query fix, rate limiting) and runs semantic searches against them. You'll see it find "N+1 query fix" when you search "database performance optimization"
|
|
497
|
+
`demo` seeds 3 realistic sessions (JWT auth, N+1 query fix, rate limiting) and runs semantic searches against them. You'll see it find "N+1 query fix" when you search "database performance optimization", which keyword matching cannot do.
|
|
387
498
|
|
|
388
499
|
Open `http://localhost:3113` to watch the memory build live.
|
|
389
500
|
|
|
390
|
-
###
|
|
501
|
+
### Everyday commands
|
|
391
502
|
|
|
392
|
-
|
|
503
|
+
Install and setup live in [Install](#install) above (the first run walks you through it). Day to day:
|
|
393
504
|
|
|
394
505
|
```bash
|
|
395
|
-
|
|
396
|
-
# If you hit EACCES on macOS/Linux system Node installs, retry with:
|
|
397
|
-
# sudo npm install -g @agentmemory/agentmemory
|
|
398
|
-
agentmemory # start the server (same as the npx form)
|
|
506
|
+
agentmemory # start the server
|
|
399
507
|
agentmemory stop # tear it down
|
|
400
|
-
agentmemory
|
|
401
|
-
agentmemory connect claude-code # wire one agent
|
|
508
|
+
agentmemory connect <agent> # wire another agent
|
|
402
509
|
agentmemory doctor # interactive diagnostics + fix prompts
|
|
510
|
+
agentmemory remove # uninstall everything we created
|
|
403
511
|
```
|
|
404
512
|
|
|
405
|
-
From v0.9.16 onward, the first npx run prompts you to install globally inline — answer `Y` once and you're set. If you skip, fall back to either of these for a fresh fetch:
|
|
406
|
-
|
|
407
|
-
```bash
|
|
408
|
-
npx -y @agentmemory/agentmemory@latest # forces latest from npm (cross-platform)
|
|
409
|
-
rm -rf ~/.npm/_npx && npx @agentmemory/agentmemory # macOS/Linux only (POSIX shell)
|
|
410
|
-
```
|
|
411
|
-
|
|
412
|
-
On Windows / PowerShell, the equivalent cache clear is `Remove-Item -Recurse -Force "$env:LOCALAPPDATA\npm-cache\_npx"` — the `npx -y ...@latest` form above is the cross-platform option.
|
|
413
|
-
|
|
414
513
|
### Session Replay
|
|
415
514
|
|
|
416
|
-
Every session agentmemory records is replayable. Open the viewer, pick the **Replay** tab, and scrub through the timeline: prompts, tool calls, tool results, and responses render as discrete events with play/pause, speed control (0.
|
|
515
|
+
Every session agentmemory records is replayable. Open the viewer, pick the **Replay** tab, and scrub through the timeline: prompts, tool calls, tool results, and responses render as discrete events with play/pause, speed control (0.5x to 4x), and keyboard shortcuts (space to toggle, arrows to step).
|
|
417
516
|
|
|
418
|
-
|
|
517
|
+
To bring in older Claude Code JSONL transcripts:
|
|
419
518
|
|
|
420
519
|
```bash
|
|
421
520
|
# Import everything under the default ~/.claude/projects
|
|
@@ -425,7 +524,7 @@ npx @agentmemory/agentmemory import-jsonl
|
|
|
425
524
|
npx @agentmemory/agentmemory import-jsonl ~/.claude/projects/-my-project/abc123.jsonl
|
|
426
525
|
```
|
|
427
526
|
|
|
428
|
-
Imported sessions show up in the Replay picker alongside native ones. Under the hood each entry routes through the `mem::replay::load`, `mem::replay::sessions`, and `mem::replay::import-jsonl` iii functions
|
|
527
|
+
Imported sessions show up in the Replay picker alongside native ones. Under the hood each entry routes through the `mem::replay::load`, `mem::replay::sessions`, and `mem::replay::import-jsonl` iii functions, with no side-channel servers. Each imported transcript is indexed for search, stamped with origin channel `import`, and mined for a session crystal and lessons.
|
|
429
528
|
|
|
430
529
|
> **Heads-up if you rely on `import-jsonl` as your primary capture path:** Claude Code's `cleanupPeriodDays` (in `~/.claude/settings.json`, default **30**) auto-deletes JSONL transcripts older than that window from `~/.claude/projects/`. If you install agentmemory fresh on a months-old Claude Code history, anything older than 30 days is already gone before the first import. Either run `import-jsonl` on a cron, raise `cleanupPeriodDays` to something higher, or wire the auto-capture hooks (the default plugin install path) so each turn lands in agentmemory while the session is live and the JSONL cleanup stops mattering.
|
|
431
530
|
|
|
@@ -437,19 +536,19 @@ Use the maintenance command when you intentionally want to update your local run
|
|
|
437
536
|
npx @agentmemory/agentmemory upgrade
|
|
438
537
|
```
|
|
439
538
|
|
|
440
|
-
Warning: this command mutates the current workspace/runtime. It can update JavaScript dependencies
|
|
539
|
+
Warning: this command mutates the current workspace/runtime. It can update JavaScript dependencies and pull the pinned `iiidev/iii:0.11.2` Docker image. It never installs an unpinned or newer iii engine.
|
|
441
540
|
|
|
442
541
|
Implementation details live in `src/cli.ts` (see `runUpgrade` around the `src/cli.ts:544-595` region).
|
|
443
542
|
|
|
444
543
|
### Claude Code (one block, paste it)
|
|
445
544
|
|
|
446
545
|
```text
|
|
447
|
-
Install agentmemory: run `npx @agentmemory/agentmemory` in a separate terminal to start the memory server. Then run `/plugin marketplace add rohitg00/agentmemory` and `/plugin install agentmemory` — the plugin registers all 12 hooks,
|
|
546
|
+
Install agentmemory: run `npx @agentmemory/agentmemory` in a separate terminal to start the memory server. Then run `/plugin marketplace add rohitg00/agentmemory` and `/plugin install agentmemory` — the plugin registers all 12 hooks, 17 skills, AND auto-wires the `@agentmemory/mcp` stdio server via its `.mcp.json`, so you get 54 MCP tools (memory_smart_search, memory_save, memory_sessions, memory_governance_delete, etc.) without any extra config step. Verify with `curl http://localhost:3111/agentmemory/health`. The real-time viewer is at http://localhost:3113.
|
|
448
547
|
```
|
|
449
548
|
|
|
450
549
|
#### Claude Code without the plugin install (MCP-standalone path)
|
|
451
550
|
|
|
452
|
-
If you wire agentmemory's MCP server through `~/.claude.json` directly instead of using `/plugin install`, Claude Code never resolves `${CLAUDE_PLUGIN_ROOT}` and you have to point hook scripts at absolute paths in `~/.claude/settings.json`. Those paths typically embed the agentmemory version (e.g. `~/.codex/plugins/cache/agentmemory/agentmemory/0.9.22/scripts/…`), so the next upgrade silently breaks every hook
|
|
551
|
+
If you wire agentmemory's MCP server through `~/.claude.json` directly instead of using `/plugin install`, Claude Code never resolves `${CLAUDE_PLUGIN_ROOT}` and you have to point hook scripts at absolute paths in `~/.claude/settings.json`. Those paths typically embed the agentmemory version (e.g. `~/.codex/plugins/cache/agentmemory/agentmemory/0.9.22/scripts/…`), so the next upgrade silently breaks every hook.
|
|
453
552
|
|
|
454
553
|
Workaround:
|
|
455
554
|
|
|
@@ -473,9 +572,9 @@ codex plugin add agentmemory@agentmemory
|
|
|
473
572
|
|
|
474
573
|
The Codex plugin ships from the same `plugin/` directory as the Claude Code plugin. It registers:
|
|
475
574
|
|
|
476
|
-
- `@agentmemory/mcp` as an MCP server (proxies all
|
|
575
|
+
- `@agentmemory/mcp` as an MCP server (proxies all 54 tools when `AGENTMEMORY_URL` points at a running agentmemory server; falls back to 7 tools locally when no server is reachable)
|
|
477
576
|
- 6 lifecycle hooks: `SessionStart`, `UserPromptSubmit`, `PreToolUse`, `PostToolUse`, `PreCompact`, `Stop`
|
|
478
|
-
-
|
|
577
|
+
- 9 invocable skills: `/recall`, `/remember`, `/session-history`, `/forget`, `/recap`, `/handoff`, `/lesson`, `/commit-context`, `/commit-history`, plus 8 reference skills the agent loads on demand (memory discipline, MCP tools, REST API, config, agents, hooks, architecture, and the skill-authoring guide)
|
|
479
578
|
|
|
480
579
|
Codex's hook engine injects `CLAUDE_PLUGIN_ROOT` into hook subprocesses (per [`codex-rs/hooks/src/engine/discovery.rs`](https://github.com/openai/codex/blob/main/codex-rs/hooks/src/engine/discovery.rs)), so the same hook scripts work across both hosts without duplication. Subagent / SessionEnd / Notification / TaskCompleted / PostToolUseFailure events are Claude-Code-only and are not registered for Codex.
|
|
481
580
|
|
|
@@ -507,7 +606,7 @@ copilot plugin install rohitg00/agentmemory:plugin
|
|
|
507
606
|
<summary><b>OpenClaw (paste this prompt)</b></summary>
|
|
508
607
|
|
|
509
608
|
```text
|
|
510
|
-
Install agentmemory for OpenClaw. Run `npx @agentmemory/agentmemory` 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
|
|
609
|
+
Install agentmemory for OpenClaw. Run `npx @agentmemory/agentmemory` 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:
|
|
511
610
|
|
|
512
611
|
{
|
|
513
612
|
"mcpServers": {
|
|
@@ -532,7 +631,7 @@ Full guide: [`integrations/openclaw/`](integrations/openclaw/)
|
|
|
532
631
|
<summary><b>Hermes Agent (paste this prompt)</b></summary>
|
|
533
632
|
|
|
534
633
|
```text
|
|
535
|
-
Install agentmemory for Hermes. Run `npx @agentmemory/agentmemory` 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
|
|
634
|
+
Install agentmemory for Hermes. Run `npx @agentmemory/agentmemory` 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:
|
|
536
635
|
|
|
537
636
|
mcp_servers:
|
|
538
637
|
agentmemory:
|
|
@@ -555,7 +654,7 @@ Start the memory server: `npx @agentmemory/agentmemory`
|
|
|
555
654
|
|
|
556
655
|
#### Native skills via `npx skills add` (50+ agents)
|
|
557
656
|
|
|
558
|
-
agentmemory ships
|
|
657
|
+
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):
|
|
559
658
|
|
|
560
659
|
```bash
|
|
561
660
|
npx skills add rohitg00/agentmemory -y # auto-detects the calling agent
|
|
@@ -568,11 +667,11 @@ This is **complementary** to `agentmemory connect <agent>`:
|
|
|
568
667
|
- `agentmemory connect <agent>` writes the MCP server config so the tools are available.
|
|
569
668
|
- `npx skills add rohitg00/agentmemory` installs the skills so the agent knows when to call them.
|
|
570
669
|
|
|
571
|
-
For the few agents the skills CLI doesn't cover yet (Zed v1.3.x and below), drop the
|
|
670
|
+
For the few agents the skills CLI doesn't cover yet (Zed v1.3.x and below), drop the 17 SKILL.md files under the agent's native skill directory yourself; the same format works everywhere.
|
|
572
671
|
|
|
573
672
|
#### Standard MCP block
|
|
574
673
|
|
|
575
|
-
The agentmemory entry is the **same MCP server block** across every host that uses the `mcpServers` shape (Cursor, Claude Desktop, Cline, Roo Code,
|
|
674
|
+
The agentmemory entry is the **same MCP server block** across every host that uses the `mcpServers` shape (Cursor, Claude Desktop, Cline, Roo Code, Gemini CLI, OpenClaw):
|
|
576
675
|
|
|
577
676
|
```json
|
|
578
677
|
"agentmemory": {
|
|
@@ -585,41 +684,46 @@ The agentmemory entry is the **same MCP server block** across every host that us
|
|
|
585
684
|
}
|
|
586
685
|
```
|
|
587
686
|
|
|
588
|
-
**Merge this entry into the existing `mcpServers` object** in the host's config file
|
|
687
|
+
**Merge this entry into the existing `mcpServers` object** in the host's config file; don't replace the file. If the file already has other servers, add `agentmemory` next to them as another key inside `mcpServers`. If `mcpServers` is missing entirely, paste the block inside `{ "mcpServers": { ... } }`. The `${VAR}` placeholders inherit `AGENTMEMORY_URL` / `AGENTMEMORY_SECRET` from the shell at MCP-server launch; unset vars pass empty strings and the shim falls back to `http://localhost:3111`. One wired entry covers both local and remote (k8s / reverse-proxied) deployments.
|
|
589
688
|
|
|
590
689
|
| Agent | Config file | Notes |
|
|
591
690
|
|---|---|---|
|
|
592
|
-
| **Cursor** | `~/.cursor/mcp.json` | Merge into `mcpServers`. One-click deeplink also available on the website. |
|
|
691
|
+
| **Cursor (MCP only)** | `~/.cursor/mcp.json` | Merge into `mcpServers`, or `agentmemory connect cursor`. One-click deeplink also available on the website. |
|
|
692
|
+
| **Cursor (full plugin)** | `.cursor-plugin/` | Cursor Marketplace listing (submission in review) or Cursor Settings → Plugins → local checkout. Registers 7 auto-capture hooks (sessionStart, beforeSubmitPrompt, preToolUse, postToolUse, postToolUseFailure, stop, sessionEnd) + 17 skills + the MCP server, with `AGENTMEMORY_URL` / `AGENTMEMORY_SECRET` managed in Cursor's plugin dashboard. Works in the Cursor IDE and `cursor-agent` CLI; CLI print-mode prompts are backfilled from the session transcript at session end. |
|
|
593
693
|
| **Claude Desktop** | `claude_desktop_config.json` (Application Support) | Merge into `mcpServers`. Restart Claude Desktop after editing. |
|
|
594
694
|
| **Cline / Roo Code / Kilo Code** | Cline MCP settings (Settings UI → MCP Servers → Edit) | Same `mcpServers` block. |
|
|
595
|
-
| **
|
|
695
|
+
| **Devin CLI (MCP + hooks)** | `~/.config/devin/config.json` | `agentmemory connect devin` merges the MCP entry; `--with-hooks` adds six native auto-capture hooks (SessionStart, UserPromptSubmit, PreToolUse, PostToolUse, Stop, SessionEnd) with Devin'"'"'s lowercase tool matchers. Verify with `devin mcp list` and `/hooks` inside devin. |
|
|
696
|
+
| **Devin CLI (full plugin)** | `plugin/.devin-plugin/` | `devin plugins install ./plugin` from a checkout registers all 17 skills as `/agentmemory:<skill>` slash commands plus the MCP server. Devin plugin hooks cannot fire `SessionStart`/`SessionEnd`, so pair it with `connect devin --with-hooks` for full session capture. |
|
|
697
|
+
| **Devin (cloud)** | Settings → Connections → MCP servers | Add a custom MCP (STDIO): command `npx`, args `-y @agentmemory/mcp@latest`, env `AGENTMEMORY_URL` pointing at a network-reachable agentmemory deployment plus `AGENTMEMORY_SECRET` (cloud sessions cannot reach localhost — see [`deploy/`](deploy/)). Store the secret in Devin Secrets, then use "Test listing tools" to verify all 54 tools appear. |
|
|
596
698
|
| **Gemini CLI** | `~/.gemini/settings.json` | `gemini mcp add agentmemory npx -y @agentmemory/mcp --scope user` (auto-merges). |
|
|
597
699
|
| **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`. |
|
|
598
700
|
| **GitHub Copilot CLI (full plugin)** | Copilot plugin install | `copilot plugin install rohitg00/agentmemory:plugin` for the plugin from the GitHub subdir. |
|
|
599
|
-
| **OpenClaw** | OpenClaw MCP config | Same `mcpServers` block
|
|
701
|
+
| **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/). |
|
|
600
702
|
| **Codex CLI (MCP only)** | `.codex/config.toml` | TOML shape: `codex mcp add agentmemory -- npx -y @agentmemory/mcp`, or add `[mcp_servers.agentmemory]` manually. |
|
|
601
|
-
| **Codex CLI (full plugin)** | Codex plugin marketplace | `codex plugin marketplace add rohitg00/agentmemory` then `codex plugin add agentmemory@agentmemory`. Registers MCP + 6 lifecycle hooks (SessionStart, UserPromptSubmit, PreToolUse, PostToolUse, PreCompact, Stop) +
|
|
602
|
-
| **OpenCode (MCP only)** | `opencode.json` | Different shape
|
|
603
|
-
| **OpenCode (full plugin)** | `plugin/opencode/` | 22 auto-capture hooks covering session lifecycle, messages, tools, errors. 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. |
|
|
604
|
-
| **pi** | `~/.pi/agent/extensions/agentmemory` |
|
|
605
|
-
| **Hermes Agent** | `~/.hermes/config.yaml` |
|
|
606
|
-
| **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
|
|
703
|
+
| **Codex CLI (full plugin)** | Codex plugin marketplace | `codex plugin marketplace add rohitg00/agentmemory` then `codex plugin add agentmemory@agentmemory`. Registers MCP + 6 lifecycle hooks (SessionStart, UserPromptSubmit, PreToolUse, PostToolUse, PreCompact, Stop) + 17 skills. On Codex Desktop, also run `agentmemory connect codex --with-hooks` until [openai/codex#16430](https://github.com/openai/codex/issues/16430) lands; plugin hooks are currently silent there. |
|
|
704
|
+
| **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}}}`. |
|
|
705
|
+
| **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. |
|
|
706
|
+
| **pi** | `~/.pi/agent/extensions/agentmemory` | `agentmemory connect pi` installs the bundled extension into pi's auto-discovery directory (recall on agent start, capture on agent end, `memory_search` / `memory_save` / `memory_health` tools, `/agentmemory-status`). `/reload` in a running pi picks it up. [`integrations/pi`](integrations/pi/) is also a pi package (`pi install ./integrations/pi` from a checkout). |
|
|
707
|
+
| **Hermes Agent** | `~/.hermes/config.yaml` | `cp -r integrations/hermes ~/.hermes/plugins/agentmemory` + `memory.provider: agentmemory` gives the 6-hook memory provider (prefetch, turn capture, session end, pre-compress, MEMORY.md mirroring, system prompt block). Validate with `hermes plugins doctor` and `hermes memory status`. See [`integrations/hermes`](integrations/hermes/). |
|
|
708
|
+
| **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`. |
|
|
607
709
|
| **Antigravity** (replaces Gemini CLI) | `mcp_config.json` (in Antigravity's User dir) | `agentmemory connect antigravity` writes the standard `mcpServers` block. macOS: `~/Library/Application Support/Antigravity/User/`. Linux: `~/.config/Antigravity/User/`. Use after the 2026-06-18 Gemini CLI sunset. |
|
|
710
|
+
| **Antigravity CLI** (`agy`) | `~/.gemini/config/mcp_config.json` | `agentmemory connect antigravity-cli`. The `agy` CLI keeps its own config under `~/.gemini/`, separate from the Antigravity IDE above. Pass `--with-hooks` for native auto-capture via `~/.gemini/config/hooks.json`. |
|
|
608
711
|
| **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. |
|
|
609
|
-
| **Warp** | `~/.warp/.mcp.json` | `agentmemory connect warp` writes the standard `mcpServers` block. Warp also auto-discovers skills from `.claude/skills
|
|
712
|
+
| **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. |
|
|
610
713
|
| **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. |
|
|
611
|
-
| **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
|
|
714
|
+
| **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 because preserving comments and anchors safely needs a YAML parser the package doesn't ship. Continue uses array form (not object) for `mcpServers`. |
|
|
612
715
|
| **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. |
|
|
613
|
-
| **Droid (Factory.ai)** | `~/.factory/mcp.json` | `agentmemory connect droid` writes the standard `mcpServers` block. Project-scoped overrides go in `<repo>/.factory/mcp.json`.
|
|
614
|
-
| **
|
|
716
|
+
| **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. |
|
|
717
|
+
| **DeepSeek Harness** | `$DSH_HOME/cordis.patch.yml` | `agentmemory connect dsh` appends an `@deepseek-ai/dsh-mcp-client` row to the home-level patch layer every Harness profile loads; tools register as `mcp__agentmemory__*`. Pass `--with-hooks` to also wire auto-capture: the bundled Claude Code hook scripts run through Harness's first-party `@deepseek-ai/dsh-hooks-claude-code` bridge (SessionStart, UserPromptSubmit, PreToolUse, PostToolUse, Stop) via a manifest written to `$DSH_HOME/agentmemory.hooks.json`. Defaults to `~/.dsh` when `DSH_HOME` is unset. |
|
|
718
|
+
| **Goose** | Goose MCP settings UI | Same `mcpServers` block; use `goose configure` → Add Extension → MCP. Direct YAML edit at `~/.config/goose/config.yaml` is supported but the schema uses `extensions:` + `cmd` (not `mcpServers:` + `command`). |
|
|
615
719
|
| **Aider** | n/a | Talk to the REST API directly: `curl -X POST http://localhost:3111/agentmemory/smart-search -d '{"query": "auth"}'`. |
|
|
616
720
|
| **Any agent (32+)** | n/a | `npx skillkit install agentmemory` auto-detects the host and merges. |
|
|
617
721
|
|
|
618
|
-
**Sandboxed MCP clients** (Flatpak / Snap / restrictive containers) that can't reach the host's `localhost`: also set `"AGENTMEMORY_FORCE_PROXY": "1"` in the `env` block, and point `AGENTMEMORY_URL` at a route the sandbox can actually reach (e.g. your LAN IP).
|
|
722
|
+
**Sandboxed MCP clients** (Flatpak / Snap / restrictive containers) that can't reach the host's `localhost`: also set `"AGENTMEMORY_FORCE_PROXY": "1"` in the `env` block, and point `AGENTMEMORY_URL` at a route the sandbox can actually reach (e.g. your LAN IP).
|
|
619
723
|
|
|
620
724
|
### Programmatic access (Python / Rust / Node)
|
|
621
725
|
|
|
622
|
-
agentmemory registers its core operations as iii functions (`mem::remember`, `mem::observe`, `mem::context`, `mem::smart-search`, `mem::forget`). Any language with an iii SDK can call them directly over `ws://localhost:49134
|
|
726
|
+
agentmemory registers its core operations as iii functions (`mem::remember`, `mem::observe`, `mem::context`, `mem::smart-search`, `mem::forget`). Any language with an iii SDK can call them directly over `ws://localhost:49134`, with no separate REST client per language.
|
|
623
727
|
|
|
624
728
|
```bash
|
|
625
729
|
pip install iii-sdk # Python
|
|
@@ -650,7 +754,7 @@ npm install && npm run build && npm start
|
|
|
650
754
|
|
|
651
755
|
This starts agentmemory with a local `iii-engine` if `iii` is already installed, or falls back to Docker Compose if Docker is available. REST, streams, and the viewer bind to `127.0.0.1` by default.
|
|
652
756
|
|
|
653
|
-
Install `iii-engine` manually. **agentmemory currently pins `iii-engine` to `v0.11.2
|
|
757
|
+
Install `iii-engine` manually. **agentmemory currently pins `iii-engine` to `v0.11.2`**. `v0.11.6` introduces a new sandbox-everything-via-`iii worker add` model that agentmemory hasn't been refactored for yet. Pin lifts once the refactor lands. Override with `AGENTMEMORY_III_VERSION=<version>` if you've migrated to the sandbox model manually.
|
|
654
758
|
|
|
655
759
|
- **macOS arm64:** `mkdir -p ~/.local/bin && curl -fsSL https://github.com/iii-hq/iii/releases/download/iii/v0.11.2/iii-aarch64-apple-darwin.tar.gz | tar -xz -C ~/.local/bin && chmod +x ~/.local/bin/iii`
|
|
656
760
|
- **macOS x64:** swap `aarch64-apple-darwin` for `x86_64-apple-darwin`
|
|
@@ -662,9 +766,9 @@ Or use Docker (the bundled `docker-compose.yml` pulls `iiidev/iii:0.11.2`). Full
|
|
|
662
766
|
|
|
663
767
|
### Windows
|
|
664
768
|
|
|
665
|
-
agentmemory runs on Windows 10/11, but the Node.js package alone isn't enough
|
|
769
|
+
agentmemory runs on Windows 10/11, but the Node.js package alone isn't enough; you also need the `iii-engine` runtime (a separate native binary) as a background process. The official upstream installer is a `sh` script and there is no PowerShell installer or scoop/winget package today, so Windows users have two paths:
|
|
666
770
|
|
|
667
|
-
**Option A
|
|
771
|
+
**Option A: prebuilt Windows binary (recommended)**
|
|
668
772
|
|
|
669
773
|
```powershell
|
|
670
774
|
# 1. Open https://github.com/iii-hq/iii/releases/tag/iii%2Fv0.11.2 in your browser
|
|
@@ -683,7 +787,7 @@ iii --version
|
|
|
683
787
|
npx -y @agentmemory/agentmemory
|
|
684
788
|
```
|
|
685
789
|
|
|
686
|
-
**Option B
|
|
790
|
+
**Option B: Docker Desktop**
|
|
687
791
|
|
|
688
792
|
```powershell
|
|
689
793
|
# 1. Install Docker Desktop for Windows
|
|
@@ -692,7 +796,7 @@ npx -y @agentmemory/agentmemory
|
|
|
692
796
|
npx -y @agentmemory/agentmemory
|
|
693
797
|
```
|
|
694
798
|
|
|
695
|
-
**Option C
|
|
799
|
+
**Option C: standalone MCP only (no engine).** If you only need the MCP tools for your agent and don't need the REST API, viewer, or cron jobs, skip the engine entirely:
|
|
696
800
|
|
|
697
801
|
```powershell
|
|
698
802
|
npx -y @agentmemory/agentmemory mcp
|
|
@@ -704,12 +808,12 @@ npx -y @agentmemory/mcp
|
|
|
704
808
|
|
|
705
809
|
| Symptom | Fix |
|
|
706
810
|
|---|---|
|
|
707
|
-
| `iii-engine process started` then `did not become ready within 15s` | Engine crashed on startup
|
|
811
|
+
| `iii-engine process started` then `did not become ready within 15s` | Engine crashed on startup; re-run with `--verbose`, check stderr |
|
|
708
812
|
| `Could not start iii-engine` | Neither `iii.exe` nor Docker is installed. See Option A or B above |
|
|
709
813
|
| Port conflict | `netstat -ano \| findstr :3111` to see what's bound, then kill it or use `--port <N>` |
|
|
710
814
|
| Docker fallback skipped even though Docker is installed | Make sure Docker Desktop is actually running (system tray icon) |
|
|
711
815
|
|
|
712
|
-
> Note:
|
|
816
|
+
> Note: the iii **engine** is a prebuilt binary, not a cargo crate, so don't try to `cargo install` it. (The iii **SDKs** are published on crates.io, npm, and PyPI, but agentmemory doesn't need them.) Supported engine install methods, all pinned to v0.11.2: the prebuilt v0.11.2 binary above, the upstream sh install script **with the version pin** `curl -fsSL https://install.iii.dev/iii/main/install.sh | VERSION=0.11.2 sh` (macOS/Linux), and the Docker image `iiidev/iii:0.11.2`. A bare `install.sh | sh` installs the **latest** engine, which agentmemory does not support; always pass `VERSION=0.11.2`. Easiest of all: just run `npx @agentmemory/agentmemory`, which fetches the pinned engine into `~/.agentmemory/bin` for you.
|
|
713
817
|
|
|
714
818
|
---
|
|
715
819
|
|
|
@@ -718,7 +822,7 @@ npx -y @agentmemory/mcp
|
|
|
718
822
|
One-click templates for managed hosts. Each one ships a self-contained
|
|
719
823
|
Dockerfile that pulls `@agentmemory/agentmemory` from npm and copies
|
|
720
824
|
the iii engine binary in from the official `iiidev/iii` Docker Hub
|
|
721
|
-
image
|
|
825
|
+
image; no pre-built agentmemory image required. Persistent storage
|
|
722
826
|
mounts at `/data`; the first-boot entrypoint overwrites the
|
|
723
827
|
npm-bundled iii config (which binds `127.0.0.1`) with a deploy-tuned
|
|
724
828
|
one that binds `0.0.0.0` and uses absolute `/data` paths, generates
|
|
@@ -735,25 +839,25 @@ Render's one-click deploy button requires `render.yaml` at the repository root,
|
|
|
735
839
|
Full setup details (HMAC capture, viewer SSH tunnel, rotation, backup,
|
|
736
840
|
cost floors) live in [`deploy/`](./deploy/README.md):
|
|
737
841
|
|
|
738
|
-
- [`deploy/fly`](./deploy/fly/README.md)
|
|
842
|
+
- [`deploy/fly`](./deploy/fly/README.md): single machine with
|
|
739
843
|
`auto_stop_machines = "stop"`; cheapest idle.
|
|
740
|
-
- [`deploy/railway`](./deploy/railway/README.md)
|
|
844
|
+
- [`deploy/railway`](./deploy/railway/README.md): Hobby plan flat fee,
|
|
741
845
|
volume in the dashboard.
|
|
742
|
-
- [`deploy/render`](./deploy/render/README.md)
|
|
846
|
+
- [`deploy/render`](./deploy/render/README.md): Blueprint flow,
|
|
743
847
|
automatic disk snapshots on paid plans.
|
|
744
|
-
- [`deploy/coolify`](./deploy/coolify/README.md)
|
|
848
|
+
- [`deploy/coolify`](./deploy/coolify/README.md): self-hosted on your
|
|
745
849
|
own VPS via [Coolify](https://coolify.io/self-hosted); same Docker
|
|
746
850
|
Compose stack, you own the host and the data.
|
|
747
851
|
|
|
748
852
|
Only port `3111` is published. The viewer on `3113` stays bound to
|
|
749
|
-
loopback inside the container
|
|
853
|
+
loopback inside the container; every template's README documents the
|
|
750
854
|
SSH-tunnel pattern for reaching it.
|
|
751
855
|
|
|
752
856
|
---
|
|
753
857
|
|
|
754
858
|
<h2 id="why-agentmemory"><picture><source media="(prefers-color-scheme: dark)" srcset="assets/tags/light/section-why.svg"><img src="assets/tags/section-why.svg" alt="Why agentmemory" height="32" /></picture></h2>
|
|
755
859
|
|
|
756
|
-
Every coding agent forgets everything when the session ends
|
|
860
|
+
Every coding agent forgets everything when the session ends, and each new session starts with you re-explaining your stack. agentmemory runs in the background and removes that step.
|
|
757
861
|
|
|
758
862
|
```text
|
|
759
863
|
Session 1: "Add auth to the API"
|
|
@@ -771,7 +875,7 @@ Session 2: "Now add rate limiting"
|
|
|
771
875
|
|
|
772
876
|
### vs built-in agent memory
|
|
773
877
|
|
|
774
|
-
Every AI coding agent ships with built-in memory
|
|
878
|
+
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.
|
|
775
879
|
|
|
776
880
|
| | Built-in (CLAUDE.md) | agentmemory |
|
|
777
881
|
|---|---|---|
|
|
@@ -811,7 +915,7 @@ SessionStart hook fires
|
|
|
811
915
|
|
|
812
916
|
### 4-Tier Memory Consolidation
|
|
813
917
|
|
|
814
|
-
|
|
918
|
+
Modeled on how human brains process memory, including sleep consolidation.
|
|
815
919
|
|
|
816
920
|
| Tier | What | Analogy |
|
|
817
921
|
|------|------|---------|
|
|
@@ -840,9 +944,13 @@ Memories decay over time (Ebbinghaus curve). Frequently accessed memories streng
|
|
|
840
944
|
|
|
841
945
|
| Capability | Description |
|
|
842
946
|
|---|---|
|
|
843
|
-
| **Automatic capture** | Every tool use recorded via hooks
|
|
947
|
+
| **Automatic capture** | Every tool use recorded via hooks, no manual effort |
|
|
844
948
|
| **Semantic search** | BM25 + vector + knowledge graph with RRF fusion |
|
|
845
949
|
| **Memory evolution** | Versioning, supersession, relationship graphs |
|
|
950
|
+
| **Recall hygiene** | Superseded memory versions leave the search indexes; the version chain in KV keeps full history |
|
|
951
|
+
| **Near-duplicate hints** | Saves report an advisory `similarTo` match when new content closely resembles an existing memory |
|
|
952
|
+
| **Per-agent scoping** | `agentId` threads through save and recall across REST, MCP, and the search index, in shared or isolated mode |
|
|
953
|
+
| **Write-time provenance** | Every observation and memory carries an immutable origin channel (user, agent, tool, import, or shared) stamped at capture, save, and import |
|
|
846
954
|
| **Auto-forgetting** | TTL expiry, contradiction detection, importance eviction |
|
|
847
955
|
| **Privacy first** | API keys, secrets, `<private>` tags stripped before storage |
|
|
848
956
|
| **Self-healing** | Circuit breaker, provider fallback chain, health monitoring |
|
|
@@ -866,6 +974,8 @@ Triple-stream retrieval combining three signals:
|
|
|
866
974
|
|
|
867
975
|
Fused with Reciprocal Rank Fusion (RRF, k=60) and session-diversified (max 3 results per session).
|
|
868
976
|
|
|
977
|
+
Hybrid ranking applies to the primary recall path, not just `smart-search`: `mem::search` (behind `memory_recall`) ranks through the same BM25 + vector + graph fusion once the vector index is populated. 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.
|
|
978
|
+
|
|
869
979
|
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.
|
|
870
980
|
|
|
871
981
|
### Embedding providers
|
|
@@ -873,7 +983,7 @@ BM25 tokenizes Greek, Cyrillic, Hebrew, Arabic, and accented Latin out of the bo
|
|
|
873
983
|
agentmemory auto-detects your provider. For best results, install local embeddings (free):
|
|
874
984
|
|
|
875
985
|
```bash
|
|
876
|
-
npm install @
|
|
986
|
+
npm install @huggingface/transformers
|
|
877
987
|
```
|
|
878
988
|
|
|
879
989
|
| Provider | Model | Cost | Notes |
|
|
@@ -889,33 +999,38 @@ npm install @xenova/transformers
|
|
|
889
999
|
|
|
890
1000
|
<h2 id="mcp-server"><picture><source media="(prefers-color-scheme: dark)" srcset="assets/tags/light/section-mcp.svg"><img src="assets/tags/section-mcp.svg" alt="MCP Server" height="32" /></picture></h2>
|
|
891
1001
|
|
|
892
|
-
|
|
1002
|
+
54 tools, 6 resources, 3 prompts, and 17 skills.
|
|
1003
|
+
|
|
1004
|
+
> **MCP shim vs full server:** the published `@agentmemory/mcp` package is a thin shim. It exposes the full 54-tool surface **only when it can reach a running agentmemory server** via `AGENTMEMORY_URL` (proxy mode). With no server reachable, the shim falls back to a 7-tool local set (`memory_save`, `memory_recall`, `memory_smart_search`, `memory_sessions`, `memory_export`, `memory_audit`, `memory_governance_delete`). The `AGENTMEMORY_TOOLS=core|all` env var is a *server-side* flag; setting it in the shim's `env` block has no effect. If you see only 7 tools in Cursor / OpenCode / Gemini CLI, start `npx @agentmemory/agentmemory` (or the Docker stack) and set `AGENTMEMORY_URL=http://localhost:3111`.
|
|
893
1005
|
|
|
894
|
-
|
|
1006
|
+
### 54 Tools
|
|
895
1007
|
|
|
896
|
-
|
|
1008
|
+
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.
|
|
897
1009
|
|
|
898
1010
|
<details>
|
|
899
|
-
<summary>
|
|
1011
|
+
<summary>Base tools (14)</summary>
|
|
900
1012
|
|
|
901
1013
|
| Tool | Description |
|
|
902
1014
|
|------|-------------|
|
|
903
1015
|
| `memory_recall` | Search past observations |
|
|
904
1016
|
| `memory_compress_file` | Compress markdown files while preserving structure |
|
|
905
1017
|
| `memory_save` | Save an insight, decision, or pattern |
|
|
906
|
-
| `memory_patterns` | Detect recurring patterns |
|
|
907
|
-
| `memory_smart_search` | Hybrid semantic + keyword search |
|
|
908
1018
|
| `memory_file_history` | Past observations about specific files |
|
|
1019
|
+
| `memory_patterns` | Detect recurring patterns |
|
|
909
1020
|
| `memory_sessions` | List recent sessions |
|
|
1021
|
+
| `memory_smart_search` | Hybrid semantic + keyword search |
|
|
1022
|
+
| `memory_vision_search` | Search image observations |
|
|
910
1023
|
| `memory_timeline` | Chronological observations |
|
|
911
1024
|
| `memory_profile` | Project profile (concepts, files, patterns) |
|
|
912
1025
|
| `memory_export` | Export all memory data |
|
|
913
1026
|
| `memory_relations` | Query relationship graph |
|
|
1027
|
+
| `memory_commit_lookup` | Sessions behind a git commit |
|
|
1028
|
+
| `memory_commits` | Commits recorded for a session |
|
|
914
1029
|
|
|
915
1030
|
</details>
|
|
916
1031
|
|
|
917
1032
|
<details>
|
|
918
|
-
<summary>Extended tools (
|
|
1033
|
+
<summary>Extended tools (54 total, the default surface)</summary>
|
|
919
1034
|
|
|
920
1035
|
| Tool | Description |
|
|
921
1036
|
|------|-------------|
|
|
@@ -953,14 +1068,16 @@ npm install @xenova/transformers
|
|
|
953
1068
|
|
|
954
1069
|
</details>
|
|
955
1070
|
|
|
956
|
-
### 6 Resources · 3 Prompts ·
|
|
1071
|
+
### 6 Resources · 3 Prompts · 17 Skills
|
|
957
1072
|
|
|
958
1073
|
| Type | Name | Description |
|
|
959
1074
|
|------|------|-------------|
|
|
960
1075
|
| Resource | `agentmemory://status` | Health, session count, memory count |
|
|
961
1076
|
| Resource | `agentmemory://project/{name}/profile` | Per-project intelligence |
|
|
1077
|
+
| Resource | `agentmemory://project/{name}/recent` | Recent observations for a project |
|
|
962
1078
|
| Resource | `agentmemory://memories/latest` | Latest 10 active memories |
|
|
963
1079
|
| Resource | `agentmemory://graph/stats` | Knowledge graph statistics |
|
|
1080
|
+
| Resource | `agentmemory://team/{id}/profile` | Shared team profile |
|
|
964
1081
|
| Prompt | `recall_context` | Search + return context messages |
|
|
965
1082
|
| Prompt | `session_handoff` | Handoff data between agents |
|
|
966
1083
|
| Prompt | `detect_patterns` | Analyze recurring patterns |
|
|
@@ -969,9 +1086,11 @@ npm install @xenova/transformers
|
|
|
969
1086
|
| Skill | `/session-history` | Recent session summaries |
|
|
970
1087
|
| Skill | `/forget` | Delete observations/sessions |
|
|
971
1088
|
|
|
1089
|
+
The table shows the four core skills. The full set is 9 invocable skills plus 8 reference skills; see the Native skills section above.
|
|
1090
|
+
|
|
972
1091
|
### Standalone MCP
|
|
973
1092
|
|
|
974
|
-
Run without the full server
|
|
1093
|
+
Run without the full server, for any MCP client. Either of these works:
|
|
975
1094
|
|
|
976
1095
|
```bash
|
|
977
1096
|
npx -y @agentmemory/agentmemory mcp # canonical (always available)
|
|
@@ -980,7 +1099,7 @@ npx -y @agentmemory/mcp # shim package alias
|
|
|
980
1099
|
|
|
981
1100
|
Or add to your agent's MCP config:
|
|
982
1101
|
|
|
983
|
-
Most agents (Cursor, Claude Desktop, Cline, Roo Code,
|
|
1102
|
+
Most agents (Cursor, Claude Desktop, Cline, Roo Code, Gemini CLI):
|
|
984
1103
|
```json
|
|
985
1104
|
{
|
|
986
1105
|
"mcpServers": {
|
|
@@ -1022,7 +1141,7 @@ cp plugin/opencode/commands/*.md ~/.config/opencode/commands/
|
|
|
1022
1141
|
|
|
1023
1142
|
<h2 id="real-time-viewer"><picture><source media="(prefers-color-scheme: dark)" srcset="assets/tags/light/section-viewer.svg"><img src="assets/tags/section-viewer.svg" alt="Real-Time Viewer" height="32" /></picture></h2>
|
|
1024
1143
|
|
|
1025
|
-
Auto-starts on port `3113`. Live observation stream, session explorer, memory
|
|
1144
|
+
Auto-starts on port `3113`. Live observation stream with a stream status indicator, a two-pane session explorer (list beside a sticky detail panel on wide screens), memory and lesson rows that expand to the full stored record including raw JSON and origin provenance, a knowledge graph that clusters nodes by type while relations are sparse, session replay, and a health dashboard.
|
|
1026
1145
|
|
|
1027
1146
|
```bash
|
|
1028
1147
|
open http://localhost:3113
|
|
@@ -1034,19 +1153,19 @@ The viewer server binds to `127.0.0.1` by default. The REST-served `/agentmemory
|
|
|
1034
1153
|
|
|
1035
1154
|
<h2 id="iii-console"><picture><source media="(prefers-color-scheme: dark)" srcset="assets/tags/light/section-viewer.svg"><img src="assets/tags/section-viewer.svg" alt="iii Console" height="32" /></picture></h2>
|
|
1036
1155
|
|
|
1037
|
-
The viewer at `:3113` shows what your agent **remembered**. The [iii console](https://iii.dev/docs/console) shows what your agent **did
|
|
1156
|
+
The viewer at `:3113` shows what your agent **remembered**. The [iii console](https://iii.dev/docs/console) shows what your agent **did**: every memory op as an OpenTelemetry trace, every KV entry editable, every function invocable, every stream tappable. Two windows on the same memory: one product-shaped, one engine-shaped.
|
|
1038
1157
|
|
|
1039
1158
|
Watch a `memory_smart_search` fire and see the BM25 scan → embedding lookup → RRF fusion → reranker as a waterfall. Edit a stuck consolidation timer in the KV browser. Replay a `PostToolUse` hook with a tweaked payload. Pin the WebSocket stream and watch observations land live.
|
|
1040
1159
|
|
|
1041
|
-
agentmemory ships this for free because every function call and trigger fires through iii
|
|
1160
|
+
agentmemory ships this for free because every function call and trigger fires through iii; nothing custom, nothing to instrument.
|
|
1042
1161
|
|
|
1043
1162
|
<p align="center">
|
|
1044
|
-
<img src="assets/iii-console/workers.png" alt="iii console Workers page
|
|
1163
|
+
<img src="assets/iii-console/workers.png" alt="iii console Workers page: connected workers including agentmemory instances with live function counts and runtime metadata" width="720" />
|
|
1045
1164
|
<br/>
|
|
1046
|
-
<em>Workers page: every connected worker
|
|
1165
|
+
<em>Workers page: every connected worker, including agentmemory itself, with PID, function count, runtime, and last-seen.</em>
|
|
1047
1166
|
</p>
|
|
1048
1167
|
|
|
1049
|
-
**Already installed.** The console ships with `iii
|
|
1168
|
+
**Already installed.** The console ships with `iii`; no separate installer.
|
|
1050
1169
|
|
|
1051
1170
|
**Launch alongside agentmemory:**
|
|
1052
1171
|
|
|
@@ -1071,15 +1190,15 @@ iii console --port 3114 \
|
|
|
1071
1190
|
|
|
1072
1191
|
| Page | Use it to |
|
|
1073
1192
|
|------|-----------|
|
|
1074
|
-
| **Workers** | See every connected worker and its live metrics
|
|
1075
|
-
| **Functions** | Invoke any of agentmemory's functions directly with a JSON payload
|
|
1076
|
-
| **Triggers** | Replay HTTP, cron, event, and state triggers
|
|
1077
|
-
| **States** | KV browser with full CRUD
|
|
1193
|
+
| **Workers** | See every connected worker and its live metrics, including the agentmemory worker itself. |
|
|
1194
|
+
| **Functions** | Invoke any of agentmemory's functions directly with a JSON payload; handy for testing `memory.recall`, `memory.consolidate`, `graph.query` without wiring a client. |
|
|
1195
|
+
| **Triggers** | Replay HTTP, cron, event, and state triggers: fire the consolidation cron manually, retry an HTTP route, emit a state change. |
|
|
1196
|
+
| **States** | KV browser with full CRUD over sessions, memory slots, lifecycle timers, and the embeddings index; edit values in place. |
|
|
1078
1197
|
| **Streams** | Live WebSocket monitor for memory writes, hook events, and observation updates as they flow through iii streams. |
|
|
1079
1198
|
| **Queues** | Durable queue topics + dead-letter management. Replay or drop failed embedding / compression jobs. |
|
|
1080
1199
|
| **Traces** | OpenTelemetry waterfall / flame / service-breakdown views. Filter by `trace_id` to see exactly which functions, DB calls, and embedding requests a single `memory.search` produced. |
|
|
1081
1200
|
| **Logs** | Structured OTEL logs filtered and correlated to trace/span IDs. |
|
|
1082
|
-
| **Config** | Runtime configuration
|
|
1201
|
+
| **Config** | Runtime configuration: see exactly which workers, providers, and ports your engine is running with. |
|
|
1083
1202
|
| **Flow** | (Optional, `--enable-flow`) Interactive architecture graph of every worker, trigger, and stream. |
|
|
1084
1203
|
|
|
1085
1204
|
<p align="center">
|
|
@@ -1090,17 +1209,17 @@ iii console --port 3114 \
|
|
|
1090
1209
|
|
|
1091
1210
|
**Traces are already on:**
|
|
1092
1211
|
|
|
1093
|
-
`iii-config.yaml` ships with the `iii-observability` worker enabled (`exporter: memory`, `sampling_ratio: 1.0`, metrics + logs). No extra config needed
|
|
1212
|
+
`iii-config.yaml` ships with the `iii-observability` worker enabled (`exporter: memory`, `sampling_ratio: 1.0`, metrics + logs). No extra config needed; the moment agentmemory starts, every memory operation emits a trace span and a structured log the console can read.
|
|
1094
1213
|
|
|
1095
1214
|
If you want to export to Jaeger/Honeycomb/Grafana Tempo instead, change `exporter: memory` to `exporter: otlp` and set the collector endpoint per iii's observability docs.
|
|
1096
1215
|
|
|
1097
|
-
> **Heads-up:** no auth is enforced on the console itself
|
|
1216
|
+
> **Heads-up:** no auth is enforced on the console itself; keep it bound to `127.0.0.1` (the default) and never expose it publicly.
|
|
1098
1217
|
|
|
1099
1218
|
---
|
|
1100
1219
|
|
|
1101
1220
|
<h2 id="powered-by-iii"><picture><source media="(prefers-color-scheme: dark)" srcset="assets/tags/light/section-architecture.svg"><img src="assets/tags/section-architecture.svg" alt="Powered by iii" height="32" /></picture></h2>
|
|
1102
1221
|
|
|
1103
|
-
agentmemory is **already a running [iii](https://iii.dev) instance**. Three primitives
|
|
1222
|
+
agentmemory is **already a running [iii](https://iii.dev) instance**. Three primitives (worker, function, trigger) compose the runtime; KV state, streams, and OTEL traces come from iii-state, iii-stream, and iii-observability workers that ship with iii. You didn't install Postgres, Redis, Express, pm2, or Prometheus, because iii replaces them.
|
|
1104
1223
|
|
|
1105
1224
|
That means one more command extends agentmemory with an entire new capability.
|
|
1106
1225
|
|
|
@@ -1116,19 +1235,19 @@ iii worker add iii-database # swap in a SQL-backed state adapter
|
|
|
1116
1235
|
iii worker add mcp # generic MCP host alongside the agentmemory MCP
|
|
1117
1236
|
```
|
|
1118
1237
|
|
|
1119
|
-
Each `iii worker add` registers new functions and triggers into the same engine agentmemory is already running on. The viewer and console pick them up immediately
|
|
1238
|
+
Each `iii worker add` registers new functions and triggers into the same engine agentmemory is already running on. The viewer and console pick them up immediately: no reload, no new integration, no new container.
|
|
1120
1239
|
|
|
1121
1240
|
| `iii worker add` | What you get on top of agentmemory |
|
|
1122
1241
|
|---|---|
|
|
1123
1242
|
| [`iii-pubsub`](https://workers.iii.dev/workers/iii-pubsub) | Multi-instance memory: every `remember` fans out, every `search` reads the union |
|
|
1124
|
-
| [`iii-cron`](https://workers.iii.dev/workers/iii-cron) | Scheduled lifecycle
|
|
1243
|
+
| [`iii-cron`](https://workers.iii.dev/workers/iii-cron) | Scheduled lifecycle: nightly consolidation, weekly snapshots, decay on a fixed clock |
|
|
1125
1244
|
| [`iii-queue`](https://workers.iii.dev/workers/iii-queue) | Durable retries: failed embedding + compression jobs survive restart, no lost observations |
|
|
1126
|
-
| [`iii-observability`](https://workers.iii.dev/workers/iii-observability) | OTEL traces, metrics, logs on every function
|
|
1245
|
+
| [`iii-observability`](https://workers.iii.dev/workers/iii-observability) | OTEL traces, metrics, logs on every function, wired in `iii-config.yaml` from day one |
|
|
1127
1246
|
| [`iii-sandbox`](https://workers.iii.dev/workers/iii-sandbox) | Code that came out of `memory_recall` runs inside a throwaway VM, not your shell |
|
|
1128
1247
|
| [`iii-database`](https://workers.iii.dev/workers/iii-database) | SQL-backed state adapter when you outgrow the in-memory KV defaults |
|
|
1129
1248
|
| [`mcp`](https://workers.iii.dev/workers/mcp) | Stand up extra MCP servers next to agentmemory's, share the same engine |
|
|
1130
1249
|
|
|
1131
|
-
Full registry: [workers.iii.dev](https://workers.iii.dev). Every worker there composes through the same primitives agentmemory uses
|
|
1250
|
+
Full registry: [workers.iii.dev](https://workers.iii.dev). Every worker there composes through the same primitives agentmemory uses, and the agentmemory you already have is one of them.
|
|
1132
1251
|
|
|
1133
1252
|
### What iii replaces
|
|
1134
1253
|
|
|
@@ -1141,7 +1260,7 @@ Full registry: [workers.iii.dev](https://workers.iii.dev). Every worker there co
|
|
|
1141
1260
|
| Prometheus / Grafana | iii OTEL + health monitor |
|
|
1142
1261
|
| Custom plugin systems | `iii worker add <name>` |
|
|
1143
1262
|
|
|
1144
|
-
**
|
|
1263
|
+
**184 source files · ~42,200 LOC · 1,674 tests · 264 functions · 50 KV scopes**, all on three primitives. No `agentmemory plugin install`. The plugin system is iii itself.
|
|
1145
1264
|
|
|
1146
1265
|
---
|
|
1147
1266
|
|
|
@@ -1158,18 +1277,18 @@ agentmemory auto-detects from your environment. By default, no LLM calls are mad
|
|
|
1158
1277
|
| MiniMax | `MINIMAX_API_KEY` | Anthropic-compatible |
|
|
1159
1278
|
| Gemini | `GEMINI_API_KEY` | Also enables embeddings |
|
|
1160
1279
|
| OpenRouter | `OPENROUTER_API_KEY` | Any model |
|
|
1161
|
-
| OpenAI API | `OPENAI_API_KEY` | Default `gpt-
|
|
1162
|
-
| **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
|
|
1163
|
-
| Claude subscription fallback | `AGENTMEMORY_ALLOW_AGENT_SDK=true` | Opt-in only. Spawns `@anthropic-ai/claude-agent-sdk` sessions
|
|
1280
|
+
| OpenAI API | `OPENAI_API_KEY` | Default `gpt-5.6-luna`, override with `OPENAI_MODEL` |
|
|
1281
|
+
| **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. |
|
|
1282
|
+
| 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. |
|
|
1164
1283
|
|
|
1165
1284
|
### Local models (Ollama / LM Studio / vLLM)
|
|
1166
1285
|
|
|
1167
|
-
agentmemory talks to any OpenAI-API-compatible server, so anything that exposes `/v1/chat/completions` works without code changes. No paid keys, no cloud, no rate limits
|
|
1286
|
+
agentmemory talks to any OpenAI-API-compatible server, so anything that exposes `/v1/chat/completions` works without code changes. No paid keys, no cloud, no rate limits; runs entirely on your hardware.
|
|
1168
1287
|
|
|
1169
1288
|
**Ollama** (default port `11434`):
|
|
1170
1289
|
|
|
1171
1290
|
```bash
|
|
1172
|
-
ollama pull
|
|
1291
|
+
ollama pull qwen3:8b # or qwen3:4b, gpt-oss:20b, qwen3-coder:30b, etc.
|
|
1173
1292
|
ollama serve
|
|
1174
1293
|
```
|
|
1175
1294
|
|
|
@@ -1177,34 +1296,37 @@ ollama serve
|
|
|
1177
1296
|
# ~/.agentmemory/.env
|
|
1178
1297
|
OPENAI_API_KEY=ollama # any non-empty string; Ollama ignores it
|
|
1179
1298
|
OPENAI_BASE_URL=http://localhost:11434/v1
|
|
1180
|
-
OPENAI_MODEL=
|
|
1299
|
+
OPENAI_MODEL=qwen3:8b
|
|
1181
1300
|
```
|
|
1182
1301
|
|
|
1183
1302
|
**LM Studio** (default port `1234`):
|
|
1184
1303
|
|
|
1185
|
-
Open LM Studio → Local Server tab → Start Server. Pick any chat model from the picker (Qwen
|
|
1304
|
+
Open LM Studio → Local Server tab → Start Server. Pick any chat model from the picker (Qwen 3, gpt-oss, DeepSeek R1, etc.).
|
|
1186
1305
|
|
|
1187
1306
|
```env
|
|
1188
1307
|
# ~/.agentmemory/.env
|
|
1189
1308
|
OPENAI_API_KEY=lmstudio # any non-empty string; LM Studio ignores it
|
|
1190
1309
|
OPENAI_BASE_URL=http://localhost:1234/v1
|
|
1191
|
-
OPENAI_MODEL=
|
|
1310
|
+
OPENAI_MODEL=qwen3-8b # match the model name from LM Studio
|
|
1192
1311
|
```
|
|
1193
1312
|
|
|
1194
|
-
**vLLM / llama.cpp / Text Generation Inference**: same shape
|
|
1313
|
+
**vLLM / llama.cpp / Text Generation Inference**: same shape. Point `OPENAI_BASE_URL` at whatever URL your server exposes and set `OPENAI_MODEL` to a name your server will accept.
|
|
1195
1314
|
|
|
1196
1315
|
**Model picks for memory work**: compression and summarization are short tasks (<2K tokens in, <500 tokens out) where a 7B instruct model is plenty. Recommendations:
|
|
1197
1316
|
|
|
1198
1317
|
| Model | Size | Why |
|
|
1199
1318
|
|-------|------|-----|
|
|
1200
|
-
| `
|
|
1201
|
-
| `
|
|
1202
|
-
| `
|
|
1203
|
-
| `
|
|
1319
|
+
| `qwen3:8b` | ~5.2 GB | Balanced default on a 16 GB machine; strong at extraction and tool-shaped text |
|
|
1320
|
+
| `qwen3:4b` | ~2.6 GB | Smallest sane option; fine for compression, weaker for graph extraction |
|
|
1321
|
+
| `qwen3-coder:30b` | ~19 GB | Best local pick for code-shaped sessions (30B MoE, 3.3B active) on 24-32 GB hardware |
|
|
1322
|
+
| `gpt-oss:20b` | ~14 GB | Strong general model that fits 16 GB RAM |
|
|
1323
|
+
| `deepseek-r1:8b` | ~5.2 GB | Reasoning distill; slower but cleaner extractions |
|
|
1324
|
+
|
|
1325
|
+
Qwen 3 models think by default and can burn the whole token budget on reasoning before any output. Set `AGENTMEMORY_LLM_NOTHINK=1` to append `/no_think` to graph-extraction prompts, and raise `MAX_TOKENS` (16384 works) if extractions come back empty.
|
|
1204
1326
|
|
|
1205
1327
|
Reasoning-class models (`o1`-style with `<think>` blocks) can return empty `content` with a `reasoning` field your local server may not surface. If extractions come back blank, switch to a non-reasoning model first. The `OPENAI_REASONING_EFFORT=none` env can also disable thinking on Ollama Cloud thinking models that mirror the OpenAI reasoning schema.
|
|
1206
1328
|
|
|
1207
|
-
Local embeddings ship out of the box via `@
|
|
1329
|
+
Local embeddings ship out of the box via `@huggingface/transformers`: `EMBEDDING_PROVIDER=local` (default) gives you `Xenova/all-MiniLM-L6-v2` (384-dim) entirely on-device. No extra config needed.
|
|
1208
1330
|
|
|
1209
1331
|
### Cost-aware model selection
|
|
1210
1332
|
|
|
@@ -1212,18 +1334,20 @@ Background compression runs on every observation, so model choice meaningfully c
|
|
|
1212
1334
|
|
|
1213
1335
|
| Tier | Model | Input / 1M | Output / 1M | Cost for the captured 35h | Notes |
|
|
1214
1336
|
|------|-------|------------|-------------|---------------------------|-------|
|
|
1337
|
+
| Recommended | `deepseek/deepseek-v4-flash-0731` | $0.07 | $0.14 | ~$0.07 (est.) | Latest DeepSeek; cheapest recommended pick for compression workloads. |
|
|
1215
1338
|
| Recommended | `deepseek/deepseek-v4-pro` | $0.435 | $0.87 | ~$0.46 | Solid compression + summarization quality at ~10× lower cost than Sonnet. |
|
|
1216
|
-
| Recommended | `deepseek/deepseek-chat` | $0.27 | $1.10 | ~$0.40 | Older but still fine for compression-only workloads. |
|
|
1217
1339
|
| Recommended | `qwen/qwen3-coder` | $0.45 | $1.80 | ~$0.55 | Strong code reasoning if your sessions are heavily code-shaped. |
|
|
1218
|
-
| Premium | `anthropic/claude-sonnet-
|
|
1219
|
-
| Premium | `openai/gpt-
|
|
1220
|
-
| Avoid | `anthropic/claude-opus-
|
|
1340
|
+
| Premium | `anthropic/claude-sonnet-5` | $3.00 | $15.00 | ~$5.02 (est.) | Same list price as the measured Sonnet 4.6 run; $2/$10 intro pricing through 2026-08-31. |
|
|
1341
|
+
| Premium | `openai/gpt-5.6-sol` | $5.00 | $30.00 | ~$9 (est.) | Flagship tier; expensive for always-on background work. |
|
|
1342
|
+
| Avoid | `anthropic/claude-opus-5` | $5.00 | $25.00 | ~$8.40 (est.) | Flagship-class model; overspend for compression. |
|
|
1343
|
+
|
|
1344
|
+
Measured rows come from the captured run; (est.) rows scale the same token mix by each model's list price.
|
|
1221
1345
|
|
|
1222
1346
|
agentmemory prints a runtime warning when `OPENROUTER_MODEL` matches a premium-tier pattern. Set `AGENTMEMORY_SUPPRESS_COST_WARNING=1` to silence once you've made an informed choice.
|
|
1223
1347
|
|
|
1224
|
-
Quality vs cost tradeoff for memory work: compression is a summarization task with relatively loose quality bars (the agent re-reads the summary, not the user). DeepSeek
|
|
1348
|
+
Quality vs cost tradeoff for memory work: compression is a summarization task with relatively loose quality bars (the agent re-reads the summary, not the user). DeepSeek V4 Flash / V4 Pro / Qwen3-Coder land within rounding error of Sonnet on this task while costing 10-70× less. Save the premium-tier models for queries you read directly.
|
|
1225
1349
|
|
|
1226
|
-
Sources: [OpenRouter pricing for Sonnet
|
|
1350
|
+
Sources: [OpenRouter pricing for Claude Sonnet 5](https://openrouter.ai/anthropic/claude-sonnet-5), [DeepSeek V4 Flash](https://openrouter.ai/deepseek/deepseek-v4-flash-0731), [DeepSeek pricing notes](https://api-docs.deepseek.com/quick_start/pricing/).
|
|
1227
1351
|
|
|
1228
1352
|
### Multi-agent memory (`AGENT_ID` + `AGENTMEMORY_AGENT_SCOPE`)
|
|
1229
1353
|
|
|
@@ -1247,7 +1371,7 @@ What gets tagged when `AGENT_ID` is set: `Session.agentId`, `RawObservation.agen
|
|
|
1247
1371
|
|
|
1248
1372
|
What gets filtered in isolated mode: `mem::smart-search`, `/agentmemory/memories`, `/agentmemory/observations`, `/agentmemory/sessions`. Each endpoint accepts `?agentId=<role>` to override per-request, and `?agentId=*` to opt out of the env scope entirely. `/memories` also accepts `?includeOrphans=true` to surface pre-AGENT_ID memories whose `agentId` is undefined.
|
|
1249
1373
|
|
|
1250
|
-
Per-call override at the SDK / REST layer: every mutating endpoint (`/session/start`, `/remember`) accepts an `agentId` field in the request body that wins over the env. Useful for runtimes routing many roles through one server process.
|
|
1374
|
+
Per-call override at the SDK / REST layer: every mutating endpoint (`/session/start`, `/remember`) accepts an `agentId` field in the request body that wins over the env. Useful for runtimes routing many roles through one server process. The MCP `memory_save` tool exposes the same `agentId` field, the standalone stdio server forwards both `agentId` and `project`, and saved memories carry `agentId` into the search index, so agent-scoped search covers memories as well as observations.
|
|
1251
1375
|
|
|
1252
1376
|
When `AGENT_ID` is unset, memory remains unscoped (legacy behavior, no tags, no filters).
|
|
1253
1377
|
|
|
@@ -1260,7 +1384,7 @@ agentmemory + iii-engine bind four ports by default. If a restart fails with `po
|
|
|
1260
1384
|
| `3111` | agentmemory | REST API + MCP HTTP + `/agentmemory/health` + `/agentmemory/livez` | `III_REST_PORT` |
|
|
1261
1385
|
| `3112` | iii-engine | Internal streams worker (consumed by agentmemory + viewer) | `III_STREAMS_PORT` |
|
|
1262
1386
|
| `3113` | agentmemory | Real-time viewer (`http://localhost:3113`) | `AGENTMEMORY_VIEWER_PORT` |
|
|
1263
|
-
| `49134` | iii-engine | WebSocket
|
|
1387
|
+
| `49134` | iii-engine | WebSocket; workers register here, OTel telemetry flows over it | `III_ENGINE_URL` (full URL, default `ws://localhost:49134`) |
|
|
1264
1388
|
|
|
1265
1389
|
Stale-process cleanup when ports stay bound after a crashed run:
|
|
1266
1390
|
|
|
@@ -1275,7 +1399,7 @@ netstat -ano | findstr ":3111 :3112 :3113 :49134"
|
|
|
1275
1399
|
taskkill /F /PID <pid>
|
|
1276
1400
|
```
|
|
1277
1401
|
|
|
1278
|
-
`agentmemory stop` reaps both the worker and the engine pidfile cleanly on graceful shutdown (
|
|
1402
|
+
`agentmemory stop` reaps both the worker and the engine pidfile cleanly on graceful shutdown. In Docker mode it tears down only agentmemory's own compose services and reaps the native worker before the Docker teardown; the CLI also refuses to adopt or signal Docker or VM port holders (Docker backend, vpnkit, colima) as the native engine unless `--force` is passed. The manual cleanup above is only for the post-crash case where neither pidfile is left behind.
|
|
1279
1403
|
|
|
1280
1404
|
### Config File
|
|
1281
1405
|
|
|
@@ -1325,7 +1449,7 @@ Create `~/.agentmemory/.env`:
|
|
|
1325
1449
|
# # Auto-detected from `.openai.azure.com` hostname; uses
|
|
1326
1450
|
# # api-key header + api-version query param.
|
|
1327
1451
|
# OPENAI_API_VERSION=2024-08-01-preview # Optional: Azure api-version query param
|
|
1328
|
-
# OPENAI_MODEL=gpt-
|
|
1452
|
+
# OPENAI_MODEL=gpt-5.6-luna # Optional: default model
|
|
1329
1453
|
# OPENAI_TIMEOUT_MS=60000 # Optional: OpenAI-scoped alias for the outbound fetch
|
|
1330
1454
|
# # timeout. Takes precedence over AGENTMEMORY_LLM_TIMEOUT_MS
|
|
1331
1455
|
# # for back-compat with v0.9.17. New configs should
|
|
@@ -1340,7 +1464,7 @@ Create `~/.agentmemory/.env`:
|
|
|
1340
1464
|
# OPENAI_API_KEY_FOR_LLM=false # Optional: set to false to skip OpenAI auto-detection
|
|
1341
1465
|
# # for LLM (useful if you only want OpenAI for embeddings)
|
|
1342
1466
|
# Opt-in Claude-subscription fallback (spawns @anthropic-ai/claude-agent-sdk);
|
|
1343
|
-
# leave OFF unless you understand the Stop-hook recursion risk
|
|
1467
|
+
# leave OFF unless you understand the Stop-hook recursion risk:
|
|
1344
1468
|
# AGENTMEMORY_ALLOW_AGENT_SDK=true
|
|
1345
1469
|
|
|
1346
1470
|
# Embedding provider (auto-detected, or override)
|
|
@@ -1374,7 +1498,7 @@ Create `~/.agentmemory/.env`:
|
|
|
1374
1498
|
# III_REST_PORT=3111
|
|
1375
1499
|
|
|
1376
1500
|
# Features
|
|
1377
|
-
# AGENTMEMORY_AUTO_COMPRESS=false # OFF by default
|
|
1501
|
+
# AGENTMEMORY_AUTO_COMPRESS=false # OFF by default. When on,
|
|
1378
1502
|
# every PostToolUse hook calls your
|
|
1379
1503
|
# LLM provider to compress the
|
|
1380
1504
|
# observation — expect significant
|
|
@@ -1396,7 +1520,7 @@ Create `~/.agentmemory/.env`:
|
|
|
1396
1520
|
# session_patterns, records touched
|
|
1397
1521
|
# files in project_context. Fire-
|
|
1398
1522
|
# and-forget; does not block.
|
|
1399
|
-
# AGENTMEMORY_INJECT_CONTEXT=false # OFF by default
|
|
1523
|
+
# AGENTMEMORY_INJECT_CONTEXT=false # OFF by default. When on:
|
|
1400
1524
|
# - SessionStart may inject ~1-2K
|
|
1401
1525
|
# chars of project context into
|
|
1402
1526
|
# the first turn of each session
|
|
@@ -1411,6 +1535,10 @@ Create `~/.agentmemory/.env`:
|
|
|
1411
1535
|
# Observations are still captured via
|
|
1412
1536
|
# PostToolUse regardless of this flag.
|
|
1413
1537
|
# GRAPH_EXTRACTION_ENABLED=false
|
|
1538
|
+
# AGENTMEMORY_LLM_NOTHINK=1 # Local reasoning models only: ask the
|
|
1539
|
+
# model to skip its hidden thinking pass
|
|
1540
|
+
# during graph extraction. Faster runs;
|
|
1541
|
+
# relation quality can drop slightly.
|
|
1414
1542
|
# CONSOLIDATION_ENABLED=false # on by default when an LLM provider is configured
|
|
1415
1543
|
# LESSON_DECAY_ENABLED=true
|
|
1416
1544
|
# OBSIDIAN_AUTO_EXPORT=false
|
|
@@ -1423,7 +1551,7 @@ Create `~/.agentmemory/.env`:
|
|
|
1423
1551
|
# USER_ID=
|
|
1424
1552
|
# TEAM_MODE=private
|
|
1425
1553
|
|
|
1426
|
-
# Tool visibility: "
|
|
1554
|
+
# Tool visibility: "all" (54 tools, default) or "core" (8 tools, lean)
|
|
1427
1555
|
# AGENTMEMORY_TOOLS=core
|
|
1428
1556
|
```
|
|
1429
1557
|
|
|
@@ -1431,7 +1559,7 @@ Create `~/.agentmemory/.env`:
|
|
|
1431
1559
|
|
|
1432
1560
|
<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>
|
|
1433
1561
|
|
|
1434
|
-
|
|
1562
|
+
130 endpoints on port `3111`. The REST API binds to `127.0.0.1` by default. Protected endpoints require `Authorization: Bearer <secret>` when `AGENTMEMORY_SECRET` is set, and mesh sync endpoints require `AGENTMEMORY_SECRET` on both peers.
|
|
1435
1563
|
|
|
1436
1564
|
<details>
|
|
1437
1565
|
<summary>Key endpoints</summary>
|
|
@@ -1465,7 +1593,7 @@ Full endpoint list: [`src/triggers/api.ts`](src/triggers/api.ts)
|
|
|
1465
1593
|
```bash
|
|
1466
1594
|
npm run dev # Hot reload
|
|
1467
1595
|
npm run build # Production build
|
|
1468
|
-
npm test # 1,
|
|
1596
|
+
npm test # 1,674 tests
|
|
1469
1597
|
npm run test:integration # API tests (requires running services)
|
|
1470
1598
|
```
|
|
1471
1599
|
|