remem-mcp 0.6.8 → 0.7.3

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
@@ -7,9 +7,9 @@
7
7
 
8
8
  > Your coding agent stops repeating the same mistakes.
9
9
 
10
- Local memory that survives context compaction learns from every error, injects fixes before the next attempt, and syncs to your git repo so your whole team shares it.
10
+ Local-first memory that survives context compaction. Learns from every error, injects fixes before the next attempt, and syncs to your git repo so your whole team shares it.
11
11
 
12
- **One command setup. No API key. No cloud. No database server. Just a SQLite file.**
12
+ **No API key. No cloud. No database server. Just a SQLite file.**
13
13
 
14
14
  ---
15
15
 
@@ -21,74 +21,69 @@ npx remem-mcp setup
21
21
 
22
22
  Auto-detects Claude Code, Cursor, Devin, Codex. Registers MCP server + hooks. Restart your agent.
23
23
 
24
+ That's it. Use your agent normally — memory works automatically.
25
+
24
26
  ```bash
25
- npx remem-mcp demo # Live demo: real build, real errors, real hooks
26
- npx remem-mcp demo-codegraph # Live CodeGraph demo on facebook/react
27
- npx remem-mcp status # One dashboard: everything at a glance
27
+ npx remem-mcp status # verify: hooks ✓, DB ✓, CodeGraph
28
28
  ```
29
29
 
30
30
  ---
31
31
 
32
- ## Quick start (after install)
32
+ ## What happens automatically
33
33
 
34
- **Nothing.** Just use your agent normally. No commands, no setup, no init.
34
+ | When | What |
35
+ |---|---|
36
+ | Session start | Past errors, decisions, and persona injected into agent context |
37
+ | Each prompt | Matching memory injected (you'll see `[remem-mcp]` at the top) |
38
+ | Tool calls | Verbose output offloaded to refs, Mermaid canvas injected (92% token cut) |
39
+ | Session end | Worker auto-extracts facts, consolidates summaries, updates persona |
35
40
 
36
- Memory works automatically:
37
- - **Session start** → past errors, decisions, and persona injected into agent context
38
- - **Each prompt** → matching memory injected (you'll see `[remem-mcp]` at the top)
39
- - **Session end** → worker auto-extracts facts, consolidates summaries, updates persona
40
-
41
- ```bash
42
- npx remem-mcp status # verify: hooks ✓, DB ✓, CodeGraph ✓
43
- ```
41
+ You don't run any commands. The agent calls `recall()` before answering and `capture()` after work — the skill tells it to.
44
42
 
45
43
  ---
46
44
 
47
- ## What it does
45
+ ## How it works
48
46
 
49
47
  ```
50
- ┌─────────────────────────────────────────────────┐
51
- AI Agent │
52
- │ (Claude Code / Devin / Cursor) │
53
- └────────┬──────────────────────────┬──────────────┘
54
- MCP tools (15) │ Hooks (auto)
55
- ▼ ▼
56
- ┌──────────────────┐ ┌────────────────────┐
57
- │ recall() │ │ SessionStart │──▶ inject L2/L3 + skills
58
- │ capture() │ │ UserPromptSubmit │──▶ inject BM25 match
59
- │ codegraph_* │ │ Stop │──▶ spawn worker
60
- wiki_* │ │ PostCompact │──▶ save checkpoint
61
- └────────┬─────────┘ └─────────┬──────────┘
62
- │ │
63
- ▼ ▼
64
- ┌─────────────────────────────────────────────────┐
65
- │ SQLite (memory.db) │
66
- │ │
67
- │ L0 captures ──▶ L1 atoms ──▶ L2 scenarios ──▶ L3 persona
68
- │ (raw) (facts) (summaries) (preferences)
69
- │ │
70
- │ CodeGraph: symbols + calls + imports │
71
- │ Wiki: markdown docs + ADRs │
72
- └───────────────────────────────────────────────────┘
48
+ AI Agent (Claude Code / Devin / Cursor / Codex)
49
+
50
+ ├── MCP tools ──▶ recall, capture, codegraph_*, wiki_*, feedback
51
+
52
+ └── Hooks ──▶ SessionStart, UserPromptSubmit, PreToolUse,
53
+ PostToolUse, Stop, PostCompact
54
+
55
+
56
+ SQLite (memory.db)
57
+
58
+ L0 captures → L1 atoms → L2 scenarios → L3 persona
59
+ (raw) (facts) (summaries) (preferences)
60
+
61
+ CodeGraph: symbols + calls + imports (tree-sitter, 9 languages)
62
+ Memory links: Hebbian co-retrieval (frequently co-retrieved = stronger)
73
63
  ```
74
64
 
75
- ### Memory pipeline (L0 L3)
65
+ **No LLM API key needed** — rule-based extraction + keyword grouping.
66
+
67
+ ---
76
68
 
77
- - **L0 captures** — raw content from agent sessions (errors, decisions, patterns)
78
- - **L1 atoms** — distilled facts with confidence scores (agent writes or worker extracts)
79
- - **L2 scenarios** — auto-consolidated summaries when 5+ atoms share a topic
80
- - **L3 persona** — user preferences auto-detected from repeated tags (2+ occurrences)
69
+ ## CodeGraph
81
70
 
82
- All runs **without LLM API key** rule-based extraction + keyword grouping.
71
+ Structural code indexing via tree-sitter. The agent uses `codegraph_search` instead of grep to find symbols.
83
72
 
84
- ### CodeGraph
73
+ ```bash
74
+ npx remem-mcp index --path src # index a directory
75
+ npx remem-mcp search-code --query "parseTar" # find symbols
76
+ npx remem-mcp callers <id> # who calls this?
77
+ npx remem-mcp impact <id> # blast radius
78
+ ```
85
79
 
86
- Structural code indexing via tree-sitter (9 languages: TS/JS/Python/Go/Rust/Java/C/C++/C#).
80
+ 9 languages: TS/JS/Python/Go/Rust/Java/C/C++/C#. 6-strategy call resolution (import-map → same-module → unique-name → suffix → fuzzy). Stdlib calls filtered out.
87
81
 
88
- - **6-strategy call resolution**: import-map (0.95) same-module (0.90) unique-name (0.75) → suffix (0.55) → fuzzy (0.35)
89
- - **Call types**: direct (`foo()`), method (`obj.method()`), JSX (`<Component/>`)
90
- - **Stdlib filter**: skips `fmt.Printf`, `console.log`, `print()` reduces noise
91
- - **Tools**: `codegraph_search`, `codegraph_callers`, `codegraph_callees`, `codegraph_impact`, `codegraph_detect_changes`
82
+ | Repo | Files | Symbols | Calls | Time |
83
+ |---|---|---|---|---|
84
+ | remem-mcp | 79 | 301 | 6,456 | 3s |
85
+ | AZR Go | 455 | 3,417 | 41,603 | 111s |
86
+ | Orca TS | 3,000 | 7,632 | 78,981 | 705s |
92
87
 
93
88
  ---
94
89
 
@@ -96,12 +91,14 @@ Structural code indexing via tree-sitter (9 languages: TS/JS/Python/Go/Rust/Java
96
91
 
97
92
  | | remem-mcp | Mem0 | Claude MEMORY.md | Mneme |
98
93
  |---|---|---|---|---|
99
- | **Survives compaction** | Yes — PreCompact hook | Yes — cloud | No — 200-line cap | Yes — PreCompact hook |
100
- | **Learns from errors** | Yes — auto-capture + inject | No | No | No |
101
- | **Semantic search** | Hybrid BM25 + sqlite-vec | Vector only | No | Vector + graph |
94
+ | **Survives compaction** | Yes | Yes — cloud | No — 200-line cap | Yes |
95
+ | **Learns from errors** | Yes — auto | No | No | No |
96
+ | **Search** | Hybrid BM25 + vector + entities | Vector only | No | Vector + graph |
97
+ | **Memory links** | Hebbian co-retrieval | No | No | Graph |
98
+ | **Decay/forget** | Yes | No | No | No |
102
99
  | **CodeGraph** | Yes — 6-strategy call resolution | No | No | No |
100
+ | **Token offload** | Yes — Mermaid canvas | No | No | No |
103
101
  | **Setup** | 1 command | API key + cloud | Built-in | Build from source |
104
- | **API key** | No | Yes | No | No |
105
102
  | **Cost** | Free | $19–249/mo | Free | Free |
106
103
 
107
104
  ---
@@ -155,17 +152,14 @@ Then run `npx remem-mcp install-hooks`.
155
152
 
156
153
  ---
157
154
 
158
- ## Daily commands
155
+ ## Useful commands
159
156
 
160
157
  ```bash
161
- npx remem-mcp status # Everything at a glance
162
- npx remem-mcp viewer # Web UI at localhost:7331
163
- npx remem-mcp errors # Error dashboard
164
- npx remem-mcp recent [N] # Recent captures
165
- npx remem-mcp search-code --query "parseTar" # CodeGraph search
166
- npx remem-mcp callers <id> # Who calls this symbol?
167
- npx remem-mcp impact <id> # Blast radius analysis
168
- npx remem-mcp help all # Full list of 40+ subcommands
158
+ npx remem-mcp status # health + hooks + DB + CodeGraph
159
+ npx remem-mcp viewer # web UI at localhost:7331
160
+ npx remem-mcp errors # error dashboard
161
+ npx remem-mcp recent [N] # recent captures
162
+ npx remem-mcp help all # full list of 40+ subcommands
169
163
  ```
170
164
 
171
165
  ---
@@ -178,11 +172,17 @@ All settings have defaults. Config file is optional: `~/.config/remem-mcp/config
178
172
  |---|---|---|
179
173
  | DB path | `REMEM_DB_PATH` | `~/.local/share/remem-mcp/memory.db` |
180
174
  | Cross-project memory | `REMEM_GLOBAL_SESSION_KEY` | _(unset)_ |
175
+ | Unified flow (F1+F2+F3) | `REMEM_FLOW` | _(unset, set to `full`)_ |
181
176
  | Suppress hook feedback | `REMEM_QUIET` | _(unset, set to `1`)_ |
182
- | LLM API key (optional) | `REMEM_LLM_API_KEY` | _(unset)_ |
183
177
 
184
178
  **Team sharing** — `npx remem-mcp sync-export` writes `.remem-mcp/memory-export.jsonl`. Commit it to git. Team members get the same memory on `git pull`.
185
179
 
180
+ **Per-repo capture exclusions** — Drop a `.remem.toml` in any project root:
181
+ ```toml
182
+ [capture]
183
+ ignore_paths = ["node_modules", "dist", ".git", "*.min.js"]
184
+ ```
185
+
186
186
  ---
187
187
 
188
188
  ## Benchmark
@@ -195,7 +195,6 @@ All settings have defaults. Config file is optional: `~/.config/remem-mcp/config
195
195
  | **LongMemEval** (ICLR 2025) | **96** | 94.4 | — |
196
196
 
197
197
  ```bash
198
- bash scripts/bench-all.sh # Full: AMB + LoCoMo + PersonaMem (~5 min)
199
198
  bash scripts/bench-all.sh --quick # AMB only (~2 min)
200
199
  ```
201
200
 
@@ -203,11 +202,11 @@ bash scripts/bench-all.sh --quick # AMB only (~2 min)
203
202
 
204
203
  ## Architecture
205
204
 
206
- See [ARCHITECTURE.md](./ARCHITECTURE.md) for full system diagrams, schema, and performance benchmarks.
205
+ See [ARCHITECTURE.md](./ARCHITECTURE.md) for full system diagrams, schema, and performance details.
207
206
 
208
207
  ## Credits
209
208
 
210
- Core based on [TencentDB Agent Memory](https://github.com/TencentCloud/TencentDB-Agent-Memory) (MIT, Tencent 2026). CodeGraph call resolution adapted from Codebase-Memory (arXiv:2603.27277).
209
+ Core based on [TencentDB Agent Memory](https://github.com/TencentCloud/TencentDB-Agent-Memory) (MIT, Tencent 2026). CodeGraph call resolution adapted from Codebase-Memory (arXiv:2603.27277). Recall boost adapted from [ai-memory](https://github.com/akitaonrails/ai-memory) by Akita On Rails. Contextual retrieval from [Anthropic](https://www.anthropic.com/news/contextual-retrieval) (2024).
211
210
 
212
211
  ## License
213
212