superlocalmemory 3.4.38 → 3.4.40

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.
@@ -1,663 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: superlocalmemory
3
- Version: 3.4.38
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
- Requires-Dist: portalocker<4.0.0,>=2.7.0
52
- Requires-Dist: sentence-transformers[onnx]>=5.0.0
53
- Requires-Dist: torch>=2.2.0
54
- Requires-Dist: scikit-learn<2.0.0,>=1.3.0
55
- Provides-Extra: search
56
- Requires-Dist: sentence-transformers[onnx]>=5.0.0; extra == "search"
57
- Requires-Dist: einops>=0.8.2; extra == "search"
58
- Requires-Dist: torch>=2.2.0; extra == "search"
59
- Requires-Dist: scikit-learn<2.0.0,>=1.3.0; extra == "search"
60
- Requires-Dist: geoopt>=0.5.0; extra == "search"
61
- Requires-Dist: onnxruntime>=1.17.0; extra == "search"
62
- Provides-Extra: ui
63
- Requires-Dist: fastapi[all]>=0.135.1; extra == "ui"
64
- Requires-Dist: uvicorn>=0.42.0; extra == "ui"
65
- Requires-Dist: python-multipart<1.0.0,>=0.0.6; extra == "ui"
66
- Provides-Extra: learning
67
- Requires-Dist: lightgbm>=4.0.0; extra == "learning"
68
- Provides-Extra: performance
69
- Requires-Dist: diskcache>=5.6.0; extra == "performance"
70
- Requires-Dist: orjson>=3.9.0; extra == "performance"
71
- Provides-Extra: ingestion
72
- Requires-Dist: keyring>=25.0.0; extra == "ingestion"
73
- Requires-Dist: google-auth-oauthlib>=1.2.0; extra == "ingestion"
74
- Requires-Dist: google-api-python-client>=2.100.0; extra == "ingestion"
75
- Requires-Dist: icalendar>=6.0.0; extra == "ingestion"
76
- Provides-Extra: full
77
- Requires-Dist: superlocalmemory[ingestion,learning,performance,search,ui]; extra == "full"
78
- Provides-Extra: dev
79
- Requires-Dist: pytest>=8.0; extra == "dev"
80
- Requires-Dist: pytest-cov>=4.1; extra == "dev"
81
- Requires-Dist: sqlite-vec>=0.1.6; extra == "dev"
82
- Dynamic: license-file
83
-
84
- <p align="center">
85
- <img src="https://superlocalmemory.com/assets/logo-mark.png" alt="SuperLocalMemory" width="200"/>
86
- </p>
87
-
88
- <h1 align="center">SuperLocalMemory V3.4</h1>
89
- <p align="center"><strong>Every other AI forgets. Yours won't.</strong><br/><em>Infinite memory for Claude Code, Cursor, Windsurf, and any MCP-compatible AI client.</em></p>
90
- <p align="center"><code>v3.4.25</code> — Install once. Every session remembers the last. Automatically.</p>
91
- <p align="center"><strong>Backed by 3 published research papers</strong> (arXiv preprints + Zenodo-archived) · <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>
92
-
93
- <p align="center">
94
- <code>+10.6pp vs Mem0 zero-LLM</code> &nbsp;·&nbsp; <code>85% Open-Domain (best zero-LLM score)</code> &nbsp;·&nbsp; <code>EU AI Act Ready</code>
95
- </p>
96
-
97
- <p align="center">
98
- <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>
99
- <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>
100
- <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>
101
- <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>
102
- <a href="#eu-ai-act-compliance"><img src="https://img.shields.io/badge/EU_AI_Act-Design_Compliant-brightgreen?style=for-the-badge" alt="EU AI Act Design Compliant"/></a>
103
- <a href="https://superlocalmemory.com"><img src="https://img.shields.io/badge/Web-superlocalmemory.com-ff6b35?style=for-the-badge" alt="Website"/></a>
104
- <a href="#dual-interface-mcp--cli"><img src="https://img.shields.io/badge/MCP-Native-blue?style=for-the-badge" alt="MCP Native"/></a>
105
- <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>
106
- <a href="#multilingual-embedding-support"><img src="https://img.shields.io/badge/Multilingual-30%2B_Languages-ff69b4?style=for-the-badge" alt="Multilingual 30+ Languages"/></a>
107
- </p>
108
-
109
- <p align="center">
110
- <video src="https://github.com/user-attachments/assets/c3b54a1d-f62a-4ea7-bba7-900435e7b3ab" width="800" autoplay loop muted playsinline></video>
111
- </p>
112
-
113
- ---
114
-
115
- ## Why SuperLocalMemory?
116
-
117
- Every **hosted** AI memory platform — Mem0 Cloud, Zep Cloud, Letta Cloud, EverMemOS Cloud — sends your data to cloud LLMs by default. Their self-hosted variants exist (Mem0 OpenMemory, Letta self-hosted, Graphiti) but require Docker + a separate graph DB or Ollama config, and most still default to OpenAI until you flip env vars. After **August 2, 2026**, any of those cloud paths becomes a compliance problem under the EU AI Act.
118
-
119
- 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 ships local-first out of the box — no Docker, no graph DB, no API keys — on CPU.
120
-
121
- **The numbers** (evaluated on [LoCoMo](https://arxiv.org/abs/2402.09714), the standard long-conversation memory benchmark). Published numbers as of April 2026:
122
-
123
- | System | Score | Config | Cloud LLM required? | Open Source | Source |
124
- |:-------|:-----:|:-------|:-------------------:|:-----------:|:-------|
125
- | EverMemOS | 93.05% | Cloud (proprietary) | Yes | Core only | [evermind.ai](https://evermind.ai/) (Feb 2026) |
126
- | Hindsight (LoComo10) | 92.0% | Cloud | Yes | No | [benchmarks.hindsight.vectorize.io](https://benchmarks.hindsight.vectorize.io) (Apr 2026) |
127
- | Mem0 (token-efficient) | 91.6% | Hybrid (Cohere/OpenAI) | Yes | Partial | [mem0.ai blog](https://mem0.ai/blog/mem0-the-token-efficient-memory-algorithm) (Apr 16 2026) |
128
- | **SLM V3 Mode C** | **87.7%** | Local + optional LLM | Optional (Ollama OK) | **Yes (AGPL-3.0)** | In-house, repro script in `docs/benchmarks/` |
129
- | Zep v3 Cloud | 85.2% | Cloud | Yes | Community deprecated | [getzep.com](https://www.getzep.com/) |
130
- | **SLM V3 Mode A** | **74.8%** | **Local, CPU-only, zero-LLM** | **No** | **Yes (AGPL-3.0)** | In-house, repro script in `docs/benchmarks/` |
131
- | Mem0 (zero-retrieval-LLM) | 64.2% | Local baseline | No | Partial | Mem0 paper, zero-LLM row |
132
-
133
- > **How to read this table.** Scores from different papers use different LoCoMo splits, judge models, and prompt variants. We do NOT claim these numbers are apples-to-apples across rows. The rows we re-ran in-house are marked "In-house"; cited rows link to the vendor's public source and date. Mode A is the only zero-LLM configuration in the list, so the comparison that is apples-to-apples is **Mode A 74.8% vs Mem0 zero-retrieval-LLM 64.2%** (+10.6pp). Mem0's 91.6% and EverMemOS's 93.05% use cloud LLMs; Mode C uses a local LLM (Ollama). BEAM-10M, the emerging successor benchmark, will be added in a future release.
134
-
135
- **What Mode A is**: CPU-only, SQLite-only, zero-LLM retrieval pipeline on published LoCoMo questions. To the best of our knowledge it is the only publicly-released local-first memory that clears Mem0's zero-LLM baseline on this benchmark. If another fully-local system hits similar numbers, please open an issue so we can update the table.
136
-
137
- 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.
138
-
139
- > **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.
140
-
141
- ---
142
-
143
- <details>
144
- <summary><strong>What's New in V3.3 — The Living Brain Evolves</strong> (click to expand)</summary>
145
-
146
- > 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.
147
-
148
- ### Features at a Glance
149
-
150
- - **Adaptive Memory Lifecycle** — memories naturally strengthen with use and fade when neglected. No manual cleanup, no hardcoded TTLs.
151
- - **Smart Compression** — embedding precision adapts to memory importance. Low-priority memories compress up to 32x. High-value memories stay full-resolution.
152
- - **Cognitive Consolidation** — the system automatically extracts patterns from clusters of related memories. One decision referenced 50 times becomes one reusable insight.
153
- - **Pattern Learning** — auto-learned soft prompts injected into your agent's context at session start. The system teaches itself what matters to you.
154
- - **Hopfield Retrieval (6th Channel)** — vague or partial queries now complete themselves. Ask half a question, get the whole answer.
155
- - **Process Health** — orphaned SLM processes detected and cleaned automatically. No more zombie workers eating RAM.
156
-
157
- ### New CLI Commands
158
-
159
- ```bash
160
- # Run a memory lifecycle review — strengthens active memories, archives neglected ones
161
- slm decay
162
-
163
- # Run smart compression — adapts embedding precision to memory importance
164
- slm quantize
165
-
166
- # Extract reusable patterns from memory clusters
167
- slm consolidate --cognitive
168
-
169
- # View auto-learned patterns that get injected into agent context
170
- slm soft-prompts
171
-
172
- # Clean up orphaned SLM processes
173
- slm reap
174
- ```
175
-
176
- ### New MCP Tools
177
-
178
- | Tool | Description |
179
- |:-----|:------------|
180
- | `forget` | Programmatic memory archival via lifecycle rules |
181
- | `quantize` | Trigger smart compression on demand |
182
- | `consolidate_cognitive` | Extract and store patterns from memory clusters |
183
- | `get_soft_prompts` | Retrieve auto-learned patterns for context injection |
184
- | `reap_processes` | Clean orphaned SLM processes |
185
- | `get_retention_stats` | Memory lifecycle analytics |
186
-
187
- ### Mode A/B Memory Improvements
188
-
189
- | Metric | V3.2 | V3.3 | Change |
190
- |:-------|:----:|:----:|:------:|
191
- | RAM usage (Mode A/B) | ~4GB | ~40MB | **100x reduction** |
192
- | Retrieval channels | 5 | 6 | +Hopfield completion |
193
- | MCP tools (default) | 29 | 33 | +4 new (mesh set) |
194
- | CLI commands | 21 | 26 | +5 new |
195
- | Dashboard tabs | 17 | 17 | (H-22: Reward / Shadow / EvolutionCost tiles deferred to next cycle — data exposed via API today, see [DASHBOARD-COVERAGE.md](docs/DASHBOARD-COVERAGE.md)) |
196
- | API endpoints | 9 | 16 | +7 new |
197
-
198
- Embedding migration happens automatically when you switch modes — no manual steps needed.
199
-
200
- ### Dashboard
201
-
202
- 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.
203
-
204
- ### Enable V3.3 Features
205
-
206
- All new features default OFF. Zero breaking changes. Opt in when ready:
207
-
208
- ```bash
209
- # Turn on adaptive memory lifecycle
210
- slm config set lifecycle.enabled true
211
-
212
- # Turn on smart compression
213
- slm config set quantization.enabled true
214
-
215
- # Turn on cognitive consolidation
216
- slm config set consolidation.cognitive.enabled true
217
-
218
- # Turn on pattern learning (soft prompts)
219
- slm config set soft_prompts.enabled true
220
-
221
- # Turn on Hopfield retrieval (6th channel)
222
- slm config set retrieval.hopfield.enabled true
223
-
224
- # Or enable everything at once
225
- slm config set v33_features.all true
226
- ```
227
-
228
- **Fully backward compatible.** All existing MCP tools, CLI commands, and configs work unchanged. New tables are created automatically on first run. No migration needed.
229
-
230
- </details>
231
-
232
- ---
233
-
234
- <details>
235
- <summary><strong>What's New in V3.2 — The Living Brain</strong> (click to expand)</summary>
236
-
237
- 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.
238
-
239
- | Metric | V3.0 | V3.2 | Change |
240
- |:-------|:----:|:----:|:------:|
241
- | Recall latency (10K facts) | ~500ms | <10ms | **100x faster** |
242
- | Retrieval channels | 4 | 5 | +spreading activation |
243
- | MCP tools | 24 | 29 | +5 new |
244
- | DB tables | 9 | 18 | +9 new |
245
-
246
- 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.
247
-
248
- </details>
249
-
250
- ---
251
-
252
- ## Quick Start
253
-
254
- ### Install via npm (recommended)
255
-
256
- ```bash
257
- npm install -g superlocalmemory
258
- slm setup # Choose mode (A/B/C)
259
- slm doctor # Verify everything is working
260
- slm warmup # Pre-download embedding model (~500MB, optional)
261
- ```
262
-
263
- ### Install via pip
264
-
265
- ```bash
266
- pip install superlocalmemory
267
- ```
268
-
269
- ### First Use
270
-
271
- ```bash
272
- slm remember "Alice works at Google as a Staff Engineer"
273
- slm recall "What does Alice do?"
274
- slm status
275
- ```
276
-
277
- ### MCP Integration (Claude, Cursor, Windsurf, VS Code, etc.)
278
-
279
- ```json
280
- {
281
- "mcpServers": {
282
- "superlocalmemory": {
283
- "command": "slm",
284
- "args": ["mcp"]
285
- }
286
- }
287
- }
288
- ```
289
-
290
- 33 MCP tools by default (+42 optional behind `SLM_MCP_ALL_TOOLS=1`) + 7 resources. Works with any MCP-compatible client — we ship templated configs for Claude Code, Cursor, Windsurf, VS Code Copilot, Continue, Cody, ChatGPT Desktop, Gemini CLI, JetBrains, Zed, and Antigravity (15 IDE configs in `ide/configs/`). **V3.3: Adaptive lifecycle, smart compression, and pattern learning.**
291
-
292
- ### Dual Interface: MCP + CLI
293
-
294
- SLM works everywhere — from IDEs to CI pipelines to Docker containers. Both the MCP server and the agent-native CLI are first-class, so the same backend serves IDE-side integrations and scripted automations.
295
-
296
- | Need | Use | Example |
297
- |------|-----|---------|
298
- | IDE integration | MCP | Auto-configured for 17+ IDEs via `slm connect` |
299
- | Shell scripts | CLI + `--json` | `slm recall "auth" --json \| jq '.data.results[0]'` |
300
- | CI/CD pipelines | CLI + `--json` | `slm remember "deployed v2.1" --json` in GitHub Actions |
301
- | Agent frameworks | CLI + `--json` | OpenClaw, Codex, Goose, nanobot |
302
- | Human use | CLI | `slm recall "auth"` (readable text output) |
303
-
304
- **Agent-native JSON output** on every command:
305
-
306
- ```bash
307
- # Human-readable (default)
308
- slm recall "database schema"
309
- # 1. [0.87] Database uses PostgreSQL 16 on port 5432...
310
-
311
- # Agent-native JSON
312
- slm recall "database schema" --json
313
- # {"success": true, "command": "recall", "version": "3.0.22", "data": {"results": [...]}}
314
- ```
315
-
316
- All `--json` responses follow a consistent envelope with `success`, `command`, `version`, `data`, and `next_actions` for agent guidance.
317
-
318
- ---
319
-
320
- ## Three Operating Modes
321
-
322
- | Mode | What | Cloud? | EU AI Act | Best For |
323
- |:----:|:-----|:------:|:---------:|:---------|
324
- | **A** | Local Guardian | **None** | **Compliant** | Privacy-first, air-gapped, enterprise |
325
- | **B** | Smart Local | Local only (Ollama) | Compliant | Better answers, data stays local |
326
- | **C** | Full Power | Cloud LLM | Partial | Maximum accuracy, research |
327
-
328
- ```bash
329
- slm mode a # Zero-cloud (default)
330
- slm mode b # Local Ollama
331
- slm mode c # Cloud LLM
332
- ```
333
-
334
- **Mode A** is, to the best of our knowledge, the only publicly-released agent memory that runs with zero cloud calls while clearing Mem0's published LoCoMo score. All data stays on your device. No API keys. No GPU. Runs on 2 vCPUs + 4GB RAM. If another fully-local system hits similar numbers, please open an issue — we'll update this line.
335
-
336
- ---
337
-
338
- ## Architecture
339
-
340
- ```
341
- Query ──► Strategy Classifier ──► 5 Parallel Channels:
342
- ├── Semantic (Fisher-Rao geodesic distance)
343
- ├── BM25 (keyword matching)
344
- ├── Entity Graph (spreading activation, 3 hops)
345
- ├── Temporal (date-aware retrieval)
346
- └── Hopfield (partial-query completion / associative recall)
347
-
348
- RRF Fusion (k=60)
349
-
350
- Scene Expansion + Bridge Discovery
351
-
352
- Cross-Encoder Reranking
353
-
354
- ◄── Top-K Results with channel scores
355
- ```
356
-
357
- ### Mathematical Foundations
358
-
359
- Three novel contributions replace cloud LLM dependency with mathematical guarantees:
360
-
361
- 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. To the best of our knowledge, the first public application of information geometry specifically to agent memory retrieval — if prior work exists please open an issue so we can credit it.
362
-
363
- 2. **Sheaf Cohomology for Consistency** — Algebraic topology detects contradictions by computing coboundary norms on the knowledge graph. We are not aware of a prior production agent-memory system that computes sheaf-cohomology coboundary norms this way; corrections welcome.
364
-
365
- 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.
366
-
367
- 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.
368
-
369
- ---
370
-
371
- ## Benchmarks
372
-
373
- Evaluated on [LoCoMo](https://arxiv.org/abs/2402.09714) — 10 multi-session conversations, 1,986 total questions, 4 scored categories.
374
-
375
- ### Mode A (Zero-Cloud, 10 Conversations, 1,276 Questions)
376
-
377
- | Category | Score | vs. Mem0 (64.2%) |
378
- |:---------|:-----:|:-----------------:|
379
- | Single-Hop | 72.0% | +3.0pp |
380
- | Multi-Hop | 70.3% | +8.6pp |
381
- | Temporal | 80.0% | +21.7pp |
382
- | **Open-Domain** | **85.0%** | **+35.0pp** |
383
- | **Aggregate** | **74.8%** | **+10.6pp** |
384
-
385
- Mode A achieves **85.0% on open-domain questions — the highest of any system in the evaluation**, including cloud-powered ones.
386
-
387
- ### Math Layer Impact (6 Conversations, n=832)
388
-
389
- | Conversation | With Math | Without | Delta |
390
- |:-------------|:---------:|:-------:|:-----:|
391
- | Easiest | 78.5% | 71.2% | +7.3pp |
392
- | Hardest | 64.2% | 44.3% | **+19.9pp** |
393
- | **Average** | **71.7%** | **58.9%** | **+12.7pp** |
394
-
395
- Mathematical layers help most where heuristic methods struggle — the harder the conversation, the bigger the improvement.
396
-
397
- ### Ablation (What Each Component Contributes)
398
-
399
- | Removed | Impact |
400
- |:--------|:------:|
401
- | Cross-encoder reranking | **-30.7pp** |
402
- | Fisher-Rao metric | **-10.8pp** |
403
- | All math layers | **-7.6pp** |
404
- | BM25 channel | **-6.5pp** |
405
- | Sheaf consistency | -1.7pp |
406
- | Entity graph | -1.0pp |
407
-
408
- Full ablation details in the [Wiki](https://github.com/qualixar/superlocalmemory/wiki/Benchmarks).
409
-
410
- ---
411
-
412
- ## EU AI Act Compliance
413
-
414
- 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.
415
-
416
- | Requirement | Mode A | Mode B | Mode C |
417
- |:------------|:------:|:------:|:------:|
418
- | Data sovereignty (Art. 10) | **Pass** | **Pass** | Requires DPA |
419
- | Right to erasure (GDPR Art. 17) | **Pass** | **Pass** | **Pass** |
420
- | Transparency (Art. 13) | **Pass** | **Pass** | **Pass** |
421
- | No network calls during memory ops | **Yes** | **Yes** | No |
422
-
423
- 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.
424
-
425
- Built-in compliance tools: GDPR Article 15/17 export + complete erasure, tamper-proof SHA-256 audit chain, data provenance tracking, ABAC policy enforcement.
426
-
427
- ---
428
-
429
- ## Multilingual Embedding Support
430
-
431
- **v3.4.24+:** Plug in any OpenAI-compatible embedding endpoint — Ollama, vLLM, LiteLLM, or self-hosted models like `bge-m3`, `multilingual-e5`, `Qwen3-Embedding`. Configure from the dashboard (Settings > Step 3) or `config.json`. SLM's math layer (Fisher-Rao, Sheaf, Langevin) is language-agnostic — swap the embedding model and all 30+ languages work at full retrieval quality. No cloud dependency. No code changes. Your data, your language, your model.
432
-
433
- ---
434
-
435
- ## Web Dashboard
436
-
437
- ```bash
438
- slm dashboard # Opens at http://localhost:8765
439
- ```
440
-
441
- **v3.4.4 "Neural Glass":** 17-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.
442
-
443
- <!-- UX-M1: link dashboard-coverage so users can find deferred Living Brain Evolution tiles -->
444
- > **Living Brain Evolution visibility:** v3.4.21 ships the reward model, shadow test + online retrain, and evolution cost log via the REST API and `slm status --json`; the dedicated dashboard tiles are deferred to the next cycle. See [docs/DASHBOARD-COVERAGE.md](docs/DASHBOARD-COVERAGE.md) for endpoints and workarounds.
445
-
446
- ---
447
-
448
- <details>
449
- <summary><strong>Active Memory (V3.1) — Memory That Learns</strong> (click to expand)</summary>
450
-
451
- 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.
452
-
453
- Auto-capture hooks: `slm hooks install` + `slm observe` + `slm session-context`. MCP tools: `session_init`, `observe`, `report_feedback`.
454
-
455
- **No competitor learns at zero token cost.**
456
-
457
- </details>
458
-
459
- ---
460
-
461
- ## Features
462
-
463
- ### Retrieval
464
- - 5-channel hybrid: Semantic (Fisher-Rao) + BM25 + Entity Graph + Temporal + Hopfield (associative / partial-query completion)
465
- - RRF fusion + cross-encoder reranking
466
- - Agentic sufficiency verification (auto-retry on weak results)
467
- - Adaptive ranking with LightGBM (learns from usage)
468
- - Hopfield completion for vague/partial queries
469
-
470
- ### Intelligence
471
- - 11-step ingestion pipeline (entity resolution, fact extraction, emotional tagging, scene building)
472
- - Automatic contradiction detection via sheaf cohomology
473
- - Adaptive memory lifecycle — memories strengthen with use, fade when neglected
474
- - Smart compression — embedding precision adapts to memory importance (up to 32x savings)
475
- - Cognitive consolidation — automatic pattern extraction from related memories
476
- - Auto-learned soft prompts injected into agent context
477
- - Behavioral pattern detection and outcome tracking
478
-
479
- ### Skill Evolution
480
- - **Per-skill performance tracking** — tracks which skills succeed and fail across sessions (zero-LLM, always on)
481
- - **Evolution engine** — 3-trigger system with blind verification. Off by default — enable via `slm config set evolution.enabled true`
482
- - **MCP tools** — `evolve_skill`, `skill_health`, `skill_lineage` for programmatic access
483
- - **Lineage DAG** — visual evolution history in the dashboard
484
- - **CLI config** — `slm config get/set` for all evolution settings
485
- - **Post-session triggers** — automatic analysis on session end via Stop hook
486
- - **[ECC](https://github.com/affaan-m/everything-claude-code) integration** — optional enhanced observations via `slm ingest --source ecc`
487
-
488
- ### Tiered Storage & Scaling
489
- - **4-tier lifecycle** — active, warm, cold, archived with automatic promotion/demotion
490
- - **Deep recall** — archived facts searchable at reduced weight
491
- - **Graph pruning** — automatic cleanup of orphan edges, self-loops, duplicates
492
- - **Fact consolidation** — clusters related facts into consolidated summaries
493
-
494
- ### Trust & Security
495
- - Bayesian Beta-distribution trust scoring (per-agent, per-fact)
496
- - Trust gates (block low-trust agents from writing/deleting)
497
- - ABAC (Attribute-Based Access Control) with DB-persisted policies
498
- - Tamper-proof hash-chain audit trail (SHA-256 linked entries)
499
-
500
- ### Infrastructure
501
- - 17-tab web dashboard with real-time visualization
502
- - 17+ IDE integrations (Claude, Cursor, Windsurf, VS Code, JetBrains, Zed, etc.)
503
- - 33 default MCP tools (+42 optional via `SLM_MCP_ALL_TOOLS=1`) + 7 MCP resources
504
- - Profile isolation (independent memory spaces)
505
- - 2,900+ tests, AGPL v3, cross-platform (Mac/Linux/Windows)
506
- - CPU-only — no GPU required
507
- - Automatic orphaned process cleanup
508
-
509
- ---
510
-
511
- ## CLI Reference
512
-
513
- | Command | What It Does |
514
- |:--------|:-------------|
515
- | `slm remember "..."` | Store a memory |
516
- | `slm recall "..."` | Search memories |
517
- | `slm forget "..."` | Delete matching memories |
518
- | `slm trace "..."` | Recall with per-channel score breakdown |
519
- | `slm status` | System status |
520
- | `slm health` | Math layer health (Fisher, Sheaf, Langevin) |
521
- | `slm doctor` | Pre-flight check (deps, worker, Ollama, database) |
522
- | `slm mode a/b/c` | Switch operating mode |
523
- | `slm setup` | Interactive first-time wizard |
524
- | `slm warmup` | Pre-download embedding model |
525
- | `slm migrate` | V2 to V3 migration |
526
- | `slm dashboard` | Launch 17-tab web dashboard |
527
- | `slm mcp` | Start MCP server (for IDE integration) |
528
- | `slm connect` | Configure IDE integrations |
529
- | `slm hooks install` | Wire auto-memory into Claude Code hooks |
530
- | `slm profile list/create/switch` | Profile management |
531
- | `slm decay` | Run memory lifecycle review |
532
- | `slm quantize` | Run smart compression cycle |
533
- | `slm consolidate --cognitive` | Extract patterns from memory clusters |
534
- | `slm soft-prompts` | View auto-learned patterns |
535
- | `slm reap` | Clean orphaned SLM processes |
536
-
537
- ---
538
-
539
- ## Research Papers
540
-
541
- SuperLocalMemory is backed by three published research papers (arXiv preprints + Zenodo DOIs) covering trust, information geometry, and cognitive memory architecture. These are preprints — not conference-accepted or journal-published yet.
542
-
543
- ### Paper 3: The Living Brain (V3.3)
544
- > **SuperLocalMemory V3.3: The Living Brain — Biologically-Inspired Forgetting, Cognitive Quantization, and Multi-Channel Retrieval for Zero-LLM Agent Memory Systems**
545
- > Varun Pratap Bhardwaj (2026)
546
- > [arXiv:2604.04514](https://arxiv.org/abs/2604.04514) · [Zenodo DOI: 10.5281/zenodo.19435120](https://zenodo.org/records/19435120)
547
-
548
- ### Paper 2: Information-Geometric Foundations (V3)
549
- > **SuperLocalMemory V3: Information-Geometric Foundations for Zero-LLM Enterprise Agent Memory**
550
- > Varun Pratap Bhardwaj (2026)
551
- > [arXiv:2603.14588](https://arxiv.org/abs/2603.14588) · [Zenodo DOI: 10.5281/zenodo.19038659](https://zenodo.org/records/19038659)
552
-
553
- ### Paper 1: Trust & Behavioral Foundations (V2)
554
- > **SuperLocalMemory: A Structured Local Memory Architecture for Persistent AI Agent Context**
555
- > Varun Pratap Bhardwaj (2026)
556
- > [arXiv:2603.02240](https://arxiv.org/abs/2603.02240) · [Zenodo DOI: 10.5281/zenodo.18709670](https://zenodo.org/records/18709670)
557
-
558
- ### Cite This Work
559
-
560
- ```bibtex
561
- @article{bhardwaj2026slmv33,
562
- title={SuperLocalMemory V3.3: The Living Brain — Biologically-Inspired
563
- Forgetting, Cognitive Quantization, and Multi-Channel Retrieval
564
- for Zero-LLM Agent Memory Systems},
565
- author={Bhardwaj, Varun Pratap},
566
- journal={arXiv preprint arXiv:2604.04514},
567
- year={2026},
568
- url={https://arxiv.org/abs/2604.04514}
569
- }
570
-
571
- @article{bhardwaj2026slmv3,
572
- title={Information-Geometric Foundations for Zero-LLM Enterprise Agent Memory},
573
- author={Bhardwaj, Varun Pratap},
574
- journal={arXiv preprint arXiv:2603.14588},
575
- year={2026}
576
- }
577
-
578
- @article{bhardwaj2026slm,
579
- title={A Structured Local Memory Architecture for Persistent AI Agent Context},
580
- author={Bhardwaj, Varun Pratap},
581
- journal={arXiv preprint arXiv:2603.02240},
582
- year={2026}
583
- }
584
- ```
585
-
586
- ---
587
-
588
- ## Prerequisites
589
-
590
- | Requirement | Version | Why |
591
- |:-----------|:--------|:----|
592
- | **Node.js** | 14+ | npm package manager |
593
- | **Python** | 3.11+ | V3 engine runtime |
594
-
595
- 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.
596
-
597
- | Component | Size | When |
598
- |:----------|:-----|:-----|
599
- | Core libraries (numpy, scipy, networkx) | ~50MB | During install |
600
- | Dashboard & MCP server (fastapi, uvicorn) | ~20MB | During install |
601
- | Learning engine (lightgbm) | ~10MB | During install |
602
- | Search engine (sentence-transformers, torch) | ~200MB | During install |
603
- | Embedding model (nomic-embed-text-v1.5, 768d) | ~500MB | First use or `slm warmup` |
604
- | **Mode B** requires [Ollama](https://ollama.com) + a model (`ollama pull llama3.2`) | ~2GB | Manual |
605
-
606
- ---
607
-
608
- ## Contributing
609
-
610
- See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines. [Wiki](https://github.com/qualixar/superlocalmemory/wiki) for detailed documentation.
611
-
612
- ## License
613
-
614
- GNU Affero General Public License v3.0 (AGPL-3.0). See [LICENSE](LICENSE).
615
-
616
- For commercial licensing (closed-source, proprietary, or hosted use), see [COMMERCIAL-LICENSE.md](COMMERCIAL-LICENSE.md) or contact varun.pratap.bhardwaj@gmail.com.
617
-
618
- Copyright (c) 2026 Varun Pratap Bhardwaj / Qualixar.
619
-
620
- ## Attribution
621
-
622
- Part of [Qualixar](https://qualixar.com) · Author: [Varun Pratap Bhardwaj](https://varunpratap.com)
623
-
624
- ### Acknowledgments
625
-
626
- - **[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.
627
- - **[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.
628
-
629
- ---
630
-
631
- <p align="center">
632
- <sub>Built with mathematical rigor. Not in the race — here to help everyone build better AI memory systems.</sub>
633
- </p>
634
-
635
- ---
636
-
637
- ## ⭐ Support This Project
638
-
639
- If this project solves a real problem for you, **please star the repo** — it helps other developers discover Qualixar and signals that the AI agent reliability community is growing. Every star matters.
640
-
641
- [![Star History Chart](https://api.star-history.com/svg?repos=qualixar/superlocalmemory&type=Date)](https://star-history.com/#qualixar/superlocalmemory&Date)
642
-
643
- ---
644
-
645
- ## Part of the Qualixar AI Agent Reliability Platform
646
-
647
- Qualixar is building the open-source infrastructure for AI agent reliability engineering. Seven products, seven research papers (published as arXiv preprints + Zenodo archives), one coherent platform. Each tool solves one reliability pillar:
648
-
649
- | Product | Purpose | Install | Paper |
650
- |---------|---------|---------|-------|
651
- | **[SuperLocalMemory](https://github.com/qualixar/superlocalmemory)** | Persistent memory + learning for AI agents | `npx superlocalmemory` | [arXiv:2604.04514](https://arxiv.org/abs/2604.04514) |
652
- | **[Qualixar OS](https://github.com/qualixar/qualixar-os)** | Universal agent runtime (13 execution topologies) | `npx qualixar-os` | [arXiv:2604.06392](https://arxiv.org/abs/2604.06392) |
653
- | **[SLM Mesh](https://github.com/qualixar/slm-mesh)** | P2P coordination across AI agent sessions | `npm i slm-mesh` | — |
654
- | **[SLM MCP Hub](https://github.com/qualixar/slm-mcp-hub)** | Federate 430+ MCP tools through one gateway | `pip install slm-mcp-hub` | — |
655
- | **[AgentAssay](https://github.com/qualixar/agentassay)** | Token-efficient AI agent testing | `pip install agentassay` | [arXiv:2603.02601](https://arxiv.org/abs/2603.02601) |
656
- | **[AgentAssert](https://github.com/qualixar/agentassert-abc)** | Behavioral contracts + drift detection | `pip install agentassert-abc` | [arXiv:2602.22302](https://arxiv.org/abs/2602.22302) |
657
- | **[SkillFortify](https://github.com/qualixar/skillfortify)** | Formal verification for AI agent skills | `pip install skillfortify` | [arXiv:2603.00195](https://arxiv.org/abs/2603.00195) |
658
-
659
- **Zero cloud dependency. Local-first. EU AI Act compliant.**
660
-
661
- Start here → **[qualixar.com](https://qualixar.com)** · [All papers on Qualixar HuggingFace](https://huggingface.co/Qualixar)
662
-
663
- ---