@aman_asmuei/amem 0.22.1 → 0.24.0
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 +251 -123
- package/dist/cli.js +2 -2
- package/dist/cli.js.map +1 -1
- package/dist/dashboard.js +436 -129
- package/dist/dashboard.js.map +1 -1
- package/dist/hooks.js +20 -18
- package/dist/hooks.js.map +1 -1
- package/dist/index.js +29 -10
- package/dist/index.js.map +1 -1
- package/dist/tools/admin.js +0 -2
- package/dist/tools/admin.js.map +1 -1
- package/dist/tools/log.js +1 -1
- package/dist/tools/log.js.map +1 -1
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -1,117 +1,74 @@
|
|
|
1
1
|
<p align="center">
|
|
2
|
-
<img src="assets/logo.png" alt="amem" width="
|
|
2
|
+
<img src="assets/logo.png" alt="amem" width="140" />
|
|
3
3
|
</p>
|
|
4
4
|
|
|
5
5
|
<h1 align="center">amem</h1>
|
|
6
6
|
|
|
7
7
|
<p align="center">
|
|
8
|
-
<strong>
|
|
8
|
+
<strong>The memory layer for AI coding tools.</strong><br/>
|
|
9
|
+
<sub>Tell your AI once — it remembers everywhere.</sub>
|
|
9
10
|
</p>
|
|
10
11
|
|
|
11
12
|
<p align="center">
|
|
12
|
-
<a href="https://www.npmjs.com/package/@aman_asmuei/amem"><img src="https://img.shields.io/npm/v/@aman_asmuei/amem?style=
|
|
13
|
-
&
|
|
14
|
-
<a href="https://github.com/amanasmuei/amem/
|
|
15
|
-
|
|
16
|
-
<
|
|
17
|
-
|
|
18
|
-
<img src="https://img.shields.io/badge/MCP-compatible-8A2BE2?style=for-the-badge" alt="MCP compatible" />
|
|
19
|
-
|
|
20
|
-
<img src="https://img.shields.io/badge/node-%E2%89%A518-brightgreen?style=for-the-badge&logo=node.js&logoColor=white" alt="Node.js 18+" />
|
|
21
|
-
</p>
|
|
22
|
-
|
|
23
|
-
<p align="center">
|
|
24
|
-
Tell your AI something once — it remembers across Claude Code, GitHub Copilot, Cursor, Windsurf, and any MCP client.<br/>
|
|
25
|
-
Local-first · Semantic search · Knowledge graph · Self-evolving · Privacy-aware · No cloud required.
|
|
13
|
+
<a href="https://www.npmjs.com/package/@aman_asmuei/amem"><img src="https://img.shields.io/npm/v/@aman_asmuei/amem?style=flat-square&logo=npm&logoColor=white&color=cb3837" alt="npm" /></a>
|
|
14
|
+
<a href="https://github.com/amanasmuei/amem/actions"><img src="https://img.shields.io/github/actions/workflow/status/amanasmuei/amem/ci.yml?style=flat-square&logo=github&label=CI" alt="CI" /></a>
|
|
15
|
+
<a href="https://github.com/amanasmuei/amem/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue?style=flat-square" alt="MIT" /></a>
|
|
16
|
+
<img src="https://img.shields.io/badge/MCP-compatible-8A2BE2?style=flat-square" alt="MCP" />
|
|
17
|
+
<img src="https://img.shields.io/badge/node-%E2%89%A518-brightgreen?style=flat-square&logo=node.js&logoColor=white" alt="Node 18+" />
|
|
26
18
|
</p>
|
|
27
19
|
|
|
28
20
|
<br/>
|
|
29
21
|
|
|
30
|
-
<
|
|
31
|
-
<tr>
|
|
32
|
-
<td><strong>94.8% R@5</strong><br/><sub>LongMemEval Oracle, 500q</sub></td>
|
|
33
|
-
<td><strong>0.08ms</strong><br/><sub>Search at 10k memories</sub></td>
|
|
34
|
-
<td><strong>29 MCP tools</strong><br/><sub>Full memory toolkit</sub></td>
|
|
35
|
-
<td><strong>Powered by</strong><br/><sub><a href="https://github.com/amanasmuei/amem-core">amem-core</a></sub></td>
|
|
36
|
-
</tr>
|
|
37
|
-
</table>
|
|
22
|
+
<div align="center">
|
|
38
23
|
|
|
39
|
-
|
|
24
|
+
| 🎯 97.8% R@5 | ⚡ ~14ms p50 | 🛠 33 Tools | 🔒 100% Local |
|
|
25
|
+
|:---:|:---:|:---:|:---:|
|
|
26
|
+
| LongMemEval-S, 500q | Full recall pipeline | Complete memory toolkit | No cloud required |
|
|
27
|
+
|
|
28
|
+
</div>
|
|
40
29
|
|
|
41
30
|
<p align="center">
|
|
42
|
-
<a href="#-quick-start">Quick Start</a>
|
|
43
|
-
<a href="#-how-it-works">How It Works</a>
|
|
44
|
-
<a href="#-benchmarks">Benchmarks</a>
|
|
45
|
-
<a href="
|
|
46
|
-
<a href="#-
|
|
31
|
+
<a href="#-quick-start">Quick Start</a> ·
|
|
32
|
+
<a href="#-how-it-works">How It Works</a> ·
|
|
33
|
+
<a href="#-benchmarks">Benchmarks</a> ·
|
|
34
|
+
<a href="#%EF%B8%8F-tools-reference">Tools</a> ·
|
|
35
|
+
<a href="#-dashboard--knowledge-graph">Dashboard</a> ·
|
|
47
36
|
<a href="#-architecture">Architecture</a>
|
|
48
37
|
</p>
|
|
49
38
|
|
|
50
39
|
---
|
|
51
40
|
|
|
52
|
-
##
|
|
41
|
+
## 💡 The Problem
|
|
53
42
|
|
|
54
43
|
Every AI tool starts from zero. Every session. Every tool.
|
|
55
44
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
45
|
+
```diff
|
|
46
|
+
- You: "Don't use 'any' in TypeScript" → told Claude 3 times. Copilot still doesn't know.
|
|
47
|
+
- You: "We chose PostgreSQL over MongoDB" → explained in Cursor. Claude has no idea.
|
|
48
|
+
+ With amem: tell it once, every AI tool remembers — forever.
|
|
49
|
+
```
|
|
59
50
|
|
|
60
|
-
|
|
51
|
+
<details>
|
|
52
|
+
<summary><b>See it in action</b></summary>
|
|
61
53
|
|
|
62
54
|
```
|
|
63
55
|
You (in Claude Code): "Don't use any type in TypeScript"
|
|
64
|
-
amem stores this as a correction (priority 1.0)
|
|
56
|
+
└─ amem stores this as a correction (priority 1.0, confidence 100%)
|
|
65
57
|
|
|
66
58
|
You (switch to Copilot): starts coding
|
|
67
|
-
Copilot already knows — amem feeds it the same correction
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
No cloud. No API keys. Everything stays on your machine.
|
|
71
|
-
|
|
72
|
-
---
|
|
73
|
-
|
|
74
|
-
## 🧬 Powered by `amem-core`
|
|
59
|
+
└─ Copilot already knows — amem feeds it the same correction
|
|
75
60
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
```
|
|
79
|
-
Claude Code / Copilot / Cursor / any MCP client
|
|
80
|
-
│
|
|
81
|
-
│ MCP (stdio)
|
|
82
|
-
▼
|
|
83
|
-
┌─────────────────────────────────┐
|
|
84
|
-
│ @aman_asmuei/amem (this pkg) │
|
|
85
|
-
│ 29 MCP tools, CLI, hooks │
|
|
86
|
-
└────────────────┬────────────────┘
|
|
87
|
-
│ imports
|
|
88
|
-
▼
|
|
89
|
-
┌─────────────────────────────────┐
|
|
90
|
-
│ @aman_asmuei/amem-core │
|
|
91
|
-
│ embeddings · HNSW · recall │
|
|
92
|
-
│ knowledge graph · reflection │
|
|
93
|
-
│ 91.0% R@5 on LongMemEval │
|
|
94
|
-
└────────────────┬────────────────┘
|
|
95
|
-
│
|
|
96
|
-
▼
|
|
97
|
-
┌────────────────────┐
|
|
98
|
-
│ SQLite (one file) │
|
|
99
|
-
│ ~/.amem/memory.db │
|
|
100
|
-
└────────────────────┘
|
|
61
|
+
You (open Cursor): "What do you remember about TypeScript?"
|
|
62
|
+
└─ Instantly recalls: "Don't use any type" + all related preferences
|
|
101
63
|
```
|
|
102
64
|
|
|
103
|
-
|
|
104
|
-
|---|---|---|---|
|
|
105
|
-
| **`@aman_asmuei/amem`** *(this)* | MCP server + CLI + hooks | `npm install -g @aman_asmuei/amem` | Plug into Claude Code, Copilot, Cursor, any MCP client |
|
|
106
|
-
| **`@aman_asmuei/amem-core`** | Pure TypeScript library, zero MCP deps | `npm install @aman_asmuei/amem-core` | Embed memory directly in your own Node app |
|
|
107
|
-
|
|
108
|
-
**Why the split?** The same engine powers `amem` (this MCP server), `aman-agent` (CLI), `aman-tg` (Telegram bot), and any other Node app you want to give memory to. All retrieval-quality improvements ship via `amem-core`. All MCP-tool changes ship via `amem`. They version independently.
|
|
65
|
+
</details>
|
|
109
66
|
|
|
110
|
-
|
|
67
|
+
No cloud. No API keys. One SQLite file. Everything stays on your machine.
|
|
111
68
|
|
|
112
69
|
---
|
|
113
70
|
|
|
114
|
-
## Quick Start
|
|
71
|
+
## 🚀 Quick Start
|
|
115
72
|
|
|
116
73
|
<table>
|
|
117
74
|
<tr>
|
|
@@ -139,7 +96,7 @@ copilot plugin install amem
|
|
|
139
96
|
</table>
|
|
140
97
|
|
|
141
98
|
<details>
|
|
142
|
-
<summary><
|
|
99
|
+
<summary><b>📦 Cursor / Windsurf / Any MCP Client</b></summary>
|
|
143
100
|
|
|
144
101
|
```bash
|
|
145
102
|
npm install -g @aman_asmuei/amem
|
|
@@ -147,7 +104,7 @@ amem-cli init # Detects & configures all installed AI tools
|
|
|
147
104
|
amem-cli rules # Generates extraction rules for proactive memory use
|
|
148
105
|
```
|
|
149
106
|
|
|
150
|
-
Or
|
|
107
|
+
Or add to your MCP config manually:
|
|
151
108
|
|
|
152
109
|
```json
|
|
153
110
|
{
|
|
@@ -168,13 +125,58 @@ Or configure manually:
|
|
|
168
125
|
amem-cli stats # Should show "0 memories" initially
|
|
169
126
|
```
|
|
170
127
|
|
|
171
|
-
Tell your AI: *"Remember: always use strict TypeScript, never use any type"*
|
|
128
|
+
> 💬 Tell your AI: *"Remember: always use strict TypeScript, never use any type"*
|
|
129
|
+
>
|
|
130
|
+
> 🔄 Start a **new** session: *"What do you remember about TypeScript?"* — it recalls instantly.
|
|
131
|
+
|
|
132
|
+
---
|
|
133
|
+
|
|
134
|
+
## 🧬 Powered by `amem-core`
|
|
135
|
+
|
|
136
|
+
`amem` is the MCP server. The retrieval engine lives in [`@aman_asmuei/amem-core`](https://github.com/amanasmuei/amem-core).
|
|
137
|
+
|
|
138
|
+
```
|
|
139
|
+
Claude Code / Copilot / Cursor / any MCP client
|
|
140
|
+
│
|
|
141
|
+
│ MCP (stdio)
|
|
142
|
+
▼
|
|
143
|
+
┌──────────────────────────────────┐
|
|
144
|
+
│ @aman_asmuei/amem (this pkg) │
|
|
145
|
+
│ 33 Tools · 7 Resources · 2 Prompts
|
|
146
|
+
│ CLI · Hooks · Dashboard │
|
|
147
|
+
└───────────────┬──────────────────┘
|
|
148
|
+
│ imports
|
|
149
|
+
▼
|
|
150
|
+
┌──────────────────────────────────┐
|
|
151
|
+
│ @aman_asmuei/amem-core │
|
|
152
|
+
│ Embeddings · HNSW · Recall │
|
|
153
|
+
│ Knowledge Graph · Reflection │
|
|
154
|
+
│ 97.8% R@5 on LongMemEval-S │
|
|
155
|
+
└───────────────┬──────────────────┘
|
|
156
|
+
▼
|
|
157
|
+
┌────────────────────┐
|
|
158
|
+
│ SQLite + WAL │
|
|
159
|
+
│ ~/.amem/memory.db │
|
|
160
|
+
└────────────────────┘
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
<details>
|
|
164
|
+
<summary><b>Why two packages?</b></summary>
|
|
165
|
+
|
|
166
|
+
| Package | Role | Install |
|
|
167
|
+
|---|---|---|
|
|
168
|
+
| **`@aman_asmuei/amem`** *(this)* | MCP server + CLI + hooks | `npm i -g @aman_asmuei/amem` |
|
|
169
|
+
| [**`@aman_asmuei/amem-core`**](https://github.com/amanasmuei/amem-core) | Pure TS library, zero MCP deps | `npm i @aman_asmuei/amem-core` |
|
|
172
170
|
|
|
173
|
-
|
|
171
|
+
The same engine powers `amem` (MCP server), `aman-agent` (CLI), `aman-tg` (Telegram bot), and any Node app you give memory to. Retrieval improvements ship via `amem-core`. MCP-tool changes ship via `amem`. They version independently.
|
|
172
|
+
|
|
173
|
+
> The **97.8% R@5** headline is the engine quality from `amem-core` (LongMemEval-S, session-level, 500 questions, zero API calls) — exactly what you get whether you call it through MCP or import the library directly.
|
|
174
|
+
|
|
175
|
+
</details>
|
|
174
176
|
|
|
175
177
|
---
|
|
176
178
|
|
|
177
|
-
## How It Works
|
|
179
|
+
## ⚙️ How It Works
|
|
178
180
|
|
|
179
181
|
amem captures knowledge in **three layers** — from fully automatic to fully manual:
|
|
180
182
|
|
|
@@ -197,6 +199,9 @@ amem captures knowledge in **three layers** — from fully automatic to fully ma
|
|
|
197
199
|
|
|
198
200
|
Corrections always surface first — they are your AI's hard constraints.
|
|
199
201
|
|
|
202
|
+
<details>
|
|
203
|
+
<summary><b>🔄 Memory Tiers & Temporal Validity</b></summary>
|
|
204
|
+
|
|
200
205
|
### Memory Tiers
|
|
201
206
|
|
|
202
207
|
| Tier | Behavior |
|
|
@@ -212,7 +217,10 @@ Memories aren't forever. When facts change:
|
|
|
212
217
|
- Contradictions are **auto-detected** ��� storing a new decision auto-expires the old one
|
|
213
218
|
- Query any point in time with `memory_since`
|
|
214
219
|
|
|
215
|
-
|
|
220
|
+
</details>
|
|
221
|
+
|
|
222
|
+
<details>
|
|
223
|
+
<summary><b>🧠 Self-Evolving Memory Loop</b></summary>
|
|
216
224
|
|
|
217
225
|
Your memory doesn't just store — it **learns from its own structure**. Call `memory_reflect` to trigger the reflection engine:
|
|
218
226
|
|
|
@@ -236,7 +244,7 @@ memory_reflect → Analyzes your entire memory graph
|
|
|
236
244
|
The system auto-nudges when reflection is due (>7 days or >50 new memories since last run).
|
|
237
245
|
|
|
238
246
|
<details>
|
|
239
|
-
<summary><
|
|
247
|
+
<summary><b>📊 What the reflection report looks like</b></summary>
|
|
240
248
|
|
|
241
249
|
```
|
|
242
250
|
# Memory Reflection Report
|
|
@@ -276,40 +284,69 @@ Health Score: 68/100
|
|
|
276
284
|
|
|
277
285
|
---
|
|
278
286
|
|
|
279
|
-
## Benchmarks
|
|
287
|
+
## 📈 Benchmarks
|
|
288
|
+
|
|
289
|
+
### Recall Accuracy (LongMemEval)
|
|
280
290
|
|
|
281
|
-
|
|
291
|
+
All numbers from [`amem-core` v0.5.1](https://github.com/amanasmuei/amem-core) — the retrieval engine powering this MCP server. Zero API calls, all local, fully reproducible.
|
|
282
292
|
|
|
283
293
|
<table>
|
|
284
294
|
<tr>
|
|
285
295
|
<td>
|
|
286
296
|
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
|
290
|
-
|
|
291
|
-
| **
|
|
292
|
-
|
|
|
297
|
+
**LongMemEval-S (session-level) — headline metric**
|
|
298
|
+
|
|
299
|
+
| Metric | Score |
|
|
300
|
+
|:---:|:---:|
|
|
301
|
+
| **R@1** | **95.0%** |
|
|
302
|
+
| **R@3** | **97.0%** |
|
|
303
|
+
| **R@5** | **🏆 97.8%** |
|
|
304
|
+
| **R@10** | **99.0%** |
|
|
305
|
+
|
|
306
|
+
500 questions · CPU only · zero API calls
|
|
293
307
|
|
|
294
308
|
</td>
|
|
295
309
|
<td>
|
|
296
310
|
|
|
297
|
-
|
|
311
|
+
**LongMemEval Oracle (turn-level)**
|
|
298
312
|
|
|
299
|
-
|
|
313
|
+
| Metric | Score |
|
|
314
|
+
|:---:|:---:|
|
|
315
|
+
| **R@1** | **66.2%** |
|
|
316
|
+
| **R@3** | **90.8%** |
|
|
317
|
+
| **R@5** | **94.6%** |
|
|
318
|
+
| **R@10** | **97.5%** |
|
|
300
319
|
|
|
301
|
-
|
|
320
|
+
479 scoreable questions · 301s runtime · Node 22
|
|
302
321
|
|
|
303
322
|
</td>
|
|
304
323
|
</tr>
|
|
305
324
|
</table>
|
|
306
325
|
|
|
307
|
-
|
|
326
|
+
Pipeline: local `bge-small-en-v1.5` bi-encoder + `ms-marco-MiniLM-L-6-v2` cross-encoder (int8, batched, default-on). See [amem-core benchmarks](https://github.com/amanasmuei/amem-core#-benchmarks) for full per-type breakdowns, pipeline evolution, and honest notes.
|
|
327
|
+
|
|
328
|
+
> **Why this matters for the "rewrite it in Rust" question.** The 10.3ms rerank figure above reflects a ~30% speedup over the per-pair implementation it replaced — achieved with ~20 lines of batching plus int8 quantization, no native rewrite. The hot paths were already efficient; the remaining wins came from using them more carefully. We stay on TypeScript.
|
|
329
|
+
|
|
330
|
+
### Search Latency
|
|
308
331
|
|
|
309
332
|
<table>
|
|
310
333
|
<tr>
|
|
311
334
|
<td>
|
|
312
335
|
|
|
336
|
+
**Full recall pipeline (v0.5.1+)**
|
|
337
|
+
|
|
338
|
+
| Stage | p50 | Share |
|
|
339
|
+
|---|---|---|
|
|
340
|
+
| Embed (bi-encoder) | 3.0ms | 22% |
|
|
341
|
+
| Retrieve (HNSW + multi-strategy) | 0.1ms | 1% |
|
|
342
|
+
| **Rerank (int8 cross-encoder)** | **10.3ms** | **74%** |
|
|
343
|
+
| **Total** | **~14ms** | 100% |
|
|
344
|
+
|
|
345
|
+
</td>
|
|
346
|
+
<td>
|
|
347
|
+
|
|
348
|
+
**HNSW index only (vector search)**
|
|
349
|
+
|
|
313
350
|
| Memories | HNSW | Brute-force | Speedup |
|
|
314
351
|
|---|---|---|---|
|
|
315
352
|
| 100 | 0.05ms | 0.10ms | 2x |
|
|
@@ -330,7 +367,7 @@ Measured: 100 searches averaged, 384-dim embeddings, top-10 results.
|
|
|
330
367
|
|
|
331
368
|
---
|
|
332
369
|
|
|
333
|
-
## Tools Reference
|
|
370
|
+
## 🛠️ Tools Reference
|
|
334
371
|
|
|
335
372
|
### Core Memory (7 tools)
|
|
336
373
|
|
|
@@ -345,7 +382,7 @@ Measured: 100 searches averaged, 384-dim embeddings, top-10 results.
|
|
|
345
382
|
| `memory_inject` | Surface corrections + decisions + graph neighbors before coding starts. |
|
|
346
383
|
|
|
347
384
|
<details>
|
|
348
|
-
<summary><strong>Precision, History, Advanced, Reminders, and Maintenance tools (
|
|
385
|
+
<summary><strong>Precision, History, Advanced, Admin, Reminders, and Maintenance tools (26 more)</strong></summary>
|
|
349
386
|
|
|
350
387
|
### Precision & History (5 tools)
|
|
351
388
|
|
|
@@ -368,6 +405,15 @@ Measured: 100 searches averaged, 384-dim embeddings, top-10 results.
|
|
|
368
405
|
| `memory_history` | View past session summaries. |
|
|
369
406
|
| `memory_reflect` | Self-evolving reflection engine — clusters memories, detects contradictions, identifies synthesis candidates, surfaces knowledge gaps. |
|
|
370
407
|
|
|
408
|
+
### Admin & Sync (4 tools)
|
|
409
|
+
|
|
410
|
+
| Tool | Description |
|
|
411
|
+
|---|---|
|
|
412
|
+
| `memory_doctor` | Run read-only health diagnostics on the amem database. |
|
|
413
|
+
| `memory_repair` | Perform safe, targeted repairs on the amem database. |
|
|
414
|
+
| `memory_config` | Get or set amem configuration with safety guardrails. |
|
|
415
|
+
| `memory_sync` | Import or export memories between amem and other systems (Claude auto-memory, Copilot instructions). |
|
|
416
|
+
|
|
371
417
|
### Reminders (4 tools)
|
|
372
418
|
|
|
373
419
|
| Tool | Description |
|
|
@@ -393,7 +439,7 @@ Measured: 100 searches averaged, 384-dim embeddings, top-10 results.
|
|
|
393
439
|
|
|
394
440
|
---
|
|
395
441
|
|
|
396
|
-
## Usage Guide
|
|
442
|
+
## 📖 Usage Guide
|
|
397
443
|
|
|
398
444
|
### Storing Memories
|
|
399
445
|
|
|
@@ -523,22 +569,90 @@ memory_store({
|
|
|
523
569
|
|
|
524
570
|
---
|
|
525
571
|
|
|
526
|
-
##
|
|
572
|
+
## ⚔️ Honest Comparison: amem vs graphify
|
|
573
|
+
|
|
574
|
+
<details>
|
|
575
|
+
<summary><b>Click to expand — how amem compares to graphify</b></summary>
|
|
576
|
+
|
|
577
|
+
[graphify](https://github.com/safishamsi/graphify) is the most common "what about X?" when people find amem. They solve **fundamentally different problems** and are genuinely complementary.
|
|
578
|
+
|
|
579
|
+
### What each tool does
|
|
580
|
+
|
|
581
|
+
| | **amem** | **graphify** |
|
|
582
|
+
|---|---|---|
|
|
583
|
+
| **One-liner** | Persistent memory across AI sessions | Codebase → knowledge graph |
|
|
584
|
+
| **Core question** | *"What has my AI learned about me?"* | *"What does this codebase look like?"* |
|
|
585
|
+
| **Input** | Natural language (corrections, decisions, preferences) | Files (code, docs, PDFs, images, video) |
|
|
586
|
+
| **Output** | Recalled memories ranked by relevance | Structural graph + report + interactive HTML |
|
|
587
|
+
| **Persistence** | Always — memory survives across sessions and tools | Snapshot — `graph.json` persists, but doesn't learn over time |
|
|
588
|
+
| **When it runs** | Continuously, every session | On-demand (`/graphify .`) or on commit via git hook |
|
|
589
|
+
|
|
590
|
+
### Technical comparison
|
|
591
|
+
|
|
592
|
+
| | **amem** | **graphify** |
|
|
593
|
+
|---|---|---|
|
|
594
|
+
| **Runtime** | TypeScript / Node (≥18) | Python (≥3.10) |
|
|
595
|
+
| **Protocol** | MCP server (33 tools, 7 resources) | AI skill (slash command) + optional MCP server |
|
|
596
|
+
| **Storage** | SQLite + FTS5 + WAL | NetworkX graph → JSON file |
|
|
597
|
+
| **Search** | Semantic embeddings + FTS5 + graph + reranking | Graph traversal (BFS/DFS) + node lookup |
|
|
598
|
+
| **Embeddings** | Local `bge-small-en-v1.5` (384-dim) | None — uses graph topology, not vector similarity |
|
|
599
|
+
| **Code understanding** | None — stores what you tell it | Deep — tree-sitter AST for 25 languages |
|
|
600
|
+
| **Multimodal** | Text only | Code, docs, PDFs, images, video, audio |
|
|
601
|
+
| **LLM required** | No (all local) | Yes for docs/images (code is LLM-free via tree-sitter) |
|
|
602
|
+
| **Benchmark** | 97.8% R@5 on LongMemEval-S | 71.5x token reduction vs raw file reading |
|
|
603
|
+
| **AI tool support** | Claude Code, Copilot, Cursor, any MCP client | Claude Code, Codex, Copilot, Cursor, Gemini, Aider, Kiro, +10 more |
|
|
604
|
+
|
|
605
|
+
### Where each wins
|
|
606
|
+
|
|
607
|
+
**amem wins at:**
|
|
608
|
+
- Remembering your preferences, corrections, and decisions **across projects and tools**
|
|
609
|
+
- Semantic recall — finding the right memory from a vague query (97.8% R@5)
|
|
610
|
+
- Temporal intelligence — tracking what was true *when*, auto-expiring contradictions
|
|
611
|
+
- Self-evolution — reflection engine clusters, detects contradictions, identifies gaps
|
|
612
|
+
- Zero LLM dependency — everything runs locally, no API calls
|
|
613
|
+
|
|
614
|
+
**graphify wins at:**
|
|
615
|
+
- Understanding **code structure** — call graphs, imports, class hierarchies, cross-file relationships
|
|
616
|
+
- Multimodal ingestion — drop in code, papers, screenshots, videos, it graphs them all
|
|
617
|
+
- Token efficiency — 71.5x compression means your AI reads structure, not raw files
|
|
618
|
+
- Breadth of language support — 25 programming languages via tree-sitter AST
|
|
619
|
+
- Breadth of AI tool support — 15+ platforms with dedicated install commands
|
|
620
|
+
|
|
621
|
+
### Honest takeaways
|
|
622
|
+
|
|
623
|
+
1. **They don't compete.** amem remembers *your* knowledge (decisions, corrections, preferences). graphify maps *the codebase's* structure (call graphs, dependencies, architecture). Different data, different access patterns.
|
|
624
|
+
|
|
625
|
+
2. **Use both if you want.** Run `graphify .` to get a structural map of your project. Use amem to remember "we chose this architecture because X." The graph tells your AI *what exists*. The memory tells it *why things are that way*.
|
|
626
|
+
|
|
627
|
+
3. **graphify has broader platform coverage** (15+ AI tools). amem has deeper integration where it works (MCP protocol with 33 tools, structured resources, prompts).
|
|
628
|
+
|
|
629
|
+
4. **graphify needs an LLM for non-code files.** amem is fully local — no API calls, no model inference beyond the local embedding model.
|
|
630
|
+
|
|
631
|
+
5. **The real choice depends on your pain point.** If your AI keeps forgetting your preferences and decisions → amem. If your AI can't navigate your codebase efficiently → graphify. If both → use both.
|
|
632
|
+
|
|
633
|
+
</details>
|
|
634
|
+
|
|
635
|
+
---
|
|
636
|
+
|
|
637
|
+
## 🌐 Platform Compatibility
|
|
527
638
|
|
|
528
639
|
| Feature | Claude Code | GitHub Copilot CLI | Cursor / Windsurf / Other |
|
|
529
640
|
|---|:---:|:---:|:---:|
|
|
530
641
|
| One-command plugin install | Yes | Yes | -- |
|
|
531
|
-
|
|
|
642
|
+
| 33 MCP tools | Yes | Yes | Yes |
|
|
532
643
|
| AI skills | 14 | 7 | -- |
|
|
533
644
|
| Auto-capture hooks | Yes | Yes | -- |
|
|
534
645
|
| Session auto-summarize | Yes | Yes | -- |
|
|
535
646
|
| Auto-memory sync | Yes | -- | -- |
|
|
536
647
|
| CLI setup (`amem-cli init`) | Yes | Yes | Yes |
|
|
537
648
|
|
|
538
|
-
**Claude Code** has the deepest integration (plugin + hooks + auto-memory sync). **Copilot CLI** is a close second. **Other MCP clients** get the full
|
|
649
|
+
**Claude Code** has the deepest integration (plugin + hooks + auto-memory sync). **Copilot CLI** is a close second. **Other MCP clients** get the full 33-tool server via manual config.
|
|
539
650
|
|
|
540
651
|
### AI Skills
|
|
541
652
|
|
|
653
|
+
<details>
|
|
654
|
+
<summary><b>Available skills by platform</b></summary>
|
|
655
|
+
|
|
542
656
|
| What you say | Skill | Claude Code | Copilot CLI |
|
|
543
657
|
|---|---|:---:|:---:|
|
|
544
658
|
| *"Remember never use any type"* | `remember` | Yes | Yes |
|
|
@@ -552,9 +666,11 @@ memory_store({
|
|
|
552
666
|
| *"Open the memory dashboard"* | `dashboard` | Yes | -- |
|
|
553
667
|
| *"Install hooks"* | `hooks` | Yes | -- |
|
|
554
668
|
|
|
669
|
+
</details>
|
|
670
|
+
|
|
555
671
|
---
|
|
556
672
|
|
|
557
|
-
## Working with Claude Code Auto-Memory
|
|
673
|
+
## 🔄 Working with Claude Code Auto-Memory
|
|
558
674
|
|
|
559
675
|
amem complements Claude's built-in auto-memory — it doesn't replace it.
|
|
560
676
|
|
|
@@ -615,18 +731,24 @@ Claude Code → amem sync → amem DB → amem sync --to copilot → copilot-ins
|
|
|
615
731
|
|
|
616
732
|
---
|
|
617
733
|
|
|
618
|
-
## Dashboard
|
|
734
|
+
## 📊 Dashboard & Knowledge Graph
|
|
619
735
|
|
|
620
736
|
```bash
|
|
621
737
|
amem-cli dashboard # Opens at localhost:3333
|
|
622
738
|
amem-cli dashboard --port=8080 # Custom port
|
|
623
739
|
```
|
|
624
740
|
|
|
625
|
-
|
|
741
|
+
Full-featured web dashboard with:
|
|
742
|
+
|
|
743
|
+
- 🔍 **Memory browser** — search, filter by type/tier/source, inline actions (promote, demote, expire)
|
|
744
|
+
- 🕸️ **Interactive knowledge graph** — zoom, pan, click-to-focus with neighborhood highlighting, detail panel, search, directional edges
|
|
745
|
+
- 📈 **Analytics** — confidence distribution, type breakdown, session timeline
|
|
746
|
+
- ⏰ **Reminders** — view and manage cross-session tasks
|
|
747
|
+
- 📋 **Copilot Preview** — see what would be exported to `copilot-instructions.md`
|
|
626
748
|
|
|
627
749
|
---
|
|
628
750
|
|
|
629
|
-
## CLI Reference
|
|
751
|
+
## 💻 CLI Reference
|
|
630
752
|
|
|
631
753
|
```bash
|
|
632
754
|
# Setup
|
|
@@ -654,7 +776,7 @@ amem-cli reset --confirm # Wipe all data
|
|
|
654
776
|
|
|
655
777
|
---
|
|
656
778
|
|
|
657
|
-
## Architecture
|
|
779
|
+
## 🏗 Architecture
|
|
658
780
|
|
|
659
781
|
```
|
|
660
782
|
Your AI Tool
|
|
@@ -665,7 +787,7 @@ amem-cli reset --confirm # Wipe all data
|
|
|
665
787
|
┌─────────────────────────────────┐
|
|
666
788
|
│ @aman_asmuei/amem │ ← this package
|
|
667
789
|
│ │
|
|
668
|
-
│
|
|
790
|
+
│ 33 Tools · 7 Resources · 2 Prompts
|
|
669
791
|
│ Slash commands · CLI · Hooks │
|
|
670
792
|
│ Config: ~/.amem/config.json │
|
|
671
793
|
└────────────────┬────────────────┘
|
|
@@ -677,14 +799,15 @@ amem-cli reset --confirm # Wipe all data
|
|
|
677
799
|
│ Multi-Strategy Retrieval │
|
|
678
800
|
│ [HNSW] + [FTS5] + [Graph] + [Temporal]
|
|
679
801
|
│ + query expansion │
|
|
680
|
-
│ + cross-encoder
|
|
802
|
+
│ + cross-encoder reranker │
|
|
681
803
|
│ │
|
|
682
804
|
│ Self-Evolving Reflection │
|
|
683
805
|
│ [Clustering] + [Contradictions]│
|
|
684
806
|
│ + [Synthesis] + [Gap Detection]│
|
|
685
807
|
│ │
|
|
686
808
|
│ Embeddings: bge-small-en-v1.5 │
|
|
687
|
-
│
|
|
809
|
+
│ Reranker: ms-marco-MiniLM int8 │
|
|
810
|
+
│ 97.8% R@5 on LongMemEval-S │
|
|
688
811
|
└────────────────┬────────────────┘
|
|
689
812
|
│
|
|
690
813
|
▼
|
|
@@ -722,7 +845,7 @@ Additive scoring ensures no single low factor kills the ranking.
|
|
|
722
845
|
|
|
723
846
|
---
|
|
724
847
|
|
|
725
|
-
## Configuration
|
|
848
|
+
## ⚙️ Configuration
|
|
726
849
|
|
|
727
850
|
<details>
|
|
728
851
|
<summary><strong>Environment variables</strong></summary>
|
|
@@ -747,7 +870,7 @@ Created automatically with defaults:
|
|
|
747
870
|
"ftsWeight": 0.3,
|
|
748
871
|
"graphWeight": 0.15,
|
|
749
872
|
"temporalWeight": 0.15,
|
|
750
|
-
"rerankerEnabled":
|
|
873
|
+
"rerankerEnabled": true
|
|
751
874
|
},
|
|
752
875
|
"privacy": {
|
|
753
876
|
"enablePrivateTags": true,
|
|
@@ -768,7 +891,10 @@ Created automatically with defaults:
|
|
|
768
891
|
</details>
|
|
769
892
|
|
|
770
893
|
<details>
|
|
771
|
-
<summary><strong
|
|
894
|
+
<summary><strong>📋 Version history</strong></summary>
|
|
895
|
+
|
|
896
|
+
### v0.23.0 — Interactive Knowledge Graph Dashboard
|
|
897
|
+
Full-width graph explorer with zoom/pan, click-to-focus neighborhood highlighting, detail panel with relation navigation, search & filter, directional edges, force-directed layout. Admin tools (doctor, repair, config, sync). 255 tests across 18 suites.
|
|
772
898
|
|
|
773
899
|
### v0.19.0 — Self-Evolving Memory Loop
|
|
774
900
|
Reflection engine with HNSW-based clustering, 3-layer contradiction detection (negation + numerical + low-overlap), synthesis candidates with lineage tracking, knowledge gap detection, utility scoring, auto-trigger nudge in `memory_inject`. New DB tables: `synthesis_lineage`, `knowledge_gaps`, `reflection_meta`. Migration v5.
|
|
@@ -792,7 +918,7 @@ Core store/recall, local embeddings, SQLite + WAL, consolidation, project scopin
|
|
|
792
918
|
|
|
793
919
|
---
|
|
794
920
|
|
|
795
|
-
## Tech Stack
|
|
921
|
+
## 🧰 Tech Stack
|
|
796
922
|
|
|
797
923
|
| Layer | Technology |
|
|
798
924
|
|---|---|
|
|
@@ -800,36 +926,38 @@ Core store/recall, local embeddings, SQLite + WAL, consolidation, project scopin
|
|
|
800
926
|
| Language | TypeScript 5.6+, strict mode |
|
|
801
927
|
| Database | SQLite + WAL + FTS5 |
|
|
802
928
|
| Embeddings | HuggingFace bge-small-en-v1.5 (local, 80MB) + HNSW vector index |
|
|
803
|
-
| Reranking | ms-marco-MiniLM-L-6-v2 (
|
|
929
|
+
| Reranking | ms-marco-MiniLM-L-6-v2 (default-on, int8, batched, local) |
|
|
804
930
|
| Validation | Zod 3.25+ with `.strict()` schemas |
|
|
805
|
-
| Testing | Vitest —
|
|
931
|
+
| Testing | Vitest — 281 tests across 19 suites + recall benchmarks |
|
|
806
932
|
| CI/CD | GitHub Actions, npm publish on release |
|
|
807
933
|
|
|
808
934
|
---
|
|
809
935
|
|
|
810
|
-
## Contributing
|
|
936
|
+
## 🤝 Contributing
|
|
811
937
|
|
|
812
938
|
```bash
|
|
813
939
|
git clone https://github.com/amanasmuei/amem.git
|
|
814
940
|
cd amem && npm install
|
|
815
941
|
npm run build # zero TS errors
|
|
816
|
-
npm test #
|
|
942
|
+
npm test # 281 tests pass
|
|
817
943
|
```
|
|
818
944
|
|
|
819
945
|
PRs must pass CI before merge. See [Issues](https://github.com/amanasmuei/amem/issues) for open tasks.
|
|
820
946
|
|
|
947
|
+
<br/>
|
|
948
|
+
|
|
821
949
|
---
|
|
822
950
|
|
|
823
951
|
<p align="center">
|
|
824
|
-
Built with ❤️ in 🇲🇾 Malaysia by <a href="https://github.com/amanasmuei"><strong>Aman Asmuei</strong></a>
|
|
952
|
+
<sub>Built with ❤️ in 🇲🇾 Malaysia by <a href="https://github.com/amanasmuei"><strong>Aman Asmuei</strong></a></sub>
|
|
825
953
|
</p>
|
|
826
954
|
|
|
827
955
|
<p align="center">
|
|
828
|
-
<a href="https://github.com/amanasmuei/amem"
|
|
829
|
-
<a href="https://www.npmjs.com/package/@aman_asmuei/amem"
|
|
830
|
-
<a href="https://github.com/amanasmuei/amem/issues"
|
|
956
|
+
<a href="https://github.com/amanasmuei/amem"><img src="https://img.shields.io/badge/GitHub-repo-181717?style=flat-square&logo=github" alt="GitHub" /></a>
|
|
957
|
+
<a href="https://www.npmjs.com/package/@aman_asmuei/amem"><img src="https://img.shields.io/badge/npm-package-cb3837?style=flat-square&logo=npm&logoColor=white" alt="npm" /></a>
|
|
958
|
+
<a href="https://github.com/amanasmuei/amem/issues"><img src="https://img.shields.io/badge/Issues-report-orange?style=flat-square&logo=github" alt="Issues" /></a>
|
|
831
959
|
</p>
|
|
832
960
|
|
|
833
961
|
<p align="center">
|
|
834
|
-
<sub>MIT License</sub>
|
|
962
|
+
<sub>MIT License · Star ⭐ if amem saves your AI from amnesia</sub>
|
|
835
963
|
</p>
|
package/dist/cli.js
CHANGED
|
@@ -667,11 +667,11 @@ function handleReset(db, args) {
|
|
|
667
667
|
try {
|
|
668
668
|
fs.unlinkSync(DB_PATH + "-wal");
|
|
669
669
|
}
|
|
670
|
-
catch { }
|
|
670
|
+
catch { /* WAL file may not exist */ }
|
|
671
671
|
try {
|
|
672
672
|
fs.unlinkSync(DB_PATH + "-shm");
|
|
673
673
|
}
|
|
674
|
-
catch { }
|
|
674
|
+
catch { /* SHM file may not exist */ }
|
|
675
675
|
console.log("All amem data has been wiped. Starting fresh.");
|
|
676
676
|
console.log(`Deleted: ${DB_PATH}`);
|
|
677
677
|
}
|