@agentmemory/agentmemory 0.7.6 → 0.7.8

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 CHANGED
@@ -26,9 +26,9 @@
26
26
 
27
27
  ---
28
28
 
29
- Every AI coding agent has the same blind spot. Session ends, memory vanishes. You re-explain architecture. You re-discover bugs. You re-teach preferences. Built-in memory files like CLAUDE.md and .cursorrules are 200-line sticky notes that overflow and go stale. agentmemory replaces that with a searchable, versioned, cross-agent database — 43 MCP tools, triple-stream retrieval (BM25 + vector + knowledge graph), 4-tier memory consolidation, provenance-tracked citations, and cascading staleness so retired facts never pollute your context again. One instance serves Claude Code, Cursor, Codex, Windsurf, and any MCP client simultaneously. 627 tests. Zero external DB dependencies.
29
+ Every AI coding agent has the same blind spot. Session ends, memory vanishes. You re-explain architecture. You re-discover bugs. You re-teach preferences. Built-in memory files like CLAUDE.md and .cursorrules are 200-line sticky notes that overflow and go stale. agentmemory replaces that with a searchable, versioned, cross-agent database — 43 MCP tools, triple-stream retrieval (BM25 + vector + knowledge graph), 4-tier memory consolidation, provenance-tracked citations, and cascading staleness so retired facts never pollute your context again. One instance serves Claude Code, Cursor, Codex, Windsurf, and any MCP client simultaneously. 646 tests. Zero external DB dependencies.
30
30
 
31
- The result is measurable. On 240 real observations across 30 sessions, agentmemory hits 64% Recall@10 and perfect MRR while using 92% fewer tokens than dumping everything into context. When an agent searches "database performance optimization," it finds the N+1 fix you made three weeks ago — something keyword grep literally cannot do. Memories version automatically, supersede each other, propagate staleness to related graph nodes, and sync across agent instances via P2P mesh. Your agents stop repeating mistakes. Your context stays clean. Your sessions start fast.
31
+ The result is measurable. On LongMemEval-S (ICLR 2025, 500 questions), agentmemory achieves **95.2% Recall@5** and **98.6% Recall@10** with hybrid BM25+vector search — within 1.4pp of raw vector baselines while using 92% fewer tokens than dumping everything into context. When an agent searches "database performance optimization," it finds the N+1 fix you made three weeks ago — something keyword grep literally cannot do. Memories version automatically, supersede each other, propagate staleness to related graph nodes, and sync across agent instances via P2P mesh. Your agents stop repeating mistakes. Your context stays clean. Your sessions start fast.
32
32
 
