superlocalmemory 3.4.10 → 3.4.11

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 (46) hide show
  1. package/README.md +17 -11
  2. package/docs/skill-evolution.md +77 -10
  3. package/ide/hooks/tool-event-hook.sh +4 -4
  4. package/package.json +1 -1
  5. package/pyproject.toml +3 -2
  6. package/src/superlocalmemory/cli/commands.py +170 -0
  7. package/src/superlocalmemory/cli/main.py +21 -0
  8. package/src/superlocalmemory/cli/setup_wizard.py +54 -11
  9. package/src/superlocalmemory/core/config.py +35 -0
  10. package/src/superlocalmemory/core/consolidation_engine.py +128 -0
  11. package/src/superlocalmemory/core/embedding_worker.py +1 -1
  12. package/src/superlocalmemory/core/engine.py +12 -0
  13. package/src/superlocalmemory/core/fact_consolidator.py +425 -0
  14. package/src/superlocalmemory/core/graph_pruner.py +290 -0
  15. package/src/superlocalmemory/core/maintenance_scheduler.py +20 -0
  16. package/src/superlocalmemory/core/recall_pipeline.py +9 -0
  17. package/src/superlocalmemory/core/tier_manager.py +325 -0
  18. package/src/superlocalmemory/encoding/entity_resolver.py +6 -5
  19. package/src/superlocalmemory/evolution/__init__.py +29 -0
  20. package/src/superlocalmemory/evolution/blind_verifier.py +115 -0
  21. package/src/superlocalmemory/evolution/evolution_store.py +302 -0
  22. package/src/superlocalmemory/evolution/mutation_generator.py +181 -0
  23. package/src/superlocalmemory/evolution/skill_evolver.py +555 -0
  24. package/src/superlocalmemory/evolution/triggers.py +367 -0
  25. package/src/superlocalmemory/evolution/types.py +92 -0
  26. package/src/superlocalmemory/hooks/hook_handlers.py +13 -0
  27. package/src/superlocalmemory/learning/skill_performance_miner.py +44 -11
  28. package/src/superlocalmemory/mcp/server.py +4 -0
  29. package/src/superlocalmemory/mcp/tools_evolution.py +338 -0
  30. package/src/superlocalmemory/retrieval/engine.py +64 -4
  31. package/src/superlocalmemory/retrieval/forgetting_filter.py +22 -7
  32. package/src/superlocalmemory/retrieval/strategy.py +2 -2
  33. package/src/superlocalmemory/server/routes/behavioral.py +19 -15
  34. package/src/superlocalmemory/server/routes/evolution.py +213 -0
  35. package/src/superlocalmemory/server/routes/tiers.py +195 -0
  36. package/src/superlocalmemory/server/unified_daemon.py +36 -5
  37. package/src/superlocalmemory/storage/schema_v3411.py +149 -0
  38. package/src/superlocalmemory/ui/index.html +5 -2
  39. package/src/superlocalmemory/ui/js/lifecycle.js +83 -0
  40. package/src/superlocalmemory/ui/js/ng-skills.js +394 -10
  41. package/src/superlocalmemory.egg-info/PKG-INFO +609 -0
  42. package/src/superlocalmemory.egg-info/SOURCES.txt +335 -0
  43. package/src/superlocalmemory.egg-info/dependency_links.txt +1 -0
  44. package/src/superlocalmemory.egg-info/entry_points.txt +2 -0
  45. package/src/superlocalmemory.egg-info/requires.txt +55 -0
  46. package/src/superlocalmemory.egg-info/top_level.txt +1 -0
