@agentmemory/agentmemory 0.9.17 → 0.9.19
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 +6 -0
- package/AGENTS.md +2 -2
- package/README.md +19 -5
- package/dist/.env.example +6 -0
- package/dist/cli.mjs +19 -9
- package/dist/cli.mjs.map +1 -1
- package/dist/hooks/post-commit.d.mts +1 -0
- package/dist/hooks/post-commit.mjs +102 -0
- package/dist/hooks/post-commit.mjs.map +1 -0
- package/dist/index.mjs +537 -91
- package/dist/index.mjs.map +1 -1
- package/dist/{src-TiNuQ3Ub.mjs → src-2wwYDPGA.mjs} +503 -91
- package/dist/src-2wwYDPGA.mjs.map +1 -0
- package/dist/{standalone-BIXq6S80.mjs → standalone-DMLk7YxP.mjs} +17 -8
- package/dist/standalone-DMLk7YxP.mjs.map +1 -0
- package/dist/standalone.mjs +49 -7
- package/dist/standalone.mjs.map +1 -1
- package/dist/{tools-registry-BFKFKmYh.mjs → tools-registry-Dz8ssuMf.mjs} +34 -1
- package/dist/tools-registry-Dz8ssuMf.mjs.map +1 -0
- package/dist/viewer/favicon.svg +1 -0
- package/dist/viewer/index.html +190 -60
- package/package.json +2 -2
- package/plugin/.claude-plugin/plugin.json +1 -1
- package/plugin/.codex-plugin/plugin.json +1 -1
- package/plugin/.mcp.json +5 -1
- package/plugin/hooks/hooks.codex.json +4 -0
- package/plugin/scripts/post-commit.d.mts +1 -0
- package/plugin/scripts/post-commit.mjs +102 -0
- package/plugin/scripts/post-commit.mjs.map +1 -0
- package/plugin/skills/commit-context/SKILL.md +19 -0
- package/plugin/skills/commit-history/SKILL.md +20 -0
- package/plugin/skills/handoff/SKILL.md +21 -0
- package/plugin/skills/recap/SKILL.md +25 -0
- package/dist/src-TiNuQ3Ub.mjs.map +0 -1
- package/dist/standalone-BIXq6S80.mjs.map +0 -1
- package/dist/tools-registry-BFKFKmYh.mjs.map +0 -1
package/.env.example
CHANGED
|
@@ -45,6 +45,12 @@
|
|
|
45
45
|
|
|
46
46
|
# MAX_TOKENS=4096 # Cap LLM completion tokens for compression / summarise calls
|
|
47
47
|
|
|
48
|
+
# Outbound LLM / embedding timeout — shared across every raw-fetch provider
|
|
49
|
+
# (Gemini, OpenRouter, MiniMax, OpenAI LLM, and OpenAI/Cohere/Voyage/OpenRouter
|
|
50
|
+
# embedding). The OpenAI LLM path also honours the OpenAI-scoped
|
|
51
|
+
# OPENAI_TIMEOUT_MS alias for back-compat with v0.9.17 (precedence).
|
|
52
|
+
# AGENTMEMORY_LLM_TIMEOUT_MS=60000 # Default: 60 000 ms (60 s)
|
|
53
|
+
|
|
48
54
|
# Opt-in Claude-subscription fallback (spawns @anthropic-ai/claude-agent-sdk
|
|
49
55
|
# child sessions). Off by default — the agent-sdk fallback can trigger
|
|
50
56
|
# Stop-hook recursion (#149 follow-up) when invoked from inside Claude Code.
|
package/AGENTS.md
CHANGED
|
@@ -111,8 +111,8 @@ Hook scripts in `src/hooks/` are standalone Node.js scripts (no iii-sdk import).
|
|
|
111
111
|
|
|
112
112
|
## Current Stats (v0.9.16)
|
|
113
113
|
|
|
114
|
-
-
|
|
115
|
-
-
|
|
114
|
+
- 53 MCP tools (8 visible by default, `AGENTMEMORY_TOOLS=all` for all)
|
|
115
|
+
- 124 REST endpoints
|
|
116
116
|
- 6 MCP resources, 3 MCP prompts
|
|
117
117
|
- 12 hooks, 4 skills
|
|
118
118
|
- 50+ iii functions
|
package/README.md
CHANGED
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
<p align="center">
|
|
43
43
|
<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>
|
|
44
44
|
<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>
|
|
45
|
-
<picture><source media="(prefers-color-scheme: dark)" srcset="assets/tags/light/stat-tools.svg"><img src="assets/tags/stat-tools.svg" alt="
|
|
45
|
+
<picture><source media="(prefers-color-scheme: dark)" srcset="assets/tags/light/stat-tools.svg"><img src="assets/tags/stat-tools.svg" alt="53 MCP tools" height="38" /></picture>
|
|
46
46
|
<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>
|
|
47
47
|
<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>
|
|
48
48
|
<picture><source media="(prefers-color-scheme: dark)" srcset="assets/tags/light/stat-tests.svg"><img src="assets/tags/stat-tests.svg" alt="950+ tests passing" height="38" /></picture>
|
|
@@ -396,7 +396,7 @@ Implementation details live in `src/cli.ts` (see `runUpgrade` around the `src/cl
|
|
|
396
396
|
### Claude Code (one block, paste it)
|
|
397
397
|
|
|
398
398
|
```
|
|
399
|
-
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
|
|
399
|
+
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 53 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.
|
|
400
400
|
```
|
|
401
401
|
|
|
402
402
|
### Codex CLI (Codex plugin platform)
|
|
@@ -773,7 +773,7 @@ npm install @xenova/transformers
|
|
|
773
773
|
|
|
774
774
|
<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>
|
|
775
775
|
|
|
776
|
-
|
|
776
|
+
53 tools, 6 resources, 3 prompts, and 4 skills — the most comprehensive MCP memory toolkit for any agent.
|
|
777
777
|
|
|
778
778
|
> **MCP shim vs full server:** the published `@agentmemory/mcp` package is a thin shim. It exposes the full 51-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`.
|
|
779
779
|
|
|
@@ -1058,7 +1058,10 @@ Create `~/.agentmemory/.env`:
|
|
|
1058
1058
|
# # api-key header + api-version query param.
|
|
1059
1059
|
# OPENAI_API_VERSION=2024-08-01-preview # Optional: Azure api-version query param
|
|
1060
1060
|
# OPENAI_MODEL=gpt-4o-mini # Optional: default model
|
|
1061
|
-
# OPENAI_TIMEOUT_MS=60000 # Optional:
|
|
1061
|
+
# OPENAI_TIMEOUT_MS=60000 # Optional: OpenAI-scoped alias for the outbound fetch
|
|
1062
|
+
# # timeout. Takes precedence over AGENTMEMORY_LLM_TIMEOUT_MS
|
|
1063
|
+
# # for back-compat with v0.9.17. New configs should
|
|
1064
|
+
# # prefer the global AGENTMEMORY_LLM_TIMEOUT_MS below.
|
|
1062
1065
|
# OPENAI_REASONING_EFFORT=none # Optional: "low" | "medium" | "high" | "none"
|
|
1063
1066
|
# # Honored only by OpenAI's reasoning models (o1, o3,
|
|
1064
1067
|
# # gpt-*-reasoning) and providers that mirror that
|
|
@@ -1080,6 +1083,17 @@ Create `~/.agentmemory/.env`:
|
|
|
1080
1083
|
# OPENAI_EMBEDDING_MODEL=text-embedding-3-small
|
|
1081
1084
|
# OPENAI_EMBEDDING_DIMENSIONS=1536 # Required when the model is not in the known-models table
|
|
1082
1085
|
|
|
1086
|
+
# Outbound LLM / embedding timeout
|
|
1087
|
+
# AGENTMEMORY_LLM_TIMEOUT_MS=60000 # Default: 60 000 ms (60 s). Applies to every
|
|
1088
|
+
# raw-fetch provider (Gemini, OpenRouter, MiniMax,
|
|
1089
|
+
# OpenAI LLM, OpenAI/Cohere/Voyage/OpenRouter
|
|
1090
|
+
# embedding). For the OpenAI LLM path, the
|
|
1091
|
+
# OpenAI-scoped OPENAI_TIMEOUT_MS alias (above)
|
|
1092
|
+
# takes precedence when set, for back-compat
|
|
1093
|
+
# with v0.9.17.
|
|
1094
|
+
# Increase for slow networks or large batch calls;
|
|
1095
|
+
# decrease to fail-fast on rate-limit holds.
|
|
1096
|
+
|
|
1083
1097
|
# Search tuning
|
|
1084
1098
|
# BM25_WEIGHT=0.4
|
|
1085
1099
|
# VECTOR_WEIGHT=0.6
|
|
@@ -1149,7 +1163,7 @@ Create `~/.agentmemory/.env`:
|
|
|
1149
1163
|
|
|
1150
1164
|
<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>
|
|
1151
1165
|
|
|
1152
|
-
|
|
1166
|
+
124 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.
|
|
1153
1167
|
|
|
1154
1168
|
<details>
|
|
1155
1169
|
<summary>Key endpoints</summary>
|
package/dist/.env.example
CHANGED
|
@@ -45,6 +45,12 @@
|
|
|
45
45
|
|
|
46
46
|
# MAX_TOKENS=4096 # Cap LLM completion tokens for compression / summarise calls
|
|
47
47
|
|
|
48
|
+
# Outbound LLM / embedding timeout — shared across every raw-fetch provider
|
|
49
|
+
# (Gemini, OpenRouter, MiniMax, OpenAI LLM, and OpenAI/Cohere/Voyage/OpenRouter
|
|
50
|
+
# embedding). The OpenAI LLM path also honours the OpenAI-scoped
|
|
51
|
+
# OPENAI_TIMEOUT_MS alias for back-compat with v0.9.17 (precedence).
|
|
52
|
+
# AGENTMEMORY_LLM_TIMEOUT_MS=60000 # Default: 60 000 ms (60 s)
|
|
53
|
+
|
|
48
54
|
# Opt-in Claude-subscription fallback (spawns @anthropic-ai/claude-agent-sdk
|
|
49
55
|
# child sessions). Off by default — the agent-sdk fallback can trigger
|
|
50
56
|
# Stop-hook recursion (#149 follow-up) when invoked from inside Claude Code.
|
package/dist/cli.mjs
CHANGED
|
@@ -71,7 +71,8 @@ const KV = {
|
|
|
71
71
|
imageEmbeddings: "mem:image-embeddings",
|
|
72
72
|
slots: "mem:slots",
|
|
73
73
|
globalSlots: "mem:slots:global",
|
|
74
|
-
state: "mem:state"
|
|
74
|
+
state: "mem:state",
|
|
75
|
+
commits: "mem:commits"
|
|
75
76
|
};
|
|
76
77
|
const STREAM = {
|
|
77
78
|
name: "mem-live",
|
|
@@ -568,7 +569,10 @@ function isFirstRun() {
|
|
|
568
569
|
const AGENTMEMORY_MCP_BLOCK = {
|
|
569
570
|
command: "npx",
|
|
570
571
|
args: ["-y", "@agentmemory/mcp"],
|
|
571
|
-
env: {
|
|
572
|
+
env: {
|
|
573
|
+
AGENTMEMORY_URL: "${AGENTMEMORY_URL}",
|
|
574
|
+
AGENTMEMORY_SECRET: "${AGENTMEMORY_SECRET}"
|
|
575
|
+
}
|
|
572
576
|
};
|
|
573
577
|
function backupsDir() {
|
|
574
578
|
return join(homedir(), ".agentmemory", "backups");
|
|
@@ -1433,7 +1437,7 @@ function bootLog(msg) {
|
|
|
1433
1437
|
|
|
1434
1438
|
//#endregion
|
|
1435
1439
|
//#region src/version.ts
|
|
1436
|
-
const VERSION = "0.9.
|
|
1440
|
+
const VERSION = "0.9.19";
|
|
1437
1441
|
|
|
1438
1442
|
//#endregion
|
|
1439
1443
|
//#region src/cli.ts
|
|
@@ -1748,7 +1752,7 @@ function detectIiiConsole() {
|
|
|
1748
1752
|
};
|
|
1749
1753
|
return { kind: "missing" };
|
|
1750
1754
|
}
|
|
1751
|
-
const III_CONSOLE_INSTALL_CMD = "curl -fsSL https://install.iii.dev/console/main/install.sh |
|
|
1755
|
+
const III_CONSOLE_INSTALL_CMD = "curl -fsSL https://install.iii.dev/console/main/install.sh | bash -s -- --next";
|
|
1752
1756
|
async function ensureIiiConsole() {
|
|
1753
1757
|
const state = detectIiiConsole();
|
|
1754
1758
|
if (state.kind === "installed") return state;
|
|
@@ -2088,7 +2092,7 @@ async function main() {
|
|
|
2088
2092
|
if (firstRun || IS_RESET) await runOnboarding();
|
|
2089
2093
|
if (skipEngine) {
|
|
2090
2094
|
if (IS_VERBOSE) p.log.info("Skipping engine check (--no-engine)");
|
|
2091
|
-
await import("./src-
|
|
2095
|
+
await import("./src-2wwYDPGA.mjs");
|
|
2092
2096
|
if (await waitForAgentmemoryReady(15e3)) {
|
|
2093
2097
|
const consoleState = await ensureIiiConsole();
|
|
2094
2098
|
await maybeOfferGlobalInstall();
|
|
@@ -2100,7 +2104,7 @@ async function main() {
|
|
|
2100
2104
|
if (IS_VERBOSE) p.log.success("iii-engine is running");
|
|
2101
2105
|
warnIfEngineVersionMismatch(whichBinary("iii") ?? fallbackIiiPaths().find((p) => existsSync(p)) ?? null);
|
|
2102
2106
|
adoptRunningEngine();
|
|
2103
|
-
await import("./src-
|
|
2107
|
+
await import("./src-2wwYDPGA.mjs");
|
|
2104
2108
|
if (await waitForAgentmemoryReady(15e3)) {
|
|
2105
2109
|
const consoleState = await ensureIiiConsole();
|
|
2106
2110
|
await maybeOfferGlobalInstall();
|
|
@@ -2149,7 +2153,7 @@ async function main() {
|
|
|
2149
2153
|
process.exit(1);
|
|
2150
2154
|
}
|
|
2151
2155
|
s.stop("iii-engine is ready");
|
|
2152
|
-
await import("./src-
|
|
2156
|
+
await import("./src-2wwYDPGA.mjs");
|
|
2153
2157
|
if (await waitForAgentmemoryReady(15e3)) {
|
|
2154
2158
|
const consoleState = await ensureIiiConsole();
|
|
2155
2159
|
await maybeOfferGlobalInstall();
|
|
@@ -2159,7 +2163,13 @@ async function main() {
|
|
|
2159
2163
|
}
|
|
2160
2164
|
async function apiFetch(base, path, timeoutMs = 5e3) {
|
|
2161
2165
|
try {
|
|
2162
|
-
|
|
2166
|
+
const headers = {};
|
|
2167
|
+
const secret = process.env["AGENTMEMORY_SECRET"];
|
|
2168
|
+
if (secret) headers["Authorization"] = `Bearer ${secret}`;
|
|
2169
|
+
return await (await fetch(`${base}/agentmemory/${path}`, {
|
|
2170
|
+
signal: AbortSignal.timeout(timeoutMs),
|
|
2171
|
+
headers
|
|
2172
|
+
})).json();
|
|
2163
2173
|
} catch {
|
|
2164
2174
|
return null;
|
|
2165
2175
|
}
|
|
@@ -3034,7 +3044,7 @@ async function runStop() {
|
|
|
3034
3044
|
p.outro("Stopped. Memories persisted to disk; restart anytime with: npx @agentmemory/agentmemory");
|
|
3035
3045
|
}
|
|
3036
3046
|
async function runMcp() {
|
|
3037
|
-
await import("./standalone-
|
|
3047
|
+
await import("./standalone-DMLk7YxP.mjs");
|
|
3038
3048
|
}
|
|
3039
3049
|
async function runConnectCmd() {
|
|
3040
3050
|
const { runConnect } = await Promise.resolve().then(() => connect_exports);
|