superlocalmemory 2.5.1 → 2.6.5

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.
Files changed (43) hide show
  1. package/CHANGELOG.md +122 -1806
  2. package/README.md +149 -402
  3. package/api_server.py +47 -0
  4. package/docs/ACCESSIBILITY.md +291 -0
  5. package/docs/FRAMEWORK-INTEGRATIONS.md +300 -0
  6. package/docs/architecture-diagram.drawio +4 -4
  7. package/docs/plans/2026-02-13-benchmark-suite.md +1349 -0
  8. package/mcp_server.py +72 -17
  9. package/package.json +3 -3
  10. package/src/agent_registry.py +34 -1
  11. package/src/auth_middleware.py +63 -0
  12. package/src/cache_manager.py +1 -1
  13. package/src/db_connection_manager.py +16 -2
  14. package/src/event_bus.py +15 -0
  15. package/src/graph_engine.py +113 -44
  16. package/src/hybrid_search.py +2 -2
  17. package/src/learning/__init__.py +201 -0
  18. package/src/learning/adaptive_ranker.py +826 -0
  19. package/src/learning/cross_project_aggregator.py +866 -0
  20. package/src/learning/engagement_tracker.py +638 -0
  21. package/src/learning/feature_extractor.py +461 -0
  22. package/src/learning/feedback_collector.py +690 -0
  23. package/src/learning/learning_db.py +842 -0
  24. package/src/learning/project_context_manager.py +582 -0
  25. package/src/learning/source_quality_scorer.py +685 -0
  26. package/src/learning/workflow_pattern_miner.py +665 -0
  27. package/src/memory-reset.py +17 -3
  28. package/src/memory_store_v2.py +80 -7
  29. package/src/rate_limiter.py +87 -0
  30. package/src/trust_scorer.py +38 -6
  31. package/src/webhook_dispatcher.py +17 -0
  32. package/ui/index.html +346 -13
  33. package/ui/js/clusters.js +90 -1
  34. package/ui/js/graph-core.js +445 -0
  35. package/ui/js/graph-cytoscape-monolithic-backup.js +1168 -0
  36. package/ui/js/graph-cytoscape.js +1168 -0
  37. package/ui/js/graph-d3-backup.js +32 -0
  38. package/ui/js/graph-filters.js +220 -0
  39. package/ui/js/graph-interactions.js +354 -0
  40. package/ui/js/graph-ui.js +214 -0
  41. package/ui/js/memories.js +52 -0
  42. package/ui/js/modal.js +104 -1
  43. package/ui_server.py +55 -1
package/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
  <p align="center">
2
- <img src="https://varun369.github.io/SuperLocalMemoryV2/assets/branding/icon-512.png" alt="SuperLocalMemory V2" width="200"/>
2
+ <img src="https://superlocalmemory.com/assets/branding/icon-512.png" alt="SuperLocalMemory V2" width="200"/>
3
3
  </p>
4
4
 
5
5
  <h1 align="center">SuperLocalMemory V2</h1>
@@ -14,6 +14,10 @@
14
14
  <strong>Stop re-explaining your codebase every session. 100% local. Zero setup. Completely free.</strong>
15
15
  </p>
16
16
 
17
+ <p align="center">
18
+ <a href="https://superlocalmemory.com"><img src="https://img.shields.io/badge/🌐_Website-superlocalmemory.com-ff6b35?style=for-the-badge" alt="Official Website"/></a>
19
+ </p>
20
+
17
21
  <p align="center">
18
22
  <a href="https://www.python.org/downloads/"><img src="https://img.shields.io/badge/python-3.8+-3776AB?style=flat-square&logo=python&logoColor=white" alt="Python 3.8+"/></a>
19
23
  <a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-green?style=flat-square" alt="MIT License"/></a>
@@ -24,10 +28,10 @@
24
28
  </p>
25
29
 
26
30
  <p align="center">
31
+ <a href="https://superlocalmemory.com"><strong>superlocalmemory.com</strong></a> •
27
32
  <a href="#-quick-start">Quick Start</a> •
28
- <a href="#-why-superlocalemory">Why This?</a> •
33
+ <a href="#-why-superlocalmemory">Why This?</a> •
29
34
  <a href="#-features">Features</a> •
30
- <a href="#-vs-alternatives">vs Alternatives</a> •
31
35
  <a href="#-documentation">Docs</a> •
32
36
  <a href="https://github.com/varun369/SuperLocalMemoryV2/issues">Issues</a>
33
37
  </p>
@@ -40,75 +44,37 @@
40
44
 
41
45
  ---
42
46
 
43
- ## NEW: v2.5 — "Your AI Memory Has a Heartbeat"
47
+ ## What's New in v2.6.5
44
48
 