@@ -0,0 +1,609 @@
1
+ Metadata-Version: 2.4
2
+ Name: superlocalmemory
3
+ Version: 3.4.11
4
+ Summary: Information-geometric agent memory with mathematical guarantees
5
+ Author-email: Varun Pratap Bhardwaj <admin@superlocalmemory.com>
6
+ License: AGPL-3.0-or-later
7
+ Project-URL: Homepage, https://superlocalmemory.com
8
+ Project-URL: Repository, https://github.com/qualixar/superlocalmemory
9
+ Project-URL: Documentation, https://github.com/qualixar/superlocalmemory/wiki
10
+ Project-URL: Issues, https://github.com/qualixar/superlocalmemory/issues
11
+ Keywords: ai-memory,mcp-server,local-first,agent-memory,information-geometry,privacy-first,eu-ai-act
12
+ Classifier: Development Status :: 4 - Beta
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)
15
+ Classifier: Operating System :: OS Independent
16
+ Classifier: Operating System :: MacOS
17
+ Classifier: Operating System :: Microsoft :: Windows
18
+ Classifier: Operating System :: POSIX :: Linux
19
+ Classifier: Programming Language :: Python :: 3.11
20
+ Classifier: Programming Language :: Python :: 3.12
21
+ Classifier: Programming Language :: Python :: 3.13
22
+ Classifier: Programming Language :: Python :: 3.14
23
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
24
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
25
+ Requires-Python: <3.15,>=3.11
26
+ Description-Content-Type: text/markdown
27
+ License-File: LICENSE
28
+ License-File: NOTICE
29
+ License-File: AUTHORS.md
30
+ Requires-Dist: httpx>=0.24.0
31
+ Requires-Dist: numpy<3.0.0,>=1.26.0
32
+ Requires-Dist: scipy<2.0.0,>=1.12.0
33
+ Requires-Dist: networkx>=3.0
34
+ Requires-Dist: mcp>=1.0.0
35
+ Requires-Dist: python-dateutil>=2.9.0.post0
36
+ Requires-Dist: rank-bm25>=0.2.2
37
+ Requires-Dist: vadersentiment>=3.3.2
38
+ Requires-Dist: einops>=0.8.2
39
+ Requires-Dist: fastapi[all]>=0.135.1
40
+ Requires-Dist: uvicorn>=0.42.0
41
+ Requires-Dist: websockets>=16.0
42
+ Requires-Dist: lightgbm>=4.0.0
43
+ Requires-Dist: diskcache>=5.6.0
44
+ Requires-Dist: orjson>=3.9.0
45
+ Requires-Dist: tree-sitter<1,>=0.23.0
46
+ Requires-Dist: tree-sitter-language-pack<2,>=0.3
47
+ Requires-Dist: rustworkx<1,>=0.15
48
+ Requires-Dist: watchdog<6,>=4.0
49
+ Requires-Dist: psutil>=5.9.0
50
+ Requires-Dist: structlog<27.0.0,>=24.0.0
51
+ Provides-Extra: search
52
+ Requires-Dist: sentence-transformers[onnx]>=5.0.0; extra == "search"
53
+ Requires-Dist: einops>=0.8.2; extra == "search"
54
+ Requires-Dist: torch>=2.2.0; extra == "search"
55
+ Requires-Dist: scikit-learn<2.0.0,>=1.3.0; extra == "search"
56
+ Requires-Dist: geoopt>=0.5.0; extra == "search"
57
+ Requires-Dist: onnxruntime>=1.17.0; extra == "search"
58
+ Provides-Extra: ui
59
+ Requires-Dist: fastapi[all]>=0.135.1; extra == "ui"
60
+ Requires-Dist: uvicorn>=0.42.0; extra == "ui"
61
+ Requires-Dist: python-multipart<1.0.0,>=0.0.6; extra == "ui"
62
+ Provides-Extra: learning
63
+ Requires-Dist: lightgbm>=4.0.0; extra == "learning"
64
+ Provides-Extra: performance
65
+ Requires-Dist: diskcache>=5.6.0; extra == "performance"
66
+ Requires-Dist: orjson>=3.9.0; extra == "performance"
67
+ Provides-Extra: ingestion
68
+ Requires-Dist: keyring>=25.0.0; extra == "ingestion"
69
+ Requires-Dist: google-auth-oauthlib>=1.2.0; extra == "ingestion"
70
+ Requires-Dist: google-api-python-client>=2.100.0; extra == "ingestion"
71
+ Requires-Dist: icalendar>=6.0.0; extra == "ingestion"
72
+ Provides-Extra: full
73
+ Requires-Dist: superlocalmemory[ingestion,learning,performance,search,ui]; extra == "full"
74
+ Provides-Extra: dev
75
+ Requires-Dist: pytest>=8.0; extra == "dev"
76
+ Requires-Dist: pytest-cov>=4.1; extra == "dev"
77
+ Requires-Dist: sqlite-vec>=0.1.6; extra == "dev"
78
+ Dynamic: license-file
79
+
80
+ <p align="center">
81
+ <img src="https://superlocalmemory.com/assets/logo-mark.png" alt="SuperLocalMemory" width="200"/>
82
+ </p>
83
+
84
+ <h1 align="center">SuperLocalMemory V3.4</h1>
85
+ <p align="center"><strong>Every other AI forgets. Yours won't.</strong><br/><em>Infinite memory for Claude Code, Cursor, Windsurf & 17+ AI tools.</em></p>
86
+ <p align="center"><code>v3.4.4 "Neural Glass"</code> — Install once. Every session remembers the last. Automatically.</p>
87
+ <p align="center"><strong>Backed by 3 peer-reviewed research papers</strong> · <a href="https://arxiv.org/abs/2603.02240">arXiv:2603.02240</a> · <a href="https://arxiv.org/abs/2603.14588">arXiv:2603.14588</a> · <a href="https://arxiv.org/abs/2604.04514">arXiv:2604.04514</a></p>
88
+
89
+ <p align="center">
90
+ <code>+16pp vs Mem0 (zero cloud)</code> &nbsp;·&nbsp; <code>85% Open-Domain (best of any system)</code> &nbsp;·&nbsp; <code>EU AI Act Ready</code>
91
+ </p>
92
+
93
+ <p align="center">
94
+ <a href="https://arxiv.org/abs/2603.14588"><img src="https://img.shields.io/badge/arXiv-2603.14588-b31b1b?style=for-the-badge&logo=arxiv&logoColor=white" alt="arXiv Paper"/></a>
95
+ <a href="https://pypi.org/project/superlocalmemory/"><img src="https://img.shields.io/pypi/v/superlocalmemory?style=for-the-badge&logo=pypi&logoColor=white" alt="PyPI"/></a>
96
+ <a href="https://www.npmjs.com/package/superlocalmemory"><img src="https://img.shields.io/npm/v/superlocalmemory?style=for-the-badge&logo=npm&logoColor=white" alt="npm"/></a>
97
+ <a href="https://www.gnu.org/licenses/agpl-3.0"><img src="https://img.shields.io/badge/License-AGPL_v3-blue.svg?style=for-the-badge" alt="AGPL v3"/></a>
98
+ <a href="#eu-ai-act-compliance"><img src="https://img.shields.io/badge/EU_AI_Act-Compliant-brightgreen?style=for-the-badge" alt="EU AI Act"/></a>
99
+ <a href="https://superlocalmemory.com"><img src="https://img.shields.io/badge/Web-superlocalmemory.com-ff6b35?style=for-the-badge" alt="Website"/></a>
100
+ <a href="#dual-interface-mcp--cli"><img src="https://img.shields.io/badge/MCP-Native-blue?style=for-the-badge" alt="MCP Native"/></a>
101
+ <a href="#dual-interface-mcp--cli"><img src="https://img.shields.io/badge/CLI-Agent--Native-green?style=for-the-badge" alt="CLI Agent-Native"/></a>
102
+ </p>
103
+
104
+ <p align="center">
105
+ <video src="https://github.com/user-attachments/assets/c3b54a1d-f62a-4ea7-bba7-900435e7b3ab" width="800" autoplay loop muted playsinline></video>
106
+ </p>
107
+
108
+ ---
109
+
110
+ ## Why SuperLocalMemory?
111
+
112
+ Every major AI memory system — Mem0, Zep, Letta, EverMemOS — sends your data to cloud LLMs for core operations. That means latency on every query, cost on every interaction, and after **August 2, 2026**, a compliance problem under the EU AI Act.
113
+
114
+ SuperLocalMemory V3 takes a different approach: **mathematics instead of cloud compute.** Three techniques from differential geometry, algebraic topology, and stochastic analysis replace the work that other systems need LLMs to do — similarity scoring, contradiction detection, and lifecycle management. The result is an agent memory that runs entirely on your machine, on CPU, with no API keys, and still outperforms funded alternatives.
115
+
116
+ **The numbers** (evaluated on [LoCoMo](https://arxiv.org/abs/2402.09714), the standard long-conversation memory benchmark):
117
+
118
+ | System | Score | Cloud Required | Open Source | Funding |
119
+ |:-------|:-----:|:--------------:|:-----------:|:-------:|
120
+ | EverMemOS | 92.3% | Yes | No | — |
121
+ | Hindsight | 89.6% | Yes | No | — |
122
+ | **SLM V3 Mode C** | **87.7%** | Optional | **Yes (EL2)** | $0 |
123
+ | Zep v3 | 85.2% | Yes | Deprecated | $35M |
124
+ | **SLM V3 Mode A** | **74.8%** | **No** | **Yes (EL2)** | $0 |
125
+ | Mem0 | 64.2% | Yes | Partial | $24M |
126
+
127
+ Mode A scores **74.8% with zero cloud dependency** — outperforming Mem0 by 16 percentage points without a single API call. On open-domain questions, Mode A scores **85.0% — the highest of any system in the evaluation**, including cloud-powered ones. Mode C reaches **87.7%**, matching enterprise cloud systems.
128
+
129
+ Mathematical layers contribute **+12.7 percentage points** on average across 6 conversations (n=832 questions), with up to **+19.9pp on the most challenging dialogues**. This isn't more compute — it's better math.
130
+
131
+ > **Upgrading from V2 (2.8.6)?** V3 is a complete architectural reinvention — new mathematical engine, new retrieval pipeline, new storage schema. Your existing data is preserved but requires migration. After installing V3, run `slm migrate` to upgrade your data. Read the [Migration Guide](https://github.com/qualixar/superlocalmemory/wiki/Migration-from-V2) before upgrading. Backup is created automatically.
132
+
133
+ ---
134
+
135
+ ## What's New in V3.3 — The Living Brain Evolves
136
+
137
+ > V3.3 gives your memory a lifecycle. Memories strengthen when used, fade when neglected, compress when idle, and consolidate into reusable patterns — all automatically, all locally. Your agent gets smarter the longer it runs.
138
+
139
+ ### Features at a Glance
140
+
141
+ - **Adaptive Memory Lifecycle** — memories naturally strengthen with use and fade when neglected. No manual cleanup, no hardcoded TTLs.
142
+ - **Smart Compression** — embedding precision adapts to memory importance. Low-priority memories compress up to 32x. High-value memories stay full-resolution.
143
+ - **Cognitive Consolidation** — the system automatically extracts patterns from clusters of related memories. One decision referenced 50 times becomes one reusable insight.
144
+ - **Pattern Learning** — auto-learned soft prompts injected into your agent's context at session start. The system teaches itself what matters to you.
145
+ - **Hopfield Retrieval (6th Channel)** — vague or partial queries now complete themselves. Ask half a question, get the whole answer.
146
+ - **Process Health** — orphaned SLM processes detected and cleaned automatically. No more zombie workers eating RAM.
147
+
148
+ ### New CLI Commands
149
+
150
+ ```bash
151
+ # Run a memory lifecycle review — strengthens active memories, archives neglected ones
152
+ slm decay
153
+
154
+ # Run smart compression — adapts embedding precision to memory importance
155
+ slm quantize
156
+
157
+ # Extract reusable patterns from memory clusters
158
+ slm consolidate --cognitive
159
+
160
+ # View auto-learned patterns that get injected into agent context
161
+ slm soft-prompts
162
+
163
+ # Clean up orphaned SLM processes
164
+ slm reap
165
+ ```
166
+
167
+ ### New MCP Tools
168
+
169
+ | Tool | Description |
170
+ |:-----|:------------|
171
+ | `forget` | Programmatic memory archival via lifecycle rules |
172
+ | `quantize` | Trigger smart compression on demand |
173
+ | `consolidate_cognitive` | Extract and store patterns from memory clusters |
174
+ | `get_soft_prompts` | Retrieve auto-learned patterns for context injection |
175
+ | `reap_processes` | Clean orphaned SLM processes |
176
+ | `get_retention_stats` | Memory lifecycle analytics |
177
+
178
+ ### Mode A/B Memory Improvements
179
+
180
+ | Metric | V3.2 | V3.3 | Change |
181
+ |:-------|:----:|:----:|:------:|
182
+ | RAM usage (Mode A/B) | ~4GB | ~40MB | **100x reduction** |
183
+ | Retrieval channels | 5 | 6 | +Hopfield completion |
184
+ | MCP tools | 29 | 35 | +6 new |
185
+ | CLI commands | 21 | 26 | +5 new |
186
+ | Dashboard tabs | 20 | 23 | +3 new |
187
+ | API endpoints | 9 | 16 | +7 new |
188
+
189
+ Embedding migration happens automatically when you switch modes — no manual steps needed.
190
+
191
+ ### Dashboard
192
+
193
+ Three new tabs: **Memory Lifecycle** (retention curves, decay stats), **Compression** (storage savings, precision distribution), and **Patterns** (auto-learned soft prompts, consolidation history). Seven new API endpoints power the new views.
194
+
195
+ ### Enable V3.3 Features
196
+
197
+ All new features default OFF. Zero breaking changes. Opt in when ready:
198
+
199
+ ```bash
200
+ # Turn on adaptive memory lifecycle
201
+ slm config set lifecycle.enabled true
202
+
203
+ # Turn on smart compression
204
+ slm config set quantization.enabled true
205
+
206
+ # Turn on cognitive consolidation
207
+ slm config set consolidation.cognitive.enabled true
208
+
209
+ # Turn on pattern learning (soft prompts)
210
+ slm config set soft_prompts.enabled true
211
+
212
+ # Turn on Hopfield retrieval (6th channel)
213
+ slm config set retrieval.hopfield.enabled true
214
+
215
+ # Or enable everything at once
216
+ slm config set v33_features.all true
217
+ ```
218
+
219
+ **Fully backward compatible.** All existing MCP tools, CLI commands, and configs work unchanged. New tables are created automatically on first run. No migration needed.
220
+
221
+ ---
222
+
223
+ <details>
224
+ <summary><strong>What's New in V3.2 — The Living Brain</strong> (click to expand)</summary>
225
+
226
+ 100x faster recall (<10ms at 10K facts), automatic memory surfacing, associative retrieval (5th channel), temporal intelligence with bi-temporal validity, sleep-time consolidation, and core memory blocks. All features default OFF, zero breaking changes.
227
+
228
+ | Metric | V3.0 | V3.2 | Change |
229
+ |:-------|:----:|:----:|:------:|
230
+ | Recall latency (10K facts) | ~500ms | <10ms | **100x faster** |
231
+ | Retrieval channels | 4 | 5 | +spreading activation |
232
+ | MCP tools | 24 | 29 | +5 new |
233
+ | DB tables | 9 | 18 | +9 new |
234
+
235
+ Enable with `slm config set v32_features.all true`. See the [V3.2 Overview](https://github.com/qualixar/superlocalmemory/wiki/V3.2-Overview) wiki page for details.
236
+
237
+ </details>
238
+
239
+ ---
240
+
241
+ ## Quick Start
242
+
243
+ ### Install via npm (recommended)
244
+
245
+ ```bash
246
+ npm install -g superlocalmemory
247
+ slm setup # Choose mode (A/B/C)
248
+ slm doctor # Verify everything is working
249
+ slm warmup # Pre-download embedding model (~500MB, optional)
250
+ ```
251
+
252
+ ### Install via pip
253
+
254
+ ```bash
255
+ pip install superlocalmemory
256
+ ```
257
+
258
+ ### First Use
259
+
260
+ ```bash
261
+ slm remember "Alice works at Google as a Staff Engineer"
262
+ slm recall "What does Alice do?"
263
+ slm status
264
+ ```
265
+
266
+ ### MCP Integration (Claude, Cursor, Windsurf, VS Code, etc.)
267
+
268
+ ```json
269
+ {
270
+ "mcpServers": {
271
+ "superlocalmemory": {
272
+ "command": "slm",
273
+ "args": ["mcp"]
274
+ }
275
+ }
276
+ }
277
+ ```
278
+
279
+ 35 MCP tools + 7 resources available. Works with Claude Code, Cursor, Windsurf, VS Code Copilot, Continue, Cody, ChatGPT Desktop, Gemini CLI, JetBrains, Zed, and 17+ AI tools. **V3.3: Adaptive lifecycle, smart compression, and pattern learning.**
280
+
281
+ ### Dual Interface: MCP + CLI
282
+
283
+ SLM works everywhere -- from IDEs to CI pipelines to Docker containers. The only AI memory system with both MCP and agent-native CLI.
284
+
285
+ | Need | Use | Example |
286
+ |------|-----|---------|
287
+ | IDE integration | MCP | Auto-configured for 17+ IDEs via `slm connect` |
288
+ | Shell scripts | CLI + `--json` | `slm recall "auth" --json \| jq '.data.results[0]'` |
289
+ | CI/CD pipelines | CLI + `--json` | `slm remember "deployed v2.1" --json` in GitHub Actions |
290
+ | Agent frameworks | CLI + `--json` | OpenClaw, Codex, Goose, nanobot |
291
+ | Human use | CLI | `slm recall "auth"` (readable text output) |
292
+
293
+ **Agent-native JSON output** on every command:
294
+
295
+ ```bash
296
+ # Human-readable (default)
297
+ slm recall "database schema"
298
+ # 1. [0.87] Database uses PostgreSQL 16 on port 5432...
299
+
300
+ # Agent-native JSON
301
+ slm recall "database schema" --json
302
+ # {"success": true, "command": "recall", "version": "3.0.22", "data": {"results": [...]}}
303
+ ```
304
+
305
+ All `--json` responses follow a consistent envelope with `success`, `command`, `version`, `data`, and `next_actions` for agent guidance.
306
+
307
+ ---
308
+
309
+ ## Three Operating Modes
310
+
311
+ | Mode | What | Cloud? | EU AI Act | Best For |
312
+ |:----:|:-----|:------:|:---------:|:---------|
313
+ | **A** | Local Guardian | **None** | **Compliant** | Privacy-first, air-gapped, enterprise |
314
+ | **B** | Smart Local | Local only (Ollama) | Compliant | Better answers, data stays local |
315
+ | **C** | Full Power | Cloud LLM | Partial | Maximum accuracy, research |
316
+
317
+ ```bash
318
+ slm mode a # Zero-cloud (default)
319
+ slm mode b # Local Ollama
320
+ slm mode c # Cloud LLM
321
+ ```
322
+
323
+ **Mode A** is the only agent memory that operates with **zero cloud dependency** while achieving competitive retrieval accuracy on a standard benchmark. All data stays on your device. No API keys. No GPU. Runs on 2 vCPUs + 4GB RAM.
324
+
325
+ ---
326
+
327
+ ## Architecture
328
+
329
+ ```
330
+ Query ──► Strategy Classifier ──► 6 Parallel Channels:
331
+ ├── Semantic (Fisher-Rao geodesic distance)
332
+ ├── BM25 (keyword matching)
333
+ ├── Entity Graph (spreading activation, 3 hops)
334
+ ├── Temporal (date-aware retrieval)
335
+ ├── Associative (multi-hop spreading activation)
336
+ └── Hopfield (partial query completion)
337
+
338
+ RRF Fusion (k=60)
339
+
340
+ Scene Expansion + Bridge Discovery
341
+
342
+ Cross-Encoder Reranking
343
+
344
+ ◄── Top-K Results with channel scores
345
+ ```
346
+
347
+ ### Mathematical Foundations
348
+
349
+ Three novel contributions replace cloud LLM dependency with mathematical guarantees:
350
+
351
+ 1. **Fisher-Rao Retrieval Metric** — Similarity scoring derived from the Fisher information structure of diagonal Gaussian families. Graduated ramp from cosine to geodesic distance over the first 10 accesses. The first application of information geometry to agent memory retrieval.
352
+
353
+ 2. **Sheaf Cohomology for Consistency** — Algebraic topology detects contradictions by computing coboundary norms on the knowledge graph. The first algebraic guarantee for contradiction detection in agent memory.
354
+
355
+ 3. **Riemannian Langevin Lifecycle** — Memory positions evolve on the Poincare ball via discretized Langevin SDE. Frequently accessed memories stay active; neglected memories self-archive. No hardcoded thresholds.
356
+
357
+ These three layers collectively yield **+12.7pp average improvement** over the engineering-only baseline, with the Fisher metric alone contributing **+10.8pp** on the hardest conversations.
358
+
359
+ ---
360
+
361
+ ## Benchmarks
362
+
363
+ Evaluated on [LoCoMo](https://arxiv.org/abs/2402.09714) — 10 multi-session conversations, 1,986 total questions, 4 scored categories.
364
+
365
+ ### Mode A (Zero-Cloud, 10 Conversations, 1,276 Questions)
366
+
367
+ | Category | Score | vs. Mem0 (64.2%) |
368
+ |:---------|:-----:|:-----------------:|
369
+ | Single-Hop | 72.0% | +3.0pp |
370
+ | Multi-Hop | 70.3% | +8.6pp |
371
+ | Temporal | 80.0% | +21.7pp |
372
+ | **Open-Domain** | **85.0%** | **+35.0pp** |
373
+ | **Aggregate** | **74.8%** | **+10.6pp** |
374
+
375
+ Mode A achieves **85.0% on open-domain questions — the highest of any system in the evaluation**, including cloud-powered ones.
376
+
377
+ ### Math Layer Impact (6 Conversations, n=832)
378
+
379
+ | Conversation | With Math | Without | Delta |
380
+ |:-------------|:---------:|:-------:|:-----:|
381
+ | Easiest | 78.5% | 71.2% | +7.3pp |
382
+ | Hardest | 64.2% | 44.3% | **+19.9pp** |
383
+ | **Average** | **71.7%** | **58.9%** | **+12.7pp** |
384
+
385
+ Mathematical layers help most where heuristic methods struggle — the harder the conversation, the bigger the improvement.
386
+
387
+ ### Ablation (What Each Component Contributes)
388
+
389
+ | Removed | Impact |
390
+ |:--------|:------:|
391
+ | Cross-encoder reranking | **-30.7pp** |
392
+ | Fisher-Rao metric | **-10.8pp** |
393
+ | All math layers | **-7.6pp** |
394
+ | BM25 channel | **-6.5pp** |
395
+ | Sheaf consistency | -1.7pp |
396
+ | Entity graph | -1.0pp |
397
+
398
+ Full ablation details in the [Wiki](https://github.com/qualixar/superlocalmemory/wiki/Benchmarks).
399
+
400
+ ---
401
+
402
+ ## EU AI Act Compliance
403
+
404
+ The EU AI Act (Regulation 2024/1689) takes full effect **August 2, 2026**. Every AI memory system that sends personal data to cloud LLMs for core operations has a compliance question to answer.
405
+
406
+ | Requirement | Mode A | Mode B | Mode C |
407
+ |:------------|:------:|:------:|:------:|
408
+ | Data sovereignty (Art. 10) | **Pass** | **Pass** | Requires DPA |
409
+ | Right to erasure (GDPR Art. 17) | **Pass** | **Pass** | **Pass** |
410
+ | Transparency (Art. 13) | **Pass** | **Pass** | **Pass** |
411
+ | No network calls during memory ops | **Yes** | **Yes** | No |
412
+
413
+ To the best of our knowledge, **no existing agent memory system addresses EU AI Act compliance**. Modes A and B pass all checks by architectural design — no personal data leaves the device during any memory operation.
414
+
415
+ Built-in compliance tools: GDPR Article 15/17 export + complete erasure, tamper-proof SHA-256 audit chain, data provenance tracking, ABAC policy enforcement.
416
+
417
+ ---
418
+
419
+ ## Web Dashboard
420
+
421
+ ```bash
422
+ slm dashboard # Opens at http://localhost:8765
423
+ ```
424
+
425
+ **v3.4.4 "Neural Glass":** 21-tab sidebar dashboard with light + dark theme. Knowledge Graph (Sigma.js WebGL, community detection), Health Monitor, Entity Explorer (1,300+ entities), Mesh Peers (P2P agent communication), Ingestion Status (Gmail/Calendar/Transcript management), Privacy blur mode. Always-on daemon with auto-start. 8 mesh MCP tools built-in. Cross-platform: macOS + Windows + Linux. All data stays local.
426
+
427
+ ---
428
+
429
+ <details>
430
+ <summary><strong>Active Memory (V3.1) — Memory That Learns</strong> (click to expand)</summary>
431
+
432
+ Every recall generates learning signals. Over time, the system adapts to your patterns — from baseline (0-19 signals) → rule-based (20+) → ML model (200+, LightGBM trained on YOUR usage). Zero LLM tokens spent. Four mathematical signals computed locally: co-retrieval, confidence lifecycle, channel performance, and entropy gap.
433
+
434
+ Auto-capture hooks: `slm hooks install` + `slm observe` + `slm session-context`. MCP tools: `session_init`, `observe`, `report_feedback`.
435
+
436
+ **No competitor learns at zero token cost.**
437
+
438
+ </details>
439
+
440
+ ---
441
+
442
+ ## Features
443
+
444
+ ### Retrieval
445
+ - 6-channel hybrid: Semantic (Fisher-Rao) + BM25 + Entity Graph + Temporal + Associative + Hopfield
446
+ - RRF fusion + cross-encoder reranking
447
+ - Agentic sufficiency verification (auto-retry on weak results)
448
+ - Adaptive ranking with LightGBM (learns from usage)
449
+ - Hopfield completion for vague/partial queries
450
+
451
+ ### Intelligence
452
+ - 11-step ingestion pipeline (entity resolution, fact extraction, emotional tagging, scene building)
453
+ - Automatic contradiction detection via sheaf cohomology
454
+ - Adaptive memory lifecycle — memories strengthen with use, fade when neglected
455
+ - Smart compression — embedding precision adapts to memory importance (up to 32x savings)
456
+ - Cognitive consolidation — automatic pattern extraction from related memories
457
+ - Auto-learned soft prompts injected into agent context
458
+ - Behavioral pattern detection and outcome tracking
459
+
460
+ ### Skill Evolution (NEW in v3.4.10)
461
+ - **Per-skill performance tracking** — automatically tracks which skills succeed and which fail, across sessions (zero-LLM, always on)
462
+ - **Execution trace analysis** — mines tool usage patterns around skill invocations to determine effectiveness
463
+ - **Skill entities in Entity Explorer** — each skill becomes a browsable entity with performance facts and evolution history
464
+ - **Dedicated Skill Evolution dashboard tab** — overview cards, performance assertions, skill correlations
465
+ - **Behavioral assertions for skill routing** — soft prompts recommend high-performing skills in future sessions
466
+ - **LLM-powered skill evolution** — 3-trigger system (post-session + degradation + health check) with blind verification. **Off by default** — opt-in via `slm config set evolution.enabled true`. Supports Ollama (free, local), Anthropic API, and OpenAI API backends.
467
+ - **ECC integration** — enhanced observation support with [Everything Claude Code](https://github.com/affaan-m/everything-claude-code) via `slm ingest --source ecc`
468
+ - **IDE compatibility:** Skill tracking currently works with Claude Code. The `/api/v3/tool-event` endpoint accepts events from any IDE client — adapters for other IDEs in future releases.
469
+
470
+ ### Trust & Security
471
+ - Bayesian Beta-distribution trust scoring (per-agent, per-fact)
472
+ - Trust gates (block low-trust agents from writing/deleting)
473
+ - ABAC (Attribute-Based Access Control) with DB-persisted policies
474
+ - Tamper-proof hash-chain audit trail (SHA-256 linked entries)
475
+
476
+ ### Infrastructure
477
+ - 23-tab web dashboard with real-time visualization
478
+ - 17+ IDE integrations (Claude, Cursor, Windsurf, VS Code, JetBrains, Zed, etc.)
479
+ - 35 MCP tools + 7 MCP resources
480
+ - Profile isolation (independent memory spaces)
481
+ - 1400+ tests, AGPL v3, cross-platform (Mac/Linux/Windows)
482
+ - CPU-only — no GPU required
483
+ - Automatic orphaned process cleanup
484
+
485
+ ---
486
+
487
+ ## CLI Reference
488
+
489
+ | Command | What It Does |
490
+ |:--------|:-------------|
491
+ | `slm remember "..."` | Store a memory |
492
+ | `slm recall "..."` | Search memories |
493
+ | `slm forget "..."` | Delete matching memories |
494
+ | `slm trace "..."` | Recall with per-channel score breakdown |
495
+ | `slm status` | System status |
496
+ | `slm health` | Math layer health (Fisher, Sheaf, Langevin) |
497
+ | `slm doctor` | Pre-flight check (deps, worker, Ollama, database) |
498
+ | `slm mode a/b/c` | Switch operating mode |
499
+ | `slm setup` | Interactive first-time wizard |
500
+ | `slm warmup` | Pre-download embedding model |
501
+ | `slm migrate` | V2 to V3 migration |
502
+ | `slm dashboard` | Launch 17-tab web dashboard |
503
+ | `slm mcp` | Start MCP server (for IDE integration) |
504
+ | `slm connect` | Configure IDE integrations |
505
+ | `slm hooks install` | Wire auto-memory into Claude Code hooks |
506
+ | `slm profile list/create/switch` | Profile management |
507
+ | `slm decay` | Run memory lifecycle review |
508
+ | `slm quantize` | Run smart compression cycle |
509
+ | `slm consolidate --cognitive` | Extract patterns from memory clusters |
510
+ | `slm soft-prompts` | View auto-learned patterns |
511
+ | `slm reap` | Clean orphaned SLM processes |
512
+
513
+ ---
514
+
515
+ ## Research Papers
516
+
517
+ SuperLocalMemory is backed by three peer-reviewed research papers covering trust, information geometry, and cognitive memory architecture.
518
+
519
+ ### Paper 3: The Living Brain (V3.3)
520
+ > **SuperLocalMemory V3.3: The Living Brain — Biologically-Inspired Forgetting, Cognitive Quantization, and Multi-Channel Retrieval for Zero-LLM Agent Memory Systems**
521
+ > Varun Pratap Bhardwaj (2026)
522
+ > [arXiv:2604.04514](https://arxiv.org/abs/2604.04514) · [Zenodo DOI: 10.5281/zenodo.19435120](https://zenodo.org/records/19435120)
523
+
524
+ ### Paper 2: Information-Geometric Foundations (V3)
525
+ > **SuperLocalMemory V3: Information-Geometric Foundations for Zero-LLM Enterprise Agent Memory**
526
+ > Varun Pratap Bhardwaj (2026)
527
+ > [arXiv:2603.14588](https://arxiv.org/abs/2603.14588) · [Zenodo DOI: 10.5281/zenodo.19038659](https://zenodo.org/records/19038659)
528
+
529
+ ### Paper 1: Trust & Behavioral Foundations (V2)
530
+ > **SuperLocalMemory: A Structured Local Memory Architecture for Persistent AI Agent Context**
531
+ > Varun Pratap Bhardwaj (2026)
532
+ > [arXiv:2603.02240](https://arxiv.org/abs/2603.02240) · [Zenodo DOI: 10.5281/zenodo.18709670](https://zenodo.org/records/18709670)
533
+
534
+ ### Cite This Work
535
+
536
+ ```bibtex
537
+ @article{bhardwaj2026slmv33,
538
+ title={SuperLocalMemory V3.3: The Living Brain — Biologically-Inspired
539
+ Forgetting, Cognitive Quantization, and Multi-Channel Retrieval
540
+ for Zero-LLM Agent Memory Systems},
541
+ author={Bhardwaj, Varun Pratap},
542
+ journal={arXiv preprint arXiv:2604.04514},
543
+ year={2026},
544
+ url={https://arxiv.org/abs/2604.04514}
545
+ }
546
+
547
+ @article{bhardwaj2026slmv3,
548
+ title={Information-Geometric Foundations for Zero-LLM Enterprise Agent Memory},
549
+ author={Bhardwaj, Varun Pratap},
550
+ journal={arXiv preprint arXiv:2603.14588},
551
+ year={2026}
552
+ }
553
+
554
+ @article{bhardwaj2026slm,
555
+ title={A Structured Local Memory Architecture for Persistent AI Agent Context},
556
+ author={Bhardwaj, Varun Pratap},
557
+ journal={arXiv preprint arXiv:2603.02240},
558
+ year={2026}
559
+ }
560
+ ```
561
+
562
+ ---
563
+
564
+ ## Prerequisites
565
+
566
+ | Requirement | Version | Why |
567
+ |:-----------|:--------|:----|
568
+ | **Node.js** | 14+ | npm package manager |
569
+ | **Python** | 3.11+ | V3 engine runtime |
570
+
571
+ All Python dependencies install automatically during `npm install` — core math, dashboard server, learning engine, and performance optimizations. If anything fails, the installer shows exact fix commands. Run `slm doctor` after install to verify everything works. BM25 keyword search works even without embeddings — you're never fully blocked.
572
+
573
+ | Component | Size | When |
574
+ |:----------|:-----|:-----|
575
+ | Core libraries (numpy, scipy, networkx) | ~50MB | During install |
576
+ | Dashboard & MCP server (fastapi, uvicorn) | ~20MB | During install |
577
+ | Learning engine (lightgbm) | ~10MB | During install |
578
+ | Search engine (sentence-transformers, torch) | ~200MB | During install |
579
+ | Embedding model (nomic-embed-text-v1.5, 768d) | ~500MB | First use or `slm warmup` |
580
+ | **Mode B** requires [Ollama](https://ollama.com) + a model (`ollama pull llama3.2`) | ~2GB | Manual |
581
+
582
+ ---
583
+
584
+ ## Contributing
585
+
586
+ See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines. [Wiki](https://github.com/qualixar/superlocalmemory/wiki) for detailed documentation.
587
+
588
+ ## License
589
+
590
+ GNU Affero General Public License v3.0 (AGPL-3.0). See [LICENSE](LICENSE).
591
+
592
+ For commercial licensing (closed-source, proprietary, or hosted use), see [COMMERCIAL-LICENSE.md](COMMERCIAL-LICENSE.md) or contact varun.pratap.bhardwaj@gmail.com.
593
+
594
+ Copyright (c) 2026 Varun Pratap Bhardwaj / Qualixar.
595
+
596
+ ## Attribution
597
+
598
+ Part of [Qualixar](https://qualixar.com) · Author: [Varun Pratap Bhardwaj](https://varunpratap.com)
599
+
600
+ ### Acknowledgments
601
+
602
+ - **[Everything Claude Code (ECC)](https://github.com/affaan-m/everything-claude-code)** — SLM's skill observation patterns were inspired by ECC's continuous learning architecture. SLM supports direct ingestion of ECC observations via `slm ingest --source ecc`, giving ECC users richer skill performance tracking. We recommend ECC for Claude Code users who want the deepest learning experience alongside SLM.
603
+ - **[HKUDS/OpenSpace](https://github.com/HKUDS/OpenSpace)** — The skill evolution research in SLM draws from the EvoSkills co-evolutionary verification concepts (arXiv:2604.01687). We adopted their 3-trigger evolution system and anti-loop guard patterns.
604
+
605
+ ---
606
+
607
+ <p align="center">
608
+ <sub>Built with mathematical rigor. Not in the race — here to help everyone build better AI memory systems.</sub>
609
+ </p>