@agentmemory/agentmemory 0.9.9 → 0.9.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +40 -6
- package/dist/cli.mjs +4 -4
- package/dist/docker-compose.yml +18 -0
- package/dist/image-refs-D4M1sJAz.mjs +3 -0
- package/dist/{image-store-DGMiEUaI.mjs → image-store-DR4g1FAW.mjs} +1 -1
- package/dist/index.mjs +5 -3
- package/dist/index.mjs.map +1 -1
- package/dist/{src-Br3vaM5Z.mjs → src-IbjZ5iJi.mjs} +13 -11
- package/dist/src-IbjZ5iJi.mjs.map +1 -0
- package/dist/{standalone-CcVof5XG.mjs → standalone-awLAlipf.mjs} +2 -2
- package/dist/{standalone-CcVof5XG.mjs.map → standalone-awLAlipf.mjs.map} +1 -1
- package/dist/standalone.mjs +1 -1
- package/dist/standalone.mjs.map +1 -1
- package/dist/{tools-registry-l6I20_xa.mjs → tools-registry-CzSNN8Ca.mjs} +2 -2
- package/dist/tools-registry-CzSNN8Ca.mjs.map +1 -0
- package/dist/viewer/index.html +23 -7
- package/docker-compose.yml +18 -0
- package/package.json +1 -1
- package/plugin/.claude-plugin/plugin.json +1 -1
- package/plugin/.codex-plugin/plugin.json +15 -0
- package/plugin/hooks/hooks.codex.json +67 -0
- package/dist/image-refs-DiN3VEf3.mjs +0 -3
- package/dist/src-Br3vaM5Z.mjs.map +0 -1
- package/dist/tools-registry-l6I20_xa.mjs.map +0 -1
package/README.md
CHANGED
|
@@ -6,16 +6,30 @@
|
|
|
6
6
|
<strong>
|
|
7
7
|
Your coding agent remembers everything. No more re-explaining.
|
|
8
8
|
Built on <a href="https://github.com/iii-hq/iii">iii engine</a>
|
|
9
|
-
</strong
|
|
10
|
-
Persistent memory for Claude Code, Cursor, Gemini CLI, Codex CLI, pi, OpenCode, and any MCP client.
|
|
9
|
+
</strong><br/>
|
|
10
|
+
Persistent memory for Claude Code, Cursor, Gemini CLI, Codex CLI, Hermes, OpenClaw, pi, OpenCode, and any MCP client.
|
|
11
11
|
</p>
|
|
12
12
|
|
|
13
13
|
<p align="center">
|
|
14
|
-
<a href="https://
|
|
14
|
+
<a href="https://trendshift.io/repositories/25123" target="_blank"><img src="https://trendshift.io/api/badge/repositories/25123" alt="rohitg00/agentmemory | Trendshift" width="250" height="55"/></a>
|
|
15
15
|
</p>
|
|
16
16
|
|
|
17
17
|
<p align="center">
|
|
18
|
-
<
|
|
18
|
+
<a href="https://www.star-history.com/?repos=rohitg00%2Fagentmemory&type=date&legend=top-left">
|
|
19
|
+
<picture>
|
|
20
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/chart?repos=rohitg00/agentmemory&type=date&theme=dark&legend=top-left" />
|
|
21
|
+
<source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/chart?repos=rohitg00/agentmemory&type=date&legend=top-left" />
|
|
22
|
+
<img alt="Star History Chart" src="https://api.star-history.com/chart?repos=rohitg00/agentmemory&type=date&legend=top-left" />
|
|
23
|
+
</picture>
|
|
24
|
+
</a>
|
|
25
|
+
</p>
|
|
26
|
+
|
|
27
|
+
<p align="center">
|
|
28
|
+
<a href="https://gist.github.com/rohitg00/2067ab416f7bbe447c1977edaaa681e2"><img src="https://img.shields.io/badge/Viral%20GitHub%20Gist-1200%20stars%20%2F%20172%20forks-FF6B35?style=for-the-badge&logo=github&logoColor=white&labelColor=1a1a1a" alt="Design doc: 1200 stars / 172 forks on the gist" /></a>
|
|
29
|
+
</p>
|
|
30
|
+
|
|
31
|
+
<p align="center">
|
|
32
|
+
<em>The gist extends Karpathy's LLM Wiki pattern with confidence scoring, lifecycle, knowledge graphs, and hybrid search: agentmemory is the implementation.</em>
|
|
19
33
|
</p>
|
|
20
34
|
|
|
21
35
|
<p align="center">
|
|
@@ -93,7 +107,7 @@ agentmemory works with any agent that supports hooks, MCP, or REST API. All agen
|
|
|
93
107
|
<td align="center" width="12.5%">
|
|
94
108
|
<a href="https://github.com/openai/codex"><img src="https://github.com/openai.png?size=120" alt="Codex CLI" width="48" height="48" /></a><br/>
|
|
95
109
|
<strong>Codex CLI</strong><br/>
|
|
96
|
-
<sub>MCP
|
|
110
|
+
<sub>6 hooks + MCP + skills</sub>
|
|
97
111
|
</td>
|
|
98
112
|
<td align="center" width="12.5%">
|
|
99
113
|
<a href="https://github.com/cline/cline"><img src="https://github.com/cline.png?size=120" alt="Cline" width="48" height="48" /></a><br/>
|
|
@@ -341,6 +355,25 @@ Implementation details live in `src/cli.ts` (see `runUpgrade` around the `src/cl
|
|
|
341
355
|
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, 4 skills, AND auto-wires the `@agentmemory/mcp` stdio server via its `.mcp.json`, so you get 51 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.
|
|
342
356
|
```
|
|
343
357
|
|
|
358
|
+
### Codex CLI (Codex plugin platform)
|
|
359
|
+
|
|
360
|
+
```bash
|
|
361
|
+
# 1. start the memory server in a separate terminal
|
|
362
|
+
npx @agentmemory/agentmemory
|
|
363
|
+
|
|
364
|
+
# 2. register the agentmemory marketplace and install the plugin
|
|
365
|
+
codex plugin marketplace add rohitg00/agentmemory
|
|
366
|
+
codex plugin install agentmemory
|
|
367
|
+
```
|
|
368
|
+
|
|
369
|
+
The Codex plugin ships from the same `plugin/` directory as the Claude Code plugin. It registers:
|
|
370
|
+
|
|
371
|
+
- `@agentmemory/mcp` as an MCP server (all 51 tools when `AGENTMEMORY_TOOLS=all`)
|
|
372
|
+
- 6 lifecycle hooks: `SessionStart`, `UserPromptSubmit`, `PreToolUse`, `PostToolUse`, `PreCompact`, `Stop`
|
|
373
|
+
- 4 skills: `/recall`, `/remember`, `/session-history`, `/forget`
|
|
374
|
+
|
|
375
|
+
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.
|
|
376
|
+
|
|
344
377
|
<details>
|
|
345
378
|
<summary><b>OpenClaw (paste this prompt)</b></summary>
|
|
346
379
|
|
|
@@ -413,7 +446,8 @@ The agentmemory entry is the **same MCP server block** across every host that us
|
|
|
413
446
|
| **Windsurf** | `~/.codeium/windsurf/mcp_config.json` | Same `mcpServers` block. |
|
|
414
447
|
| **Gemini CLI** | `~/.gemini/settings.json` | `gemini mcp add agentmemory npx -y @agentmemory/mcp --scope user` (auto-merges). |
|
|
415
448
|
| **OpenClaw** | OpenClaw MCP config | Same `mcpServers` block, or use the deeper [memory plugin](integrations/openclaw/). |
|
|
416
|
-
| **Codex CLI** | `.codex/config.toml` | TOML shape: `codex mcp add agentmemory -- npx -y @agentmemory/mcp`, or add `[mcp_servers.agentmemory]` manually. |
|
|
449
|
+
| **Codex CLI (MCP only)** | `.codex/config.toml` | TOML shape: `codex mcp add agentmemory -- npx -y @agentmemory/mcp`, or add `[mcp_servers.agentmemory]` manually. |
|
|
450
|
+
| **Codex CLI (full plugin)** | Codex plugin marketplace | `codex plugin marketplace add rohitg00/agentmemory` then `codex plugin install agentmemory`. Registers MCP + 6 lifecycle hooks (SessionStart, UserPromptSubmit, PreToolUse, PostToolUse, PreCompact, Stop) + 4 skills. |
|
|
417
451
|
| **OpenCode** | `opencode.json` | Different shape — top-level `mcp` key, command as array: `{"mcp": {"agentmemory": {"type": "local", "command": ["npx", "-y", "@agentmemory/mcp"], "enabled": true}}}`. |
|
|
418
452
|
| **pi** | `~/.pi/agent/extensions/agentmemory` | Copy [`integrations/pi`](integrations/pi/) and restart pi. |
|
|
419
453
|
| **Hermes Agent** | `~/.hermes/config.yaml` | Use the deeper [memory provider plugin](integrations/hermes/) with `memory.provider: agentmemory`. |
|
package/dist/cli.mjs
CHANGED
|
@@ -361,12 +361,12 @@ async function main() {
|
|
|
361
361
|
p.intro("agentmemory");
|
|
362
362
|
if (skipEngine) {
|
|
363
363
|
p.log.info("Skipping engine check (--no-engine)");
|
|
364
|
-
await import("./src-
|
|
364
|
+
await import("./src-IbjZ5iJi.mjs");
|
|
365
365
|
return;
|
|
366
366
|
}
|
|
367
367
|
if (await isEngineRunning()) {
|
|
368
368
|
p.log.success("iii-engine is running");
|
|
369
|
-
await import("./src-
|
|
369
|
+
await import("./src-IbjZ5iJi.mjs");
|
|
370
370
|
return;
|
|
371
371
|
}
|
|
372
372
|
if (!await startEngine()) {
|
|
@@ -410,7 +410,7 @@ async function main() {
|
|
|
410
410
|
process.exit(1);
|
|
411
411
|
}
|
|
412
412
|
s.stop("iii-engine is ready");
|
|
413
|
-
await import("./src-
|
|
413
|
+
await import("./src-IbjZ5iJi.mjs");
|
|
414
414
|
}
|
|
415
415
|
async function apiFetch(base, path, timeoutMs = 5e3) {
|
|
416
416
|
try {
|
|
@@ -872,7 +872,7 @@ async function runUpgrade() {
|
|
|
872
872
|
].join("\n"), "agentmemory upgrade");
|
|
873
873
|
}
|
|
874
874
|
async function runMcp() {
|
|
875
|
-
await import("./standalone-
|
|
875
|
+
await import("./standalone-awLAlipf.mjs");
|
|
876
876
|
}
|
|
877
877
|
async function runImportJsonl() {
|
|
878
878
|
const VALUE_FLAGS = new Set(["--port", "--tools"]);
|
package/dist/docker-compose.yml
CHANGED
|
@@ -1,4 +1,18 @@
|
|
|
1
1
|
services:
|
|
2
|
+
# One-shot init container: docker creates named volumes root:root mode
|
|
3
|
+
# 755, but the iii-engine image is distroless and runs as UID 65532
|
|
4
|
+
# with no `chown` of its own. Without this, /data is unwritable, the
|
|
5
|
+
# engine silently buffers in RAM, and state evaporates on every
|
|
6
|
+
# restart — the exact symptom v0.9.7's working-directory fix set out
|
|
7
|
+
# to solve. Runs once at compose-up and exits.
|
|
8
|
+
iii-init:
|
|
9
|
+
image: busybox:1.36
|
|
10
|
+
user: "0:0"
|
|
11
|
+
volumes:
|
|
12
|
+
- iii-data:/data
|
|
13
|
+
entrypoint: ["sh", "-c", "chown -R 65532:65532 /data && chmod 755 /data"]
|
|
14
|
+
restart: "no"
|
|
15
|
+
|
|
2
16
|
iii-engine:
|
|
3
17
|
# Pinned to v0.11.2 — the last engine that runs agentmemory's current
|
|
4
18
|
# worker model cleanly. v0.11.6 introduces a new sandbox-everything-
|
|
@@ -10,6 +24,10 @@ services:
|
|
|
10
24
|
# Override per-shell or via .env file:
|
|
11
25
|
# AGENTMEMORY_III_VERSION=0.11.7 docker compose up
|
|
12
26
|
image: iiidev/iii:${AGENTMEMORY_III_VERSION:-0.11.2}
|
|
27
|
+
user: "65532:65532"
|
|
28
|
+
depends_on:
|
|
29
|
+
iii-init:
|
|
30
|
+
condition: service_completed_successfully
|
|
13
31
|
ports:
|
|
14
32
|
- "127.0.0.1:49134:49134"
|
|
15
33
|
- "127.0.0.1:3111:3111"
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { a as deleteImage, c as saveImageToDisk, i as IMAGES_DIR, l as touchImage, o as getMaxBytes, s as isManagedImagePath } from "./src-
|
|
1
|
+
import { a as deleteImage, c as saveImageToDisk, i as IMAGES_DIR, l as touchImage, o as getMaxBytes, s as isManagedImagePath } from "./src-IbjZ5iJi.mjs";
|
|
2
2
|
|
|
3
3
|
export { deleteImage, saveImageToDisk };
|
package/dist/index.mjs
CHANGED
|
@@ -4256,7 +4256,7 @@ function registerContextFunction(sdk, kv, tokenBudget) {
|
|
|
4256
4256
|
const footer = `</agentmemory-context>`;
|
|
4257
4257
|
usedTokens += estimateTokens$1(header) + estimateTokens$1(footer);
|
|
4258
4258
|
for (const block of blocks) {
|
|
4259
|
-
if (usedTokens + block.tokens > budget)
|
|
4259
|
+
if (usedTokens + block.tokens > budget) continue;
|
|
4260
4260
|
selected.push(block.content);
|
|
4261
4261
|
usedTokens += block.tokens;
|
|
4262
4262
|
if (block.sourceIds && block.sourceIds.length > 0) accessedIds.push(...block.sourceIds);
|
|
@@ -5755,7 +5755,7 @@ function registerAutoForgetFunction(sdk, kv) {
|
|
|
5755
5755
|
|
|
5756
5756
|
//#endregion
|
|
5757
5757
|
//#region src/version.ts
|
|
5758
|
-
const VERSION = "0.9.
|
|
5758
|
+
const VERSION = "0.9.11";
|
|
5759
5759
|
|
|
5760
5760
|
//#endregion
|
|
5761
5761
|
//#region src/functions/export-import.ts
|
|
@@ -5882,7 +5882,9 @@ function registerExportImportFunction(sdk, kv) {
|
|
|
5882
5882
|
"0.9.6",
|
|
5883
5883
|
"0.9.7",
|
|
5884
5884
|
"0.9.8",
|
|
5885
|
-
"0.9.9"
|
|
5885
|
+
"0.9.9",
|
|
5886
|
+
"0.9.10",
|
|
5887
|
+
"0.9.11"
|
|
5886
5888
|
]).has(importData.version)) return {
|
|
5887
5889
|
success: false,
|
|
5888
5890
|
error: `Unsupported export version: ${importData.version}`
|