33
33
  ```bash
34
34
  npx @agentmemory/agentmemory # installs iii-engine if missing, starts everything
@@ -97,14 +97,25 @@ agentmemory is the searchable database behind the sticky notes.
97
97
  | Multi-agent coordination | Impossible | Leases, signals, actions, routines |
98
98
  | Cross-agent sync | No | P2P mesh (7 scopes: memories, actions, semantic, procedural, relations, graph) |
99
99
  | Memory trust | No verification | Citation chain back to source observations with confidence scores |
100
- | Semantic search | No (keyword grep) | Yes (Recall@10: 64% vs 56% for grep) |
100
+ | Semantic search | No (keyword grep) | Yes (95.2% R@5 on LongMemEval-S) |
101
101
  | Memory lifecycle | Manual pruning | Ebbinghaus decay + tiered eviction |
102
102
  | Knowledge graph | No | Entity extraction + temporal versioning |
103
103
  | Observability | Read files manually | Real-time viewer on :3113 |
104
104
 
105
105
  ### Benchmarks (measured, not projected)
106
106
 
107
- Evaluated on 240 real-world coding observations across 30 sessions with 20 labeled queries:
107
+ #### LongMemEval-S (ICLR 2025, 500 questions)
108
+
109
+ Evaluated on [LongMemEval-S](https://arxiv.org/abs/2410.10813), an academic benchmark with 500 questions across ~48 sessions per question (~115K tokens). Same dataset and metric (`recall_any@K`) used by other memory systems.
110
+
111
+ | System | R@5 | R@10 | NDCG@10 | MRR |
112
+ |---|---|---|---|---|
113
+ | **agentmemory BM25+Vector** | **95.2%** | **98.6%** | **87.9%** | **88.2%** |
114
+ | agentmemory BM25-only | 86.2% | 94.6% | 73.0% | 71.5% |
115
+
116
+ These are retrieval recall scores (not end-to-end QA accuracy). Embedding model: `all-MiniLM-L6-v2` (local, no API key).
117
+
118
+ #### Internal benchmark (240 observations, 20 queries)
108
119
 
109
120
  | System | Recall@10 | NDCG@10 | MRR | Tokens/query |
110
121
  |---|---|---|---|---|
@@ -112,9 +123,9 @@ Evaluated on 240 real-world coding observations across 30 sessions with 20 label
112
123
  | agentmemory BM25 (stemmed + synonyms) | 55.9% | 82.7% | 95.5% | 1,571 |
113
124
  | agentmemory + Xenova embeddings | **64.1%** | **94.9%** | **100.0%** | **1,571** |
114
125
 
115
- With real embeddings, agentmemory finds "N+1 query fix" when you search "database performance optimization" — something keyword matching literally cannot do.
126
+ agentmemory finds "N+1 query fix" when you search "database performance optimization" — something keyword matching literally cannot do.
116
127
 
117
- Full benchmark reports: [`benchmark/QUALITY.md`](benchmark/QUALITY.md), [`benchmark/SCALE.md`](benchmark/SCALE.md), [`benchmark/REAL-EMBEDDINGS.md`](benchmark/REAL-EMBEDDINGS.md)
128
+ Full benchmark reports: [`benchmark/LONGMEMEVAL.md`](benchmark/LONGMEMEVAL.md), [`benchmark/QUALITY.md`](benchmark/QUALITY.md), [`benchmark/SCALE.md`](benchmark/SCALE.md), [`benchmark/REAL-EMBEDDINGS.md`](benchmark/REAL-EMBEDDINGS.md)
118
129
 
119
130
  ## Supported Agents
120
131
 
@@ -135,9 +146,10 @@ Any agent that connects to MCP servers can use agentmemory's 43 tools, 6 resourc
135
146
 
136
147
  | Agent | How to connect |
137
148
  |---|---|
149
+ | **Cursor** | Add MCP server in settings or `~/.cursor/mcp.json` |
138
150
  | **Claude Desktop** | Add to `claude_desktop_config.json` MCP servers |
139
- | **Cursor** | Add MCP server in settings |
140
- | **Windsurf** | MCP server configuration |
151
+ | **Gemini CLI** | `gemini mcp add agentmemory -- npx agentmemory-mcp` |
152
+ | **OpenCode** | Add to `.opencode/config.json` MCP servers |
141
153
  | **Cline / Continue** | MCP server configuration |
142
154
  | **Any MCP client** | Point to `http://localhost:3111/agentmemory/mcp/*` |
143
155
 
@@ -160,13 +172,30 @@ GET /agentmemory/profile # Get project intelligence
160
172
  |---|---|
161
173
  | Claude Code user | Plugin install (hooks + MCP + skills) |
162
174
  | Building a custom agent with Claude SDK | AgentSDKProvider (zero config) |
163
- | Using Cursor, Windsurf, or any MCP client | MCP server (41 tools + 6 resources + 3 prompts) |
175
+ | Using Cursor, Gemini CLI, OpenCode, or any MCP client | MCP server (43 tools + 6 resources + 3 prompts) |
164
176
  | Building your own agent framework | REST API (103 endpoints) |
165
177
  | Sharing memory across multiple agents | All agents point to the same iii-engine instance |
166
178
 
167
179
  ## Quick Start
168
180
 
169
- ### 1. Install the Plugin (Claude Code)
181
+ ### 1. Start agentmemory
182
+
183
+ ```bash
184
+ npx @agentmemory/agentmemory
185
+ ```
186
+
187
+ This auto-installs iii-engine if missing, starts it, and runs the worker. One command.
188
+
189
+ Or from source:
190
+
191
+ ```bash
192
+ git clone https://github.com/rohitg00/agentmemory.git && cd agentmemory
193
+ npm install && npm run build && npm start
194
+ ```
195
+
196
+ ### 2. Connect your agent
197
+
198
+ **Claude Code (plugin — hooks + MCP + skills):**
170
199
 
171
200
  ```bash
172
201
  /plugin marketplace add rohitg00/agentmemory
@@ -175,35 +204,66 @@ GET /agentmemory/profile # Get project intelligence
175
204
 
176
205
  All 12 hooks, 4 skills, and MCP server are registered automatically.
177
206
 
178
- ### 2. Start agentmemory
207
+ **Cursor / Claude Desktop / Cline / any MCP client:**
208
+
209
+ Add to your MCP config (e.g. `~/.cursor/mcp.json`, `claude_desktop_config.json`):
210
+
211
+ ```json
212
+ {
213
+ "mcpServers": {
214
+ "agentmemory": {
215
+ "command": "npx",
216
+ "args": ["agentmemory-mcp"]
217
+ }
218
+ }
219
+ }
220
+ ```
221
+
222
+ **Gemini CLI:**
179
223
 
180
224
  ```bash
181
- npx @agentmemory/agentmemory
225
+ gemini mcp add agentmemory -- npx agentmemory-mcp
182
226
  ```
183
227
 
184
- This auto-installs iii-engine if missing, starts it, and runs the worker. One command.
228
+ **OpenCode:**
185
229
 
186
- Or from source:
230
+ Add to `.opencode/config.json`:
231
+
232
+ ```json
233
+ {
234
+ "mcpServers": {
235
+ "agentmemory": {
236
+ "command": "npx",
237
+ "args": ["agentmemory-mcp"]
238
+ }
239
+ }
240
+ }
241
+ ```
242
+
243
+ **REST API (any agent, any language):**
187
244
 
188
245
  ```bash
189
- git clone https://github.com/rohitg00/agentmemory.git && cd agentmemory
190
- npm install && npm run build && npm start
246
+ curl -X POST http://localhost:3111/agentmemory/remember \
247
+ -H "Content-Type: application/json" \
248
+ -d '{"content": "Always use jose for JWT on Edge", "type": "preference"}'
249
+
250
+ curl -X POST http://localhost:3111/agentmemory/smart-search \
251
+ -H "Content-Type: application/json" \
252
+ -d '{"query": "JWT authentication"}'
191
253
  ```
192
254
 
193
255
  ### 3. Verify
194
256
 
195
257
  ```bash
196
258
  curl http://localhost:3111/agentmemory/health
197
-
198
- # Real-time viewer (auto-starts on port 3113)
199
- open http://localhost:3113
259
+ open http://localhost:3113 # Real-time viewer
200
260
  ```
201
261
 
202
262
  ```json
203
263
  {
204
264
  "status": "healthy",
205
265
  "service": "agentmemory",
206
- "version": "0.7.4",
266
+ "version": "0.7.7",
207
267
  "health": {
208
268
  "memory": { "heapUsed": 42000000, "heapTotal": 67000000 },
209
269
  "cpu": { "percent": 2.1 },
@@ -424,7 +484,7 @@ Collects every 30 seconds: heap usage, CPU percentage (delta sampling), event lo
424
484
 
425
485
  ## MCP Server
426
486
 
427
- ### Tools (38)
487
+ ### Tools (43)
428
488
 
429
489
  | Tool | Description |
430
490
  |------|-------------|
@@ -488,7 +548,7 @@ Collects every 30 seconds: heap usage, CPU percentage (delta sampling), event lo
488
548
 
489
549
  ### Standalone MCP Server
490
550
 
491
- Run agentmemory as a standalone MCP server for any MCP-compatible agent (Cursor, Codex, Gemini CLI, Windsurf):
551
+ Run agentmemory as a standalone MCP server for any MCP-compatible agent (Cursor, Gemini CLI, OpenCode, Claude Desktop, Cline):
492
552
 
493
553
  ```bash
494
554
  npx agentmemory-mcp
@@ -616,7 +676,7 @@ ANTHROPIC_API_KEY=sk-ant-...
616
676
  # Obsidian Export (v0.7.0)
617
677
  # OBSIDIAN_AUTO_EXPORT=false
618
678
 
619
- # MCP Tool Visibility (v0.7.0) — "core" (7 tools) or "all" (41 tools)
679
+ # MCP Tool Visibility (v0.7.0) — "core" (7 tools) or "all" (43 tools)
620
680
  # AGENTMEMORY_TOOLS=core
621
681
 
622
682
  # Team Memory (v0.5.0)
@@ -724,9 +784,9 @@ agentmemory is built on iii-engine's three primitives:
724
784
  | Prometheus / Grafana | iii OTEL + built-in health monitor |
725
785
  | Redis (circuit breaker) | In-process circuit breaker + fallback chain |
726
786
 
727
- **113 source files. ~20,000 LOC. 627 tests. Zero external DB dependencies.**
787
+ **118 source files. ~21,800 LOC. 646 tests. Zero external DB dependencies.**
728
788
 
729
- ### Functions (89 mem:: functions)
789
+ ### Functions (123 mem:: functions)
730
790
 
731
791
  | Category | Functions | Purpose |
732
792
  |----------|-----------|---------|
@@ -808,7 +868,7 @@ agentmemory is built on iii-engine's three primitives:
808
868
  ```bash
809
869
  npm run dev # Hot reload
810
870
  npm run build # Production build (~425KB)
811
- npm test # Unit tests (627 tests, ~1.5s)
871
+ npm test # Unit tests (646 tests, ~1.7s)
812
872
  npm run test:integration # API tests (requires running services)
813
873
  ```
814
874
 
package/dist/cli.mjs CHANGED
@@ -160,12 +160,12 @@ async function main() {
160
160
  p.intro("agentmemory");
161
161
  if (skipEngine) {
162
162
  p.log.info("Skipping engine check (--no-engine)");
163
- await import("./src-CxKzBty4.mjs");
163
+ await import("./src-Ct05bSXw.mjs");
164
164
  return;
165
165
  }
166
166
  if (await isEngineRunning()) {
167
167
  p.log.success("iii-engine is running");
168
- await import("./src-CxKzBty4.mjs");
168
+ await import("./src-Ct05bSXw.mjs");
169
169
  return;
170
170
  }
171
171
  if (!await startEngine()) {
@@ -193,7 +193,7 @@ async function main() {
193
193
  process.exit(1);
194
194
  }
195
195
  s.stop("iii-engine is ready");
196
- await import("./src-CxKzBty4.mjs");
196
+ await import("./src-Ct05bSXw.mjs");
197
197
  }
198
198
  main().catch((err) => {
199
199
  p.log.error(err instanceof Error ? err.message : String(err));
package/dist/index.mjs CHANGED
@@ -3805,7 +3805,7 @@ function registerAutoForgetFunction(sdk, kv) {
3805
3805
 
3806
3806
  //#endregion
3807
3807
  //#region src/version.ts
3808
- const VERSION = "0.7.6";
3808
+ const VERSION = "0.7.8";
3809
3809
 
3810
3810
  //#endregion
3811
3811
  //#region src/functions/export-import.ts
@@ -3908,7 +3908,9 @@ function registerExportImportFunction(sdk, kv) {
3908
3908
  "0.7.3",
3909
3909
  "0.7.4",
3910
3910
  "0.7.5",
3911
- "0.7.6"
3911
+ "0.7.6",
3912
+ "0.7.7",
3913
+ "0.7.8"
3912
3914
  ]).has(importData.version)) return {
3913
3915
  success: false,
3914
3916
  error: `Unsupported export version: ${importData.version}`