45
- > **SuperLocalMemory is no longer passive storage it's a real-time coordination layer.**
49
+ **Interactive Knowledge Graph** Your memories, visually connected. Powered by [Cytoscape.js](https://js.cytoscape.org/) (the same library behind Obsidian's graph plugins):
46
50
 
47
- | What's New | Why It Matters |
48
- |------------|----------------|
49
- | **Real-Time Event Stream** | See every memory operation live in the dashboard — no refresh needed. SSE-powered, cross-process. |
50
- | **No More "Database Locked"** | WAL mode + serialized write queue. 50 concurrent agents writing? Zero errors. |
51
- | **Agent Tracking** | Know exactly which AI tool wrote what. Claude, Cursor, Windsurf, CLI — all tracked automatically. |
52
- | **Trust Scoring** | Bayesian trust signals detect spam, quick-deletes, and cross-agent validation. Silent in v2.5, enforced in v2.6. |
53
- | **Memory Provenance** | Every memory records who created it, via which protocol, with full derivation lineage. |
54
- | **Production-Grade Code** | 28 API endpoints across 8 modular route files. 13 modular JS files. 63 pytest tests. |
51
+ - 🔍 **Zoom, pan, explore** Mouse wheel to zoom, drag to pan, smooth navigation
52
+ - 👆 **Click nodes** — Opens memory preview with "View Full Memory", "Expand Neighbors", "Filter to Cluster"
53
+ - 🎨 **6 layout algorithms** Force-directed (physics-based), circular, grid, hierarchical, concentric, breadthfirst
54
+ - 🔗 **Smart filtering** Click cluster cards or entity badges graph instantly updates
55
+ - **Performance** 3-tier rendering strategy handles 10,000+ nodes smoothly
55
56
 
56
- **Upgrade:** `npm install -g superlocalmemory@latest`
57
+ Launch the dashboard: `python3 ~/.claude-memory/ui_server.py` `http://localhost:8765/graph.html`
57
58
 
58
- **Dashboard:** `python3 ~/.claude-memory/ui_server.py` then open `http://localhost:8765`
59
-
60
- [Interactive Architecture Diagram](https://varun369.github.io/SuperLocalMemoryV2/architecture.html) | [Architecture Doc](docs/ARCHITECTURE-V2.5.md) | [Full Changelog](CHANGELOG.md)
59
+ **[[Complete Interactive Graph Guide →|Using-Interactive-Graph]]**
61
60
 
62
61
  ---
63
62
 
64
- ## NEW: Framework Integrations (v2.5.1)
65
-
66
- Use SuperLocalMemory as a memory backend in your LangChain and LlamaIndex applications — 100% local, zero cloud.
67
-
68
- ### LangChain
63
+ ## What's New in v2.6
69
64
 
70
- ```bash
71
- pip install langchain-superlocalmemory
72
- ```
65
+ SuperLocalMemory is now **production-hardened** with security, performance, and scale improvements:
73
66
 
74
- ```python
75
- from langchain_superlocalmemory import SuperLocalMemoryChatMessageHistory
76
- from langchain_core.runnables.history import RunnableWithMessageHistory
77
-
78
- history = SuperLocalMemoryChatMessageHistory(session_id="my-session")
79
- # Messages persist across sessions, stored locally in ~/.claude-memory/memory.db
80
- ```
67
+ - **Trust Enforcement** — Bayesian scoring actively protects your memory. Agents with trust below 0.3 are blocked from write/delete operations.
68
+ - **Profile Isolation** — Memory profiles fully sandboxed. Zero cross-profile data leakage.
69
+ - **Rate Limiting** — Protects against memory flooding from misbehaving agents.
70
+ - **HNSW-Accelerated Graphs** — Knowledge graph edge building uses HNSW index for faster construction at scale.
71
+ - **Hybrid Search Engine** — Combined semantic + FTS5 + graph retrieval for maximum accuracy.
81
72
 
82
- ### LlamaIndex
83
-
84
- ```bash
85
- pip install llama-index-storage-chat-store-superlocalmemory
86
- ```
73
+ **v2.5 highlights (included):** Real-time event stream, WAL-mode concurrent writes, agent tracking, memory provenance, 28 API endpoints.
87
74
 
88
- ```python
89
- from llama_index.storage.chat_store.superlocalmemory import SuperLocalMemoryChatStore
90
- from llama_index.core.memory import ChatMemoryBuffer
91
-
92
- chat_store = SuperLocalMemoryChatStore()
93
- memory = ChatMemoryBuffer.from_defaults(chat_store=chat_store, chat_store_key="user-1")
94
- ```
95
-
96
- [LangChain Guide](https://github.com/varun369/SuperLocalMemoryV2/wiki/LangChain-Integration) | [LlamaIndex Guide](https://github.com/varun369/SuperLocalMemoryV2/wiki/LlamaIndex-Integration)
97
-
98
- ---
99
-
100
- ## Install in One Command
101
-
102
- ```bash
103
- npm install -g superlocalmemory
104
- ```
105
-
106
- Or clone manually:
107
- ```bash
108
- git clone https://github.com/varun369/SuperLocalMemoryV2.git && cd SuperLocalMemoryV2 && ./install.sh
109
- ```
75
+ **Upgrade:** `npm install -g superlocalmemory@latest`
110
76
 
111
- Both methods auto-detect and configure **16+ IDEs and AI tools** — Cursor, VS Code/Copilot, Codex, Claude, Windsurf, Gemini CLI, JetBrains, and more.
77
+ [Interactive Architecture Diagram](https://superlocalmemory.com/architecture.html) | [Architecture Doc](docs/ARCHITECTURE-V2.5.md) | [Full Changelog](CHANGELOG.md)
112
78
 
113
79
  ---
114
80
 
@@ -128,6 +94,8 @@ You: *sighs and explains everything again*
128
94
  - Previous decisions
129
95
  - Debugging history
130
96
 
97
+ ---
98
+
131
99
  ## The Solution
132
100
 
133
101
  ```bash
@@ -148,26 +116,21 @@ superlocalmemoryv2:recall "auth bug"
148
116
 
149
117
  ## 🚀 Quick Start
150
118
 
151
- ### npm (Recommended — All Platforms)
119
+ ### Install (One Command)
120
+
152
121
  ```bash
153
122
  npm install -g superlocalmemory
154
123
  ```
155
124
 
156
- ### Mac/Linux (Manual)
125
+ Or clone manually:
157
126
  ```bash
158
- git clone https://github.com/varun369/SuperLocalMemoryV2.git
159
- cd SuperLocalMemoryV2
160
- ./install.sh
127
+ git clone https://github.com/varun369/SuperLocalMemoryV2.git && cd SuperLocalMemoryV2 && ./install.sh
161
128
  ```
162
129
 
163
- ### Windows (PowerShell)
164
- ```powershell
165
- git clone https://github.com/varun369/SuperLocalMemoryV2.git
166
- cd SuperLocalMemoryV2
167
- .\install.ps1
168
- ```
130
+ Both methods auto-detect and configure **17+ IDEs and AI tools** — Cursor, VS Code/Copilot, Codex, Claude, Windsurf, Gemini CLI, JetBrains, and more.
169
131
 
170
132
  ### Verify Installation
133
+
171
134
  ```bash
172
135
  superlocalmemoryv2:status
173
136
  # ✓ Database: OK (0 memories)
@@ -177,168 +140,97 @@ superlocalmemoryv2:status
177
140
 
178
141
  **That's it.** No Docker. No API keys. No cloud accounts. No configuration.
179
142
 
180
- ### Updating to Latest Version
181
-
182
- **npm users:**
183
- ```bash
184
- # Update to latest version
185
- npm update -g superlocalmemory
186
-
187
- # Or force latest
188
- npm install -g superlocalmemory@latest
189
-
190
- # Install specific version
191
- npm install -g superlocalmemory@latest
192
- ```
193
-
194
- **Manual install users:**
195
- ```bash
196
- cd SuperLocalMemoryV2
197
- git pull origin main
198
- ./install.sh # Mac/Linux
199
- # or
200
- .\install.ps1 # Windows
201
- ```
202
-
203
- **Your data is safe:** Updates preserve your database and all memories.
204
-
205
- ### Start the Visualization Dashboard
143
+ ### Launch Dashboard
206
144
 
207
145
  ```bash
208
- # Launch the interactive web UI
146
+ # Start the interactive web UI
209
147
  python3 ~/.claude-memory/ui_server.py
210
148
 
211
149
  # Opens at http://localhost:8765
212
- # Features: Timeline view, search explorer, graph visualization
150
+ # Features: Timeline, search, interactive graph, statistics
213
151
  ```
214
152
 
215
153
  ---
216
154
 
217
- ## 🎨 Visualization Dashboard
218
-
219
- **NEW in v2.2.0:** Interactive web-based dashboard for exploring your memories visually.
220
-
221
- ### Features
222
-
223
- | Feature | Description |
224
- |---------|-------------|
225
- | **📈 Timeline View** | See your memories chronologically with importance indicators |
226
- | **🔍 Search Explorer** | Real-time semantic search with score visualization |
227
- | **🕸️ Graph Visualization** | Interactive knowledge graph with clusters and relationships |
228
- | **📊 Statistics Dashboard** | Memory trends, tag clouds, pattern insights |
229
- | **🎯 Advanced Filters** | Filter by tags, importance, date range, clusters |
230
-
231
- ### Quick Tour
155
+ ## 💡 Why SuperLocalMemory?
232
156
 
233
- ```bash
234
- # 1. Start dashboard
235
- python ~/.claude-memory/ui_server.py
157
+ ### For Developers Who Use AI Daily
236
158
 
237
- # 2. Navigate to http://localhost:8765
159
+ | Scenario | Without Memory | With SuperLocalMemory |
160
+ |----------|---------------|----------------------|
161
+ | New Claude session | Re-explain entire project | `recall "project context"` → instant context |
162
+ | Debugging | "We tried X last week..." starts over | Knowledge graph shows related past fixes |
163
+ | Code preferences | "I prefer React..." every time | Pattern learning knows your style |
164
+ | Multi-project | Context constantly bleeds | Separate profiles per project |
238
165
 
239
- # 3. Explore your memories:
240
- # - Timeline: See memories over time
241
- # - Search: Find with semantic scoring
242
- # - Graph: Visualize relationships
243
- # - Stats: Analyze patterns
244
- ```
166
+ ### Built on 2026 Research
245
167
 
246
- **[[Complete Dashboard Guide →|Visualization-Dashboard]]**
168
+ Not another simple key-value store. SuperLocalMemory implements **cutting-edge memory architecture**:
247
169
 
248
- ---
170
+ - **PageIndex** (Meta AI) → Hierarchical memory organization
171
+ - **GraphRAG** (Microsoft) → Knowledge graph with auto-clustering
172
+ - **xMemory** (Stanford) → Identity pattern learning
173
+ - **A-RAG** → Multi-level retrieval with context awareness
249
174
 
250
- ### New in v2.4.1: Hierarchical Clustering, Community Summaries & Auto-Backup
175
+ **The only open-source implementation combining all four approaches.**
251
176
 
252
- | Feature | Description |
253
- |---------|-------------|
254
- | **Hierarchical Leiden** | Recursive community detection — clusters within clusters up to 3 levels. "Python" → "FastAPI" → "Auth patterns" |
255
- | **Community Summaries** | TF-IDF structured reports per cluster: key topics, projects, categories at a glance |
256
- | **MACLA Confidence** | Bayesian Beta-Binomial scoring (arXiv:2512.18950) — calibrated confidence, not raw frequency |
257
- | **Auto-Backup** | Configurable SQLite backups with retention policies, one-click restore from dashboard |
258
- | **Profile UI** | Create, switch, delete profiles from the web dashboard — full isolation per context |
259
- | **Profile Isolation** | All API endpoints (graph, clusters, patterns, timeline) scoped to active profile |
177
+ [See research citations →](https://github.com/varun369/SuperLocalMemoryV2/wiki/Research-Foundations)
260
178
 
261
179
  ---
262
180
 
263
- ## 🔍 Advanced Search
264
-
265
- SuperLocalMemory V2.2.0 implements **hybrid search** combining multiple strategies for maximum accuracy.
266
-
267
- ### Search Strategies
268
-
269
- | Strategy | Method | Best For | Speed |
270
- |----------|--------|----------|-------|
271
- | **Semantic Search** | TF-IDF vectors + cosine similarity | Conceptual queries ("authentication patterns") | 45ms |
272
- | **Full-Text Search** | SQLite FTS5 with ranking | Exact phrases ("JWT tokens expire") | 30ms |
273
- | **Graph-Enhanced** | Knowledge graph traversal | Related concepts ("show auth-related") | 60ms |
274
- | **Hybrid Mode** | All three combined | General queries | 80ms |
275
-
276
- ### Search Examples
277
-
278
- ```bash
279
- # Semantic: finds conceptually similar
280
- slm recall "security best practices"
281
- # Matches: "JWT implementation", "OAuth flow", "CSRF protection"
181
+ ## Features
282
182
 
283
- # Exact: finds literal text
284
- slm recall "PostgreSQL 15"
285
- # Matches: exactly "PostgreSQL 15"
183
+ ### Multi-Layer Memory Architecture
286
184
 
287
- # Graph: finds related via clusters
288
- slm recall "authentication" --use-graph
289
- # Matches: JWT, OAuth, sessions (via "Auth & Security" cluster)
185
+ **[View Interactive Architecture Diagram](https://superlocalmemory.com/architecture.html)** Click any layer for details, research references, and file paths.
290
186
 
291
- # Hybrid: best of all worlds (default)
292
- slm recall "API design patterns"
293
- # Combines semantic + exact + graph for optimal results
187
+ ```
188
+ ┌─────────────────────────────────────────────────────────────┐
189
+ │ Layer 9: VISUALIZATION (v2.2+) │
190
+ │ Interactive dashboard: timeline, graph explorer, analytics │
191
+ ├─────────────────────────────────────────────────────────────┤
192
+ │ Layer 8: HYBRID SEARCH (v2.2+) │
193
+ │ Combines: Semantic + FTS5 + Graph traversal │
194
+ ├─────────────────────────────────────────────────────────────┤
195
+ │ Layer 7: UNIVERSAL ACCESS │
196
+ │ MCP + Skills + CLI (works everywhere) │
197
+ │ 17+ IDEs with single database │
198
+ ├─────────────────────────────────────────────────────────────┤
199
+ │ Layer 6: MCP INTEGRATION │
200
+ │ Model Context Protocol: 6 tools, 4 resources, 2 prompts │
201
+ │ Auto-configured for Cursor, Windsurf, Claude │
202
+ ├─────────────────────────────────────────────────────────────┤
203
+ │ Layer 5: SKILLS LAYER │
204
+ │ 6 universal slash-commands for AI assistants │
205
+ │ Compatible with Claude Code, Continue, Cody │
206
+ ├─────────────────────────────────────────────────────────────┤
207
+ │ Layer 4: PATTERN LEARNING + MACLA │
208
+ │ Bayesian confidence scoring (arXiv:2512.18950) │
209
+ │ "You prefer React over Vue" (73% confidence) │
210
+ ├─────────────────────────────────────────────────────────────┤
211
+ │ Layer 3: KNOWLEDGE GRAPH + HIERARCHICAL CLUSTERING │
212
+ │ Recursive Leiden algorithm: "Python" → "FastAPI" → "Auth" │
213
+ │ Community summaries with TF-IDF structured reports │
214
+ ├─────────────────────────────────────────────────────────────┤
215
+ │ Layer 2: HIERARCHICAL INDEX │
216
+ │ Tree structure for fast navigation │
217
+ │ O(log n) lookups instead of O(n) scans │
218
+ ├─────────────────────────────────────────────────────────────┤
219
+ │ Layer 1: RAW STORAGE │
220
+ │ SQLite + Full-text search + TF-IDF vectors │
221
+ │ Compression: 60-96% space savings │
222
+ └─────────────────────────────────────────────────────────────┘
294
223
  ```
295
224
 
296
- ### Search Performance by Dataset Size
297
-
298
- | Memories | Semantic | FTS5 | Graph | Hybrid |
299
- |----------|----------|------|-------|--------|
300
- | 100 | 35ms | 25ms | 50ms | 65ms |
301
- | 500 | 45ms | 30ms | 60ms | 80ms |
302
- | 1,000 | 55ms | 35ms | 70ms | 95ms |
303
- | 5,000 | 85ms | 50ms | 110ms | 150ms |
304
-
305
- **All search strategies remain sub-second even with 5,000+ memories.**
306
-
307
- ---
308
-
309
- ## ⚡ Performance
310
-
311
- ### Benchmarks (v2.2.0)
312
-
313
- | Operation | Time | Comparison | Notes |
314
- |-----------|------|------------|-------|
315
- | **Add Memory** | < 10ms | - | Instant indexing |
316
- | **Search (Hybrid)** | 80ms | 3.3x faster than v1 | 500 memories |
317
- | **Graph Build** | < 2s | - | 100 memories |
318
- | **Pattern Learning** | < 2s | - | Incremental |
319
- | **Dashboard Load** | < 500ms | - | 1,000 memories |
320
- | **Timeline Render** | < 300ms | - | All memories |
321
-
322
- ### Storage Efficiency
323
-
324
- | Tier | Description | Compression | Savings |
325
- |------|-------------|-------------|---------|
326
- | **Tier 1** | Active memories (0-30 days) | None | - |
327
- | **Tier 2** | Warm memories (30-90 days) | 60% | Progressive summarization |
328
- | **Tier 3** | Cold storage (90+ days) | 96% | JSON archival |
329
-
330
- **Example:** 1,000 memories with mixed ages = ~15MB (vs 380MB uncompressed)
331
-
332
- ### Scalability
333
-
334
- | Dataset Size | Search Time | Graph Build | RAM Usage |
335
- |--------------|-------------|-------------|-----------|
336
- | 100 memories | 35ms | 0.5s | < 30MB |
337
- | 500 memories | 45ms | 2s | < 50MB |
338
- | 1,000 memories | 55ms | 5s | < 80MB |
339
- | 5,000 memories | 85ms | 30s | < 150MB |
225
+ ### Key Capabilities
340
226
 
341
- **Tested up to 10,000 memories** with linear scaling and no degradation.
227
+ - **[Knowledge Graphs](https://github.com/varun369/SuperLocalMemoryV2/wiki/Knowledge-Graph)** Automatic relationship discovery. Interactive visualization with zoom, pan, click.
228
+ - **[Pattern Learning](https://github.com/varun369/SuperLocalMemoryV2/wiki/Pattern-Learning)** — Learns your coding preferences and style automatically.
229
+ - **[Multi-Profile Support](https://github.com/varun369/SuperLocalMemoryV2/wiki/Using-Memory-Profiles)** — Isolated contexts for work, personal, clients. Zero context bleeding.
230
+ - **[Hybrid Search](https://github.com/varun369/SuperLocalMemoryV2/wiki/Advanced-Search)** — Semantic + FTS5 + Graph retrieval combined for maximum accuracy.
231
+ - **[Visualization Dashboard](https://github.com/varun369/SuperLocalMemoryV2/wiki/Visualization-Dashboard)** — Web UI for timeline, search, graph exploration, analytics.
232
+ - **[Framework Integrations](docs/FRAMEWORK-INTEGRATIONS.md)** — Use with LangChain and LlamaIndex applications.
233
+ - **[Real-Time Events](https://github.com/varun369/SuperLocalMemoryV2/wiki/Real-Time-Event-System)** — Live notifications via SSE/WebSocket/Webhooks when memories change.
342
234
 
343
235
  ---
344
236
 
@@ -361,79 +253,29 @@ slm recall "API design patterns"
361
253
  | **Gemini CLI** | ✅ MCP + Skills | Native MCP + skills |
362
254
  | **JetBrains IDEs** | ✅ MCP | Via AI Assistant settings |
363
255
  | **Zed Editor** | ✅ MCP | Native MCP tools |
364
- | **OpenCode** | ✅ MCP | Native MCP tools |
365
- | **Perplexity** | ✅ MCP | Native MCP tools |
366
- | **Antigravity** | ✅ MCP + Skills | Native MCP tools |
367
- | **ChatGPT** | ✅ MCP Connector | `search()` + `fetch()` via HTTP tunnel |
368
256
  | **Aider** | ✅ Smart Wrapper | `aider-smart` with context |
369
257
  | **Any Terminal** | ✅ Universal CLI | `slm remember "content"` |
370
258
 
371
259
  ### Three Ways to Access
372
260
 
373
- 1. **MCP (Model Context Protocol)** - Auto-configured for Cursor, Windsurf, Claude Desktop
261
+ 1. **MCP (Model Context Protocol)** Auto-configured for Cursor, Windsurf, Claude Desktop
374
262
  - AI assistants get natural access to your memory
375
263
  - No manual commands needed
376
264
  - "Remember that we use FastAPI" just works
377
265
 
378
- 2. **Skills & Commands** - For Claude Code, Continue.dev, Cody
266
+ 2. **Skills & Commands** For Claude Code, Continue.dev, Cody
379
267
  - `/superlocalmemoryv2:remember` in Claude Code
380
268
  - `/slm-remember` in Continue.dev and Cody
381
269
  - Familiar slash command interface
382
270
 
383
- 3. **Universal CLI** - Works in any terminal or script
271
+ 3. **Universal CLI** Works in any terminal or script
384
272
  - `slm remember "content"` - Simple, clean syntax
385
273
  - `slm recall "query"` - Search from anywhere
386
274
  - `aider-smart` - Aider with auto-context injection
387
275
 
388
276
  **All three methods use the SAME local database.** No data duplication, no conflicts.
389
277
 
390
- ### Auto-Detection
391
-
392
- Installation automatically detects and configures:
393
- - Existing IDEs (Cursor, Windsurf, VS Code)
394
- - Installed tools (Aider, Continue, Cody)
395
- - Shell environment (bash, zsh)
396
-
397
- **Zero manual configuration required.** It just works.
398
-
399
- ### Manual Setup for Other Apps
400
-
401
- Want to use SuperLocalMemory in ChatGPT, Perplexity, Zed, or other MCP-compatible tools?
402
-
403
- **📘 Complete setup guide:** [docs/MCP-MANUAL-SETUP.md](docs/MCP-MANUAL-SETUP.md)
404
-
405
- Covers:
406
- - ChatGPT Desktop - Add via Settings → MCP
407
- - Perplexity - Configure via app settings
408
- - Zed Editor - JSON configuration
409
- - Cody - VS Code/JetBrains setup
410
- - Custom MCP clients - Python/HTTP integration
411
-
412
- All tools connect to the **same local database** - no data duplication.
413
-
414
- ---
415
-
416
- ## 💡 Why SuperLocalMemory?
417
-
418
- ### For Developers Who Use AI Daily
419
-
420
- | Scenario | Without Memory | With SuperLocalMemory |
421
- |----------|---------------|----------------------|
422
- | New Claude session | Re-explain entire project | `recall "project context"` → instant context |
423
- | Debugging | "We tried X last week..." starts over | Knowledge graph shows related past fixes |
424
- | Code preferences | "I prefer React..." every time | Pattern learning knows your style |
425
- | Multi-project | Context constantly bleeds | Separate profiles per project |
426
-
427
- ### Built on 2026 Research
428
-
429
- Not another simple key-value store. SuperLocalMemory implements **cutting-edge memory architecture**:
430
-
431
- - **PageIndex** (Meta AI) → Hierarchical memory organization
432
- - **GraphRAG** (Microsoft) → Knowledge graph with auto-clustering
433
- - **xMemory** (Stanford) → Identity pattern learning
434
- - **A-RAG** → Multi-level retrieval with context awareness
435
-
436
- **The only open-source implementation combining all four approaches.**
278
+ [Complete setup guide for all tools →](docs/MCP-MANUAL-SETUP.md)
437
279
 
438
280
  ---
439
281
 
@@ -450,27 +292,23 @@ Not another simple key-value store. SuperLocalMemory implements **cutting-edge m
450
292
  | **Letta/MemGPT** | Self-hosted (complex) | TBD | Requires significant setup |
451
293
  | **SuperLocalMemory V2** | **Unlimited** | **$0 forever** | **Nothing.** |
452
294
 
453
- ### Feature Comparison (What Actually Matters)
295
+ ### What Actually Matters
454
296
 
455
297
  | Feature | Mem0 | Zep | Khoj | Letta | **SuperLocalMemory V2** |
456
298
  |---------|------|-----|------|-------|------------------------|
457
299
  | **Works in Cursor** | Cloud Only | ❌ | ❌ | ❌ | ✅ **Local** |
458
300
  | **Works in Windsurf** | Cloud Only | ❌ | ❌ | ❌ | ✅ **Local** |
459
301
  | **Works in VS Code** | 3rd Party | ❌ | Partial | ❌ | ✅ **Native** |
460
- | **Works in Claude** | ❌ | ❌ | ❌ | ❌ | ✅ |
461
- | **Works with Aider** | ❌ | ❌ | ❌ | ❌ | ✅ |
462
302
  | **Universal CLI** | ❌ | ❌ | ❌ | ❌ | ✅ |
463
- | **7-Layer Universal Architecture** | ❌ | ❌ | ❌ | ❌ | ✅ |
303
+ | **Multi-Layer Architecture** | ❌ | ❌ | ❌ | ❌ | ✅ |
464
304
  | **Pattern Learning** | ❌ | ❌ | ❌ | ❌ | ✅ |
465
- | **Multi-Profile Support** | ❌ | ❌ | ❌ | Partial | ✅ |
466
305
  | **Knowledge Graphs** | ✅ | ✅ | ❌ | ❌ | ✅ |
467
306
  | **100% Local** | ❌ | ❌ | Partial | Partial | ✅ |
468
307
  | **Zero Setup** | ❌ | ❌ | ❌ | ❌ | ✅ |
469
- | **Progressive Compression** | ❌ | ❌ | ❌ | ❌ | ✅ |
470
308
  | **Completely Free** | Limited | Limited | Partial | ✅ | ✅ |
471
309
 
472
310
  **SuperLocalMemory V2 is the ONLY solution that:**
473
- - ✅ Works across 16+ IDEs and CLI tools
311
+ - ✅ Works across 17+ IDEs and CLI tools
474
312
  - ✅ Remains 100% local (no cloud dependencies)
475
313
  - ✅ Completely free with unlimited memories
476
314
 
@@ -478,122 +316,44 @@ Not another simple key-value store. SuperLocalMemory implements **cutting-edge m
478
316
 
479
317
  ---
480
318
 
481
- ## Features
319
+ ## Measured Performance
482
320
 
483
- ### Multi-Layer Memory Architecture
321
+ All numbers measured on real hardware (Apple M4 Pro, 24GB RAM). No estimates — real benchmarks.
484
322
 
485
- **[View Interactive Architecture Diagram](https://varun369.github.io/SuperLocalMemoryV2/architecture.html)** — Click any layer for details, research references, and file paths.
323
+ ### Search Speed
486
324
 
487
- ```
488
- ┌─────────────────────────────────────────────────────────────┐
489
- │ Layer 9: VISUALIZATION (NEW v2.2.0) │
490
- │ Interactive dashboard: timeline, search, graph explorer │
491
- │ Real-time analytics and visual insights │
492
- ├─────────────────────────────────────────────────────────────┤
493
- │ Layer 8: HYBRID SEARCH (NEW v2.2.0) │
494
- │ Combines: Semantic + FTS5 + Graph traversal │
495
- │ 80ms response time with maximum accuracy │
496
- ├─────────────────────────────────────────────────────────────┤
497
- │ Layer 7: UNIVERSAL ACCESS │
498
- │ MCP + Skills + CLI (works everywhere) │
499
- │ 16+ IDEs with single database │
500
- ├─────────────────────────────────────────────────────────────┤
501
- │ Layer 6: MCP INTEGRATION │
502
- │ Model Context Protocol: 6 tools, 4 resources, 2 prompts │
503
- │ Auto-configured for Cursor, Windsurf, Claude │
504
- ├─────────────────────────────────────────────────────────────┤
505
- │ Layer 5: SKILLS LAYER │
506
- │ 6 universal slash-commands for AI assistants │
507
- │ Compatible with Claude Code, Continue, Cody │
508
- ├─────────────────────────────────────────────────────────────┤
509
- │ Layer 4: PATTERN LEARNING + MACLA (v2.4.0) │
510
- │ Bayesian Beta-Binomial confidence (arXiv:2512.18950) │
511
- │ "You prefer React over Vue" (73% confidence) │
512
- ├─────────────────────────────────────────────────────────────┤
513
- │ Layer 3: KNOWLEDGE GRAPH + HIERARCHICAL LEIDEN (v2.4.1) │
514
- │ Recursive clustering: "Python" → "FastAPI" → "Auth" │
515
- │ Community summaries + TF-IDF structured reports │
516
- ├─────────────────────────────────────────────────────────────┤
517
- │ Layer 2: HIERARCHICAL INDEX │
518
- │ Tree structure for fast navigation │
519
- │ O(log n) lookups instead of O(n) scans │
520
- ├─────────────────────────────────────────────────────────────┤
521
- │ Layer 1: RAW STORAGE │
522
- │ SQLite + Full-text search + TF-IDF vectors │
523
- │ Compression: 60-96% space savings │
524
- └─────────────────────────────────────────────────────────────┘
525
- ```
526
-
527
- ### Knowledge Graph (It's Magic)
528
-
529
- ```bash
530
- # Build the graph from your memories
531
- python ~/.claude-memory/graph_engine.py build
532
-
533
- # Output:
534
- # ✓ Processed 47 memories
535
- # ✓ Created 12 clusters:
536
- # - "Authentication & Tokens" (8 memories)
537
- # - "Performance Optimization" (6 memories)
538
- # - "React Components" (11 memories)
539
- # - "Database Queries" (5 memories)
540
- # ...
541
- ```
542
-
543
- **The graph automatically discovers relationships.** Ask "what relates to auth?" and get JWT, session management, token refresh—even if you never tagged them together.
544
-
545
- ### Pattern Learning (It Knows You)
546
-
547
- ```bash
548
- # Learn patterns from your memories
549
- python ~/.claude-memory/pattern_learner.py update
550
-
551
- # Get your coding identity
552
- python ~/.claude-memory/pattern_learner.py context 0.5
553
-
554
- # Output:
555
- # Your Coding Identity:
556
- # - Framework preference: React (73% confidence)
557
- # - Style: Performance over readability (58% confidence)
558
- # - Testing: Jest + React Testing Library (65% confidence)
559
- # - API style: REST over GraphQL (81% confidence)
560
- ```
325
+ | Database Size | Median Latency | P95 Latency |
326
+ |---------------|----------------|-------------|
327
+ | 100 memories | **10.6ms** | 14.9ms |
328
+ | 500 memories | **65.2ms** | 101.7ms |
329
+ | 1,000 memories | **124.3ms** | 190.1ms |
561
330
 
562
- **Your AI assistant can now match your preferences automatically.**
331
+ For typical personal use (under 500 memories), search results return faster than you blink.
563
332
 
564
- **MACLA Confidence Scoring (v2.4.0):** Confidence uses a Bayesian Beta-Binomial posterior (Forouzandeh et al., [arXiv:2512.18950](https://arxiv.org/abs/2512.18950)). Pattern-specific priors, log-scaled competition, recency bonus. Range: 0.0–0.95 (hard cap prevents overconfidence).
333
+ ### Concurrent Writes Zero Errors
565
334
 
566
- ### Multi-Profile Support
335
+ | Scenario | Writes/sec | Errors |
336
+ |----------|------------|--------|
337
+ | 1 AI tool writing | **204/sec** | 0 |
338
+ | 2 AI tools simultaneously | **220/sec** | 0 |
339
+ | 5 AI tools simultaneously | **130/sec** | 0 |
567
340
 
568
- ```bash
569
- # Work profile
570
- superlocalmemoryv2:profile create work --description "Day job"
571
- superlocalmemoryv2:profile switch work
341
+ WAL mode + serialized write queue = zero "database is locked" errors, ever.
572
342
 
573
- # Personal projects
574
- superlocalmemoryv2:profile create personal
575
- superlocalmemoryv2:profile switch personal
343
+ ### Storage
576
344
 
577
- # Client projects (completely isolated)
578
- superlocalmemoryv2:profile create client-acme
579
- ```
345
+ 10,000 memories = **13.6 MB** on disk (~1.9 KB per memory). Your entire AI memory history takes less space than a photo.
580
346
 
581
- **Each profile has isolated memories, graphs, and patterns.** No context bleeding.
347
+ ### Graph Construction
582
348
 
583
- ---
349
+ | Memories | Build Time |
350
+ |----------|-----------|
351
+ | 100 | 0.28s |
352
+ | 1,000 | 10.6s |
584
353
 
585
- ## 📖 Documentation
354
+ Leiden clustering discovers 6-7 natural topic communities automatically.
586
355
 
587
- | Guide | Description |
588
- |-------|-------------|
589
- | [Quick Start](https://github.com/varun369/SuperLocalMemoryV2/wiki/Quick-Start-Tutorial) | Get running in 5 minutes |
590
- | [Installation](https://github.com/varun369/SuperLocalMemoryV2/wiki/Installation) | Detailed setup instructions |
591
- | [Visualization Dashboard](https://github.com/varun369/SuperLocalMemoryV2/wiki/Visualization-Dashboard) | Interactive web UI guide (NEW v2.2.0) |
592
- | [CLI Reference](docs/CLI-COMMANDS-REFERENCE.md) | All commands explained |
593
- | [Knowledge Graph](docs/GRAPH-ENGINE.md) | How clustering works |
594
- | [Pattern Learning](docs/PATTERN-LEARNING.md) | Identity extraction |
595
- | [Profiles Guide](docs/PROFILES-GUIDE.md) | Multi-context management |
596
- | [API Reference](docs/API-REFERENCE.md) | Python API documentation |
356
+ [Full benchmark details →](https://github.com/varun369/SuperLocalMemoryV2/wiki/Performance-Benchmarks)
597
357
 
598
358
  ---
599
359
 
@@ -612,45 +372,33 @@ superlocalmemoryv2:profile create <name> # New profile
612
372
  superlocalmemoryv2:profile switch <name> # Switch context
613
373
 
614
374
  # Knowledge Graph
615
- python ~/.claude-memory/graph_engine.py build # Build graph (+ hierarchical + summaries)
375
+ python ~/.claude-memory/graph_engine.py build # Build graph
616
376
  python ~/.claude-memory/graph_engine.py stats # View clusters
617
- python ~/.claude-memory/graph_engine.py related --id 5 # Find related
618
- python ~/.claude-memory/graph_engine.py hierarchical # Sub-cluster large communities
619
- python ~/.claude-memory/graph_engine.py summaries # Generate cluster summaries
620
377
 
621
378
  # Pattern Learning
622
379
  python ~/.claude-memory/pattern_learner.py update # Learn patterns
623
380
  python ~/.claude-memory/pattern_learner.py context 0.5 # Get identity
624
381
 
625
- # Auto-Backup (v2.4.0)
626
- python ~/.claude-memory/auto_backup.py backup # Manual backup
627
- python ~/.claude-memory/auto_backup.py list # List backups
628
- python ~/.claude-memory/auto_backup.py status # Backup status
629
-
630
- # Reset (Use with caution!)
631
- superlocalmemoryv2:reset soft # Clear memories
632
- superlocalmemoryv2:reset hard --confirm # Nuclear option
382
+ # Visualization Dashboard
383
+ python ~/.claude-memory/ui_server.py # Launch web UI
633
384
  ```
634
385
 
635
- ---
636
-
637
- ## 📊 Performance
386
+ [Complete CLI reference →](docs/CLI-COMMANDS-REFERENCE.md)
638
387
 
639
- **SEO:** Performance benchmarks, memory system speed, search latency, visualization dashboard performance
388
+ ---
640
389
 
641
- | Metric | Result | Notes |
642
- |--------|--------|-------|
643
- | **Hybrid search** | **80ms** | Semantic + FTS5 + Graph combined |
644
- | **Semantic search** | **45ms** | 3.3x faster than v1 |
645
- | **FTS5 search** | **30ms** | Exact phrase matching |
646
- | **Graph build (100 memories)** | **< 2 seconds** | Leiden clustering |
647
- | **Pattern learning** | **< 2 seconds** | Incremental updates |
648
- | **Dashboard load** | **< 500ms** | 1,000 memories |
649
- | **Timeline render** | **< 300ms** | All memories visualized |
650
- | **Storage compression** | **60-96% reduction** | Progressive tiering |
651
- | **Memory overhead** | **< 50MB RAM** | Lightweight |
390
+ ## 📖 Documentation
652
391
 
653
- **Tested up to 10,000 memories** with sub-second search times and linear scaling.
392
+ | Guide | Description |
393
+ |-------|-------------|
394
+ | [Quick Start](https://github.com/varun369/SuperLocalMemoryV2/wiki/Quick-Start-Tutorial) | Get running in 5 minutes |
395
+ | [Installation](https://github.com/varun369/SuperLocalMemoryV2/wiki/Installation) | Detailed setup instructions |
396
+ | [Visualization Dashboard](https://github.com/varun369/SuperLocalMemoryV2/wiki/Visualization-Dashboard) | Interactive web UI guide |
397
+ | [Interactive Graph](https://github.com/varun369/SuperLocalMemoryV2/wiki/Using-Interactive-Graph) | Graph exploration guide (NEW v2.6.5) |
398
+ | [Framework Integrations](docs/FRAMEWORK-INTEGRATIONS.md) | LangChain & LlamaIndex setup |
399
+ | [Knowledge Graph](docs/GRAPH-ENGINE.md) | How clustering works |
400
+ | [Pattern Learning](docs/PATTERN-LEARNING.md) | Identity extraction |
401
+ | [API Reference](docs/API-REFERENCE.md) | Python API documentation |
654
402
 
655
403
  ---
656
404
 
@@ -660,9 +408,8 @@ We welcome contributions! See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
660
408
 
661
409
  **Areas for contribution:**
662
410
  - Additional pattern categories
663
- - Graph visualization UI
664
- - Integration with more AI assistants
665
411
  - Performance optimizations
412
+ - Integration with more AI assistants
666
413
  - Documentation improvements
667
414
 
668
415
  ---