Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
89 changes: 74 additions & 15 deletions .aiwg/reports/g-icm-01-interface-inventory.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@
"control_id": "G-ICM-01",
"project_id": "github.com/chronodeai/agentmemory",
"source_identity": {
"commit_sha": "c63d30d8a73c2606d3b1744d44bfebccf879aab4",
"commit_tree_sha": "6bc317c59fa693a3aabc96f9be2fa611ba8fb67f",
"inventory_input_sha256": "72e91136f073462267f8c40b3dbdd2bf0661992f0f992a9b73e0256bd3ec04c8"
"commit_sha": "f4d09d665ce361469d656d33c58fb7c3b9501c10",
"commit_tree_sha": "4030db14ef5d20729acb7ab5d3af6f89d2e88e9a",
"inventory_input_sha256": "a37239e57e45775e39143e539e5e620e5545f4a9c51e49bb4f5f6197ddf3e874"
},
"public_route_allowlist": [
"GET /agentmemory/livez"
],
"counts": {
"registered_api_functions": 136,
"http_routes": 135,
"registered_api_functions": 137,
"http_routes": 136,
"public_routes": 1,
"protected_routes": 134,
"protected_routes": 135,
"missing_auth_routes": 0,
"mcp_tools": 59,
"mcp_tools": 60,
"mcp_transport_routes": 6,
"mcp_resources": 5,
"mcp_prompts": 3,
Expand Down Expand Up @@ -614,7 +614,7 @@
"middleware": [],
"registration": "protected-wrapper",
"auth_control": "required",
"source": "src/triggers/api.ts:4637"
"source": "src/triggers/api.ts:4652"
},
{
"surface_id": "REST:POST:/agentmemory/insights/search",
Expand All @@ -624,7 +624,7 @@
"middleware": [],
"registration": "protected-wrapper",
"auth_control": "required",
"source": "src/triggers/api.ts:4659"
"source": "src/triggers/api.ts:4674"
},
{
"surface_id": "REST:POST:/agentmemory/leases/acquire",
Expand Down Expand Up @@ -676,6 +676,16 @@
"auth_control": "required",
"source": "src/triggers/api.ts:4481"
},
{
"surface_id": "REST:POST:/agentmemory/lessons/delete",
"method": "POST",
"path": "/agentmemory/lessons/delete",
"function_id": "api::lesson-delete",
"middleware": [],
"registration": "protected-wrapper",
"auth_control": "required",
"source": "src/triggers/api.ts:4582"
},
{
"surface_id": "REST:POST:/agentmemory/lessons/search",
"method": "POST",
Expand Down Expand Up @@ -826,7 +836,7 @@
"middleware": [],
"registration": "protected-wrapper",
"auth_control": "required",
"source": "src/triggers/api.ts:4584"
"source": "src/triggers/api.ts:4599"
},
{
"surface_id": "REST:POST:/agentmemory/patterns",
Expand Down Expand Up @@ -902,7 +912,7 @@
"middleware": [],
"registration": "protected-wrapper",
"auth_control": "required",
"source": "src/triggers/api.ts:4603"
"source": "src/triggers/api.ts:4618"
},
{
"surface_id": "REST:GET:/agentmemory/relations",
Expand Down Expand Up @@ -1670,6 +1680,15 @@
"project_parameter": false,
"scope_parameter": false
},
{
"surface_id": "MCP:TOOL:memory_lesson_delete",
"name": "memory_lesson_delete",
"required": [
"lessonId"
],
"project_parameter": false,
"scope_parameter": false
},
{
"surface_id": "MCP:TOOL:memory_lesson_recall",
"name": "memory_lesson_recall",
Expand Down Expand Up @@ -4006,7 +4025,7 @@
{
"surface_id": "REST:GET:/agentmemory/insights",
"type": "rest",
"source": "src/triggers/api.ts:4637",
"source": "src/triggers/api.ts:4652",
"auth_control": "required",
"control_ids": [
"ICM-08"
Expand All @@ -4026,7 +4045,7 @@
{
"surface_id": "REST:POST:/agentmemory/insights/search",
"type": "rest",
"source": "src/triggers/api.ts:4659",
"source": "src/triggers/api.ts:4674",
"auth_control": "required",
"control_ids": [
"ICM-08"
Expand Down Expand Up @@ -4158,6 +4177,26 @@
"test/promotions.test.ts"
]
},
{
"surface_id": "REST:POST:/agentmemory/lessons/delete",
"type": "rest",
"source": "src/triggers/api.ts:4582",
"auth_control": "required",
"control_ids": [
"ICM-08"
],
"requirements": [
"FR-13",
"FR-14"
],
"risks": [
"R-03",
"R-05"
],
"tests": [
"test/promotions.test.ts"
]
},
{
"surface_id": "REST:POST:/agentmemory/lessons/search",
"type": "rest",
Expand Down Expand Up @@ -4497,7 +4536,7 @@
{
"surface_id": "REST:POST:/agentmemory/obsidian/export",
"type": "rest",
"source": "src/triggers/api.ts:4584",
"source": "src/triggers/api.ts:4599",
"auth_control": "required",
"control_ids": [
"ICM-04",
Expand Down Expand Up @@ -4661,7 +4700,7 @@
{
"surface_id": "REST:POST:/agentmemory/reflect",
"type": "rest",
"source": "src/triggers/api.ts:4603",
"source": "src/triggers/api.ts:4618",
"auth_control": "required",
"control_ids": [
"ICM-04",
Expand Down Expand Up @@ -6664,6 +6703,26 @@
"test/integration.test.ts"
]
},
{
"surface_id": "MCP:TOOL:memory_lesson_delete",
"type": "mcp-tool",
"source": "src/mcp/tools-registry.ts",
"auth_control": "transport-required",
"control_ids": [
"ICM-08"
],
"requirements": [
"FR-13",
"FR-14"
],
"risks": [
"R-03",
"R-05"
],
"tests": [
"test/promotions.test.ts"
]
},
{
"surface_id": "MCP:TOOL:memory_lesson_recall",
"type": "mcp-tool",
Expand Down
4 changes: 2 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,8 @@ Hook scripts in `src/hooks/` are standalone Node.js scripts (no iii-sdk import).

## Current Stats (v0.9.28)

- 59 MCP tools (`all` by default; 8 with `AGENTMEMORY_TOOLS=core`)
- 135 REST endpoints
- 60 MCP tools (`all` by default; 8 with `AGENTMEMORY_TOOLS=core`)
- 136 REST endpoints
- 6 MCP resources, 3 MCP prompts
- 12 hooks, 15 skills (plus the standalone post-commit capture entrypoint)
- 260+ iii functions
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
<p align="center">
<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>
<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>
<picture><source media="(prefers-color-scheme: dark)" srcset="assets/tags/light/stat-tools.svg"><img src="assets/tags/stat-tools.svg" alt="59 MCP tools" height="38" /></picture>
<picture><source media="(prefers-color-scheme: dark)" srcset="assets/tags/light/stat-tools.svg"><img src="assets/tags/stat-tools.svg" alt="60 MCP tools" height="38" /></picture>
<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>
<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>
<picture><source media="(prefers-color-scheme: dark)" srcset="assets/tags/light/stat-tests.svg"><img src="assets/tags/stat-tests.svg" alt="1,428+ tests passing" height="38" /></picture>
Expand Down Expand Up @@ -504,7 +504,7 @@ Implementation details live in `src/cli.ts` (see `runUpgrade` around the `src/cl
### Claude Code (one block, paste it)

```text
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, 15 skills, AND auto-wires the `@agentmemory/mcp` stdio server via its `.mcp.json`, so you get 59 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.
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, 15 skills, AND auto-wires the `@agentmemory/mcp` stdio server via its `.mcp.json`, so you get 60 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.
```

#### Claude Code without the plugin install (MCP-standalone path)
Expand Down Expand Up @@ -955,9 +955,9 @@ npm install @xenova/transformers

<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>

59 tools, 6 resources, 3 prompts, and 15 skills, the most comprehensive MCP memory toolkit for any agent.
60 tools, 6 resources, 3 prompts, and 15 skills, the most comprehensive MCP memory toolkit for any agent.

> **MCP shim vs full server:** the published `@agentmemory/mcp` package is a thin shim. It exposes the full 58-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`.
> **MCP shim vs full server:** the published `@agentmemory/mcp` package is a thin shim. It exposes the full 60-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`.

### 53 Tools

Expand Down Expand Up @@ -1503,7 +1503,7 @@ Create `~/.agentmemory/.env`:

<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>

135 endpoints on port `3111`. The REST API binds to `127.0.0.1` by default.
136 endpoints on port `3111`. The REST API binds to `127.0.0.1` by default.
Only `/agentmemory/livez` is public. Protected endpoints, including detailed
health telemetry, require `Authorization: Bearer <secret>`. Explicit
cross-project `scope: "global"` requires the separate
Expand Down
2 changes: 1 addition & 1 deletion assets/tags/light/stat-tools.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion assets/tags/stat-tools.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion ci/r13-test-manifest.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"count": 159,
"sha256": "987f48c8beda0e67f96c4b16a60c5637cca072d2bb054493561a74fbf4e984b7",
"content_sha256": "75371c531f6b4a71fe2c6ea72e483bbb3005d570b8e680e88371ba928b3c1843"
"content_sha256": "5b4e61aba030ee6139c86f29cf7c2eccda3923cb959578b1aada8e67efee6184"
}
2 changes: 1 addition & 1 deletion plugin/.claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "agentmemory",
"version": "0.9.28-chronode.12",
"description": "Persistent memory for AI coding agents -- captures tool usage, compresses via LLM, injects context into future sessions. 12 hooks, 59 MCP tools, 15 skills, real-time viewer.",
"description": "Persistent memory for AI coding agents -- captures tool usage, compresses via LLM, injects context into future sessions. 12 hooks, 60 MCP tools, 15 skills, real-time viewer.",
"author": {
"name": "Rohit Ghumare",
"url": "https://github.com/rohitg00"
Expand Down
2 changes: 1 addition & 1 deletion plugin/.codex-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "agentmemory",
"version": "0.9.28-chronode.12",
"description": "Persistent memory for AI coding agents -- captures tool usage, compresses via LLM, injects context into future sessions. 11 hooks, 59 MCP tools, 15 skills, real-time viewer.",
"description": "Persistent memory for AI coding agents -- captures tool usage, compresses via LLM, injects context into future sessions. 11 hooks, 60 MCP tools, 15 skills, real-time viewer.",
"author": {
"name": "Rohit Ghumare",
"url": "https://github.com/rohitg00"
Expand Down
2 changes: 1 addition & 1 deletion plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "agentmemory",
"version": "0.9.28-chronode.12",
"description": "Persistent memory for AI coding agents -- captures tool usage, compresses via LLM, injects context into future sessions. 12 hooks, 59 MCP tools, 15 skills, real-time viewer.",
"description": "Persistent memory for AI coding agents -- captures tool usage, compresses via LLM, injects context into future sessions. 12 hooks, 60 MCP tools, 15 skills, real-time viewer.",
"author": {
"name": "Rohit Ghumare",
"url": "https://github.com/rohitg00"
Expand Down
39 changes: 30 additions & 9 deletions plugin/scripts/standalone.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -1306,6 +1306,18 @@ const V070_TOOLS = [
required: ["query"]
}
},
{
name: "memory_lesson_delete",
description: "Soft-delete a lesson by id. Deleted lessons are excluded from recall and list; re-saving the same content creates a fresh lesson.",
inputSchema: {
type: "object",
properties: { lessonId: {
type: "string",
description: "The lesson id (lsn_...)"
} },
required: ["lessonId"]
}
},
{
name: "memory_obsidian_export",
description: "Export memories, lessons, and crystals as Obsidian-compatible Markdown files with YAML frontmatter and wikilinks for graph view.",
Expand Down Expand Up @@ -2032,10 +2044,16 @@ const READ_ONLY_LOCAL_FALLBACK_TOOLS = new Set([
"memory_export",
"memory_audit"
]);
const SUPPORTED_PROTOCOL_VERSIONS = [
"2025-11-25",
"2025-06-18",
"2025-03-26",
"2024-11-05"
];
const SERVER_INFO = {
name: "agentmemory",
version: VERSION,
protocolVersion: "2024-11-05"
protocolVersion: SUPPORTED_PROTOCOL_VERSIONS[0]
};
function getStandalonePersistPath() {
return process.env["STANDALONE_PERSIST_PATH"]?.trim() || join(homedir(), ".agentmemory", "standalone.json");
Expand Down Expand Up @@ -2388,14 +2406,17 @@ async function finishShutdown() {
}
const transport = createStdioTransport(async (method, params) => {
switch (method) {
case "initialize": return {
protocolVersion: SERVER_INFO.protocolVersion,
capabilities: { tools: { listChanged: false } },
serverInfo: {
name: SERVER_INFO.name,
version: SERVER_INFO.version
}
};
case "initialize": {
const requested = params?.protocolVersion;
return {
protocolVersion: typeof requested === "string" && SUPPORTED_PROTOCOL_VERSIONS.includes(requested) ? requested : SERVER_INFO.protocolVersion,
capabilities: { tools: { listChanged: false } },
serverInfo: {
name: SERVER_INFO.name,
version: SERVER_INFO.version
}
};
}
case "notifications/initialized": return {};
case "tools/list": return handleToolsList();
case "tools/call": {
Expand Down
3 changes: 2 additions & 1 deletion plugin/skills/agentmemory-mcp-tools/REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Generated from `src/mcp/tools-registry.ts`. Do not edit the block below by hand; run `npm run skills:gen` after changing the registry.

<!-- AUTOGEN:tools START - generated by scripts/skills/generate.ts, do not edit by hand -->
agentmemory exposes 59 MCP tools. 8 are in the lean core set (`--tools core` or `AGENTMEMORY_TOOLS=core`); the rest load with `--tools all` (default).
agentmemory exposes 60 MCP tools. 8 are in the lean core set (`--tools core` or `AGENTMEMORY_TOOLS=core`); the rest load with `--tools all` (default).

| Tool | Core | Parameters | Purpose |
| --- | --- | --- | --- |
Expand Down Expand Up @@ -31,6 +31,7 @@ agentmemory exposes 59 MCP tools. 8 are in the lean core set (`--tools core` or
| `memory_heal` | | `categories`: string, `dryRun`: string | Auto-fix all fixable issues found by diagnostics. Unblocks stuck actions, expires stale leases, cleans up orphaned data. |
| `memory_insight_list` | | `project`: string, `scope`: string, `minConfidence`: number, `limit`: number | List synthesized insights, higher-order observations derived from patterns across memories, lessons, and crystals. |
| `memory_lease` | | `actionId`*: string, `agentId`*: string, `operation`*: string, `result`: string, `ttlMs`: number | Acquire, release, or renew an exclusive lease on an action. Prevents multiple agents from working on the same thing. |
| `memory_lesson_delete` | | `lessonId`*: string | Soft-delete a lesson by id. Deleted lessons are excluded from recall and list; re-saving the same content creates a fresh lesson. |
| `memory_lesson_recall` | | `query`*: string, `project`: string, `scope`: string, `minConfidence`: number, `limit`: number | Search lessons by query. Returns lessons sorted by confidence and recency. Use to check what the agent has learned before making decisions. |
| `memory_lesson_save` | yes | `content`*: string, `context`: string, `confidence`: number, `project`: string, `scope`: string, `tags`: string | Save a lesson learned from this session. Lessons have confidence scores that strengthen when reinforced and decay when not used. Duplicate content auto-strengthens the existing lesson. |
| `memory_mesh_sync` | | `peerId`: string, `direction`: string | Sync memories and actions with peer agentmemory instances for multi-agent collaboration. |
Expand Down
3 changes: 2 additions & 1 deletion plugin/skills/agentmemory-rest-api/REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Generated from `src/triggers/api.ts`. Do not edit the block below by hand; run `
<!-- AUTOGEN:rest START - generated by scripts/skills/generate.ts, do not edit by hand -->
The REST API is the primary surface. All paths are under `http://localhost:3111` (override with `--port`). When `AGENTMEMORY_SECRET` is set, send `Authorization: Bearer $AGENTMEMORY_SECRET`; localhost is otherwise open.

124 registered endpoints:
125 registered endpoints:

| Method | Path |
| --- | --- |
Expand Down Expand Up @@ -68,6 +68,7 @@ The REST API is the primary surface. All paths are under `http://localhost:3111`
| POST | `/agentmemory/leases/release` |
| POST | `/agentmemory/leases/renew` |
| POST | `/agentmemory/lessons` |
| POST | `/agentmemory/lessons/delete` |
| POST | `/agentmemory/lessons/search` |
| POST | `/agentmemory/lessons/strengthen` |
| GET | `/agentmemory/livez` |
Expand Down
Loading
Loading