superlocalmemory 3.6.13 → 3.6.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +17 -0
- package/CHANGELOG.md +28 -0
- package/README.md +189 -740
- package/package.json +12 -5
- package/plugin/.claude-plugin/plugin.json +20 -0
- package/plugin/.mcp.json +12 -0
- package/plugin/CLAUDE.md +44 -0
- package/plugin/_GENERATED.md +6 -0
- package/plugin/agents/slm-memory-advisor.md +44 -0
- package/plugin/agents/slm-optimize-advisor.md +38 -0
- package/plugin/hooks/hooks.json +14 -0
- package/plugin/requirements.txt +1 -0
- package/plugin/scripts/ensure-venv.bat +122 -0
- package/plugin/scripts/ensure-venv.sh +105 -0
- package/plugin/scripts/slm-launch +15 -0
- package/plugin/scripts/slm-launch.bat +17 -0
- package/plugin/settings.json +16 -0
- package/plugin/skills/slm-cache/SKILL.md +140 -0
- package/plugin/skills/slm-compress/SKILL.md +143 -0
- package/plugin/skills/slm-graph/SKILL.md +300 -0
- package/plugin/skills/slm-recall/SKILL.md +204 -0
- package/plugin/skills/slm-remember/SKILL.md +194 -0
- package/plugin/skills/slm-session/SKILL.md +207 -0
- package/plugin/skills/slm-status/SKILL.md +149 -0
- package/plugin-src/.mcp.json +12 -0
- package/plugin-src/agents/slm-memory-advisor.md +44 -0
- package/plugin-src/agents/slm-optimize-advisor.md +38 -0
- package/plugin-src/commands/slm-optimize.md +22 -0
- package/plugin-src/commands/slm-recall.md +16 -0
- package/plugin-src/commands/slm-remember.md +16 -0
- package/plugin-src/commands/slm-status.md +15 -0
- package/plugin-src/hooks/.gitkeep +0 -0
- package/plugin-src/hooks/hooks.json +14 -0
- package/plugin-src/manifest.json +25 -0
- package/plugin-src/requirements.txt +1 -0
- package/plugin-src/rules/AGENTS.md +91 -0
- package/plugin-src/rules/CLAUDE.md.fragment +44 -0
- package/plugin-src/scripts/ensure-venv.bat +122 -0
- package/plugin-src/scripts/ensure-venv.sh +105 -0
- package/plugin-src/scripts/slm-launch +15 -0
- package/plugin-src/scripts/slm-launch.bat +17 -0
- package/plugin-src/settings.json +16 -0
- package/plugin-src/skills/slm-cache/SKILL.md +140 -0
- package/plugin-src/skills/slm-compress/SKILL.md +143 -0
- package/plugin-src/skills/slm-graph/SKILL.md +300 -0
- package/plugin-src/skills/slm-recall/SKILL.md +204 -0
- package/plugin-src/skills/slm-remember/SKILL.md +194 -0
- package/plugin-src/skills/slm-session/SKILL.md +207 -0
- package/plugin-src/skills/slm-status/SKILL.md +149 -0
- package/pyproject.toml +6 -2
- package/scripts/__tests__/build-plugin.test.mjs +613 -0
- package/scripts/_savings_math.py +270 -0
- package/scripts/build-plugin.js +742 -0
- package/scripts/dogfood_savings.py +490 -0
- package/scripts/install-skills.ps1 +4 -334
- package/scripts/install-skills.sh +4 -435
- package/scripts/postinstall-interactive.js +0 -27
- package/scripts/postinstall.js +21 -2
- package/src/superlocalmemory/__init__.py +1 -1
- package/src/superlocalmemory/cli/_lazy_init.py +115 -0
- package/src/superlocalmemory/cli/commands.py +439 -41
- package/src/superlocalmemory/cli/main.py +92 -4
- package/src/superlocalmemory/cli/setup_wizard.py +47 -6
- package/src/superlocalmemory/core/backend_orchestrator.py +12 -8
- package/src/superlocalmemory/core/config.py +194 -9
- package/src/superlocalmemory/core/embeddings.py +10 -5
- package/src/superlocalmemory/core/engine.py +76 -5
- package/src/superlocalmemory/core/fact_consolidator.py +20 -3
- package/src/superlocalmemory/core/platform_utils.py +8 -0
- package/src/superlocalmemory/core/recall_pipeline.py +7 -0
- package/src/superlocalmemory/core/recall_worker.py +7 -0
- package/src/superlocalmemory/core/store_pipeline.py +23 -1
- package/src/superlocalmemory/core/worker_pool.py +14 -2
- package/src/superlocalmemory/hooks/claude_code_hooks.py +27 -3
- package/src/superlocalmemory/hooks/portable_kit.py +506 -0
- package/src/superlocalmemory/hooks/session_registry.py +8 -4
- package/src/superlocalmemory/infra/cloud_backup.py +99 -23
- package/src/superlocalmemory/mcp/_daemon_proxy.py +12 -2
- package/src/superlocalmemory/mcp/_pool_adapter.py +15 -6
- package/src/superlocalmemory/mcp/cli_fallback.py +602 -0
- package/src/superlocalmemory/mcp/server.py +75 -4
- package/src/superlocalmemory/mcp/tools_code_graph.py +3 -3
- package/src/superlocalmemory/mcp/tools_core.py +37 -4
- package/src/superlocalmemory/mcp/tools_v3.py +6 -1
- package/src/superlocalmemory/mcp/tools_v33.py +8 -4
- package/src/superlocalmemory/optimize/cache/boundary_store.py +25 -6
- package/src/superlocalmemory/optimize/cache/centroid_store.py +27 -4
- package/src/superlocalmemory/optimize/cache/manager.py +92 -6
- package/src/superlocalmemory/optimize/cache/semantic.py +20 -1
- package/src/superlocalmemory/optimize/compress/ccr.py +12 -0
- package/src/superlocalmemory/optimize/compress/router.py +46 -13
- package/src/superlocalmemory/optimize/config/schema.py +6 -0
- package/src/superlocalmemory/optimize/proxy/_helpers.py +111 -8
- package/src/superlocalmemory/optimize/proxy/anthropic_surface.py +14 -4
- package/src/superlocalmemory/optimize/proxy/gemini_surface.py +23 -6
- package/src/superlocalmemory/optimize/proxy/openai_surface.py +10 -4
- package/src/superlocalmemory/optimize/proxy/server.py +11 -0
- package/src/superlocalmemory/optimize/proxy/vertex_surface.py +246 -0
- package/src/superlocalmemory/optimize/storage/db.py +30 -0
- package/src/superlocalmemory/retrieval/bm25_channel.py +12 -2
- package/src/superlocalmemory/retrieval/engine.py +36 -3
- package/src/superlocalmemory/retrieval/entity_channel.py +5 -5
- package/src/superlocalmemory/retrieval/hopfield_channel.py +10 -2
- package/src/superlocalmemory/retrieval/semantic_channel.py +10 -2
- package/src/superlocalmemory/server/recall_serializer.py +3 -1
- package/src/superlocalmemory/server/unified_daemon.py +156 -16
- package/src/superlocalmemory/storage/database.py +215 -43
- package/src/superlocalmemory/storage/migration_runner.py +17 -1
- package/src/superlocalmemory/storage/migrations/M016_add_scope_support.py +120 -0
- package/src/superlocalmemory/storage/models.py +10 -0
- package/src/superlocalmemory/storage/schema.py +15 -10
- package/src/superlocalmemory/ui/css/legacy-dashboard.css +18 -0
- package/src/superlocalmemory/ui/css/neural-glass.css +5 -0
- package/src/superlocalmemory/ui/index.html +2 -2
- package/src/superlocalmemory/ui/js/core.js +98 -0
- package/src/superlocalmemory/ui/js/dashboard.js +8 -1
- package/src/superlocalmemory/ui/js/ide-status.js +16 -3
- package/src/superlocalmemory/ui/js/math-health.js +15 -3
- package/src/superlocalmemory/ui/js/optimize.js +18 -2
- package/src/superlocalmemory/ui/js/trust-dashboard.js +10 -1
- package/src/superlocalmemory.egg-info/PKG-INFO +191 -741
- package/src/superlocalmemory.egg-info/SOURCES.txt +7 -9
- package/src/superlocalmemory.egg-info/requires.txt +1 -0
- package/ide/skills/slm-build-graph/SKILL.md +0 -423
- package/ide/skills/slm-list-recent/SKILL.md +0 -348
- package/ide/skills/slm-recall/SKILL.md +0 -326
- package/ide/skills/slm-remember/SKILL.md +0 -194
- package/ide/skills/slm-show-patterns/SKILL.md +0 -224
- package/ide/skills/slm-status/SKILL.md +0 -363
- package/ide/skills/slm-switch-profile/SKILL.md +0 -442
- package/skills/slm-build-graph/SKILL.md +0 -423
- package/skills/slm-list-recent/SKILL.md +0 -348
- package/skills/slm-optimize/README.md +0 -55
- package/skills/slm-optimize/SKILL.md +0 -139
- package/skills/slm-recall/SKILL.md +0 -343
- package/skills/slm-remember/SKILL.md +0 -194
- package/skills/slm-show-patterns/SKILL.md +0 -224
- package/skills/slm-status/SKILL.md +0 -363
- package/skills/slm-switch-profile/SKILL.md +0 -442
- package/src/superlocalmemory/cli/doctor_cmd.py +0 -152
- package/src/superlocalmemory/skills/slm-build-graph/SKILL.md +0 -423
- package/src/superlocalmemory/skills/slm-list-recent/SKILL.md +0 -348
- package/src/superlocalmemory/skills/slm-recall/SKILL.md +0 -343
- package/src/superlocalmemory/skills/slm-remember/SKILL.md +0 -194
- package/src/superlocalmemory/skills/slm-show-patterns/SKILL.md +0 -224
- package/src/superlocalmemory/skills/slm-status/SKILL.md +0 -363
- package/src/superlocalmemory/skills/slm-switch-profile/SKILL.md +0 -442
package/README.md
CHANGED
|
@@ -2,14 +2,12 @@
|
|
|
2
2
|
<img src="https://superlocalmemory.com/assets/logo-mark.png" alt="SuperLocalMemory" width="200"/>
|
|
3
3
|
</p>
|
|
4
4
|
|
|
5
|
-
<h1 align="center">SuperLocalMemory V3.6.
|
|
6
|
-
<p align="center"><strong>Cache. Compress. Remember. Three surfaces — proxy, MCP tools, or skill. Every setup covered.</strong><br
|
|
7
|
-
<
|
|
8
|
-
<p align="center"><
|
|
9
|
-
|
|
10
|
-
<p align="center">
|
|
11
|
-
<code>Proxy · MCP tools · Skill — three surfaces</code> · <code>+10.6pp vs Mem0 zero-LLM</code> · <code>85% Open-Domain (best zero-LLM score)</code> · <code>EU AI Act Ready</code>
|
|
12
|
-
</p>
|
|
5
|
+
<h1 align="center">SuperLocalMemory V3.6.15</h1>
|
|
6
|
+
<p align="center"><strong>Cache. Compress. Remember. Three surfaces — proxy, MCP tools, or skill. Every setup covered.</strong><br/>
|
|
7
|
+
<em>To the best of our knowledge, the only zero-cloud agent memory that beats Mem0's zero-LLM score on LoCoMo. Mode A: 74.8% vs Mem0 64.2% — no GPU, no API key, on CPU.</em></p>
|
|
8
|
+
<p align="center"><code>v3.6.15</code> — <strong>Plugin-native. Profile-aware. Distributed-ready.</strong><br/>
|
|
9
|
+
Proxy: <code>slm wrap claude</code> · MCP: add <code>slm_compress</code> to your config · Skill: zero-config</p>
|
|
10
|
+
<p align="center"><strong>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>
|
|
13
11
|
|
|
14
12
|
<p align="center">
|
|
15
13
|
<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>
|
|
@@ -24,489 +22,220 @@
|
|
|
24
22
|
<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>
|
|
25
23
|
</p>
|
|
26
24
|
|
|
27
|
-
<p align="center">
|
|
28
|
-
<video src="https://github.com/user-attachments/assets/c3b54a1d-f62a-4ea7-bba7-900435e7b3ab" width="800" autoplay loop muted playsinline></video>
|
|
29
|
-
</p>
|
|
30
|
-
|
|
31
25
|
---
|
|
32
26
|
|
|
33
|
-
|
|
34
|
-
<summary><strong>What's New in V3.6 — Optimize: SKIP, SHRINK, DISCOUNT, REMEMBER</strong> (click to expand)</summary>
|
|
27
|
+
## Why SuperLocalMemory?
|
|
35
28
|
|
|
36
|
-
|
|
37
|
-
>
|
|
38
|
-
> **v3.6.12 "Distributed-ready":** Run SLM on a server and reach it across your LAN. `SLM_REMOTE=1` (default off) lets the dashboard load from a remote browser, lets MCP gateways/hubs forward tool calls, and makes custom local LLM endpoints (llama.cpp / LM Studio / Azure) configurable right from the dashboard — plus a batch of stability and security fixes. See [`docs/distributed-deployment.md`](docs/distributed-deployment.md).
|
|
39
|
-
>
|
|
40
|
-
> **v3.6.11 "Optimize Everywhere":** Three surfaces. **Proxy** (Surface A) — full-turn cache + compress on transport; needs `ANTHROPIC_BASE_URL`, shrinks the context window. **MCP tools** (Surface B) — `slm_compress`, `slm_retrieve`, `slm_cache_set`, `slm_cache_get`, `slm_optimize_stats`; no proxy, no window shrink, works on any Claude subscription. **Skill** (Surface C) — `slm-optimize` installs in `~/.claude/skills/`; zero-config auto-compress for large tool outputs and CLAUDE.md. No proxy, full 1M window. [See Three Surfaces →](#three-surfaces-proxy--mcp-tools--skill)
|
|
41
|
-
>
|
|
42
|
-
> **v3.6.10:** cache and compression are now **independent runtime switches** (cache-only, compress-only, both, or neither — toggle live from the dashboard, no restart). Compression was rebuilt to be **lossless by default** (the old string/array/code truncation is gone); aggressive mode adds LLMLingua-2 for **prose only** — never code, numbers, structured data, or the current turn.
|
|
29
|
+
Every hosted AI memory platform — Mem0 Cloud, Zep Cloud, Letta Cloud, EverMemOS Cloud — sends your data to cloud LLMs by default. Self-hosted variants exist but require Docker, a separate graph DB, or Ollama config, and most default to OpenAI until you flip env vars. After **August 2, 2026**, any of those cloud paths becomes a compliance question under the EU AI Act.
|
|
43
30
|
|
|
44
|
-
|
|
31
|
+
SuperLocalMemory V3 uses **mathematics instead of cloud compute** — differential geometry, algebraic topology, and stochastic analysis replace the work other systems need LLMs to do. Local-first out of the box. No Docker. No graph DB. No API keys. CPU-only.
|
|
45
32
|
|
|
46
|
-
|
|
47
|
-
|-------|-----------|:------:|:---------------:|
|
|
48
|
-
| **Cache** | Skip repeat calls — exact-match SQLite lookup (zero false hits), vCache-gated semantic (opt-in) | **100% on a hit** (input + output) | Cache ON, Semantic OFF |
|
|
49
|
-
| **Compress** | Shrink prompts — **safe = lossless** normalization; **aggressive = LLMLingua-2 prose only** (opt-in) | Safe: small + lossless · Aggressive: large on prose | Safe mode, Aggressive OFF |
|
|
50
|
-
| **Align** | Stabilize prefix — maximize provider prefix-cache discounts | **Lossless extra** | ON when compression is ON |
|
|
33
|
+
**Benchmark results** (evaluated on [LoCoMo](https://arxiv.org/abs/2402.09714), the standard long-conversation memory benchmark, published April 2026):
|
|
51
34
|
|
|
52
|
-
|
|
35
|
+
| System | Score | Config | Cloud LLM required? | Open Source | Source |
|
|
36
|
+
|:-------|:-----:|:-------|:-------------------:|:-----------:|:-------|
|
|
37
|
+
| EverMemOS | 93.05% | Cloud (proprietary) | Yes | Core only | [evermind.ai](https://evermind.ai/) (Feb 2026) |
|
|
38
|
+
| Hindsight (LoComo10) | 92.0% | Cloud | Yes | No | [benchmarks.hindsight.vectorize.io](https://benchmarks.hindsight.vectorize.io) (Apr 2026) |
|
|
39
|
+
| 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) |
|
|
40
|
+
| **SLM V3 Mode C** | **87.7%** | Local + optional LLM | Optional (Ollama OK) | **Yes (AGPL-3.0)** | In-house, [arXiv:2603.14588](https://arxiv.org/abs/2603.14588) |
|
|
41
|
+
| Zep v3 Cloud | 85.2% | Cloud | Yes | Community deprecated | [getzep.com](https://www.getzep.com/) |
|
|
42
|
+
| **SLM V3 Mode A** | **74.8%** | **Local, CPU-only, zero-LLM** | **No** | **Yes (AGPL-3.0)** | In-house, [arXiv:2603.14588](https://arxiv.org/abs/2603.14588) |
|
|
43
|
+
| Mem0 (zero-retrieval-LLM) | 64.2% | Local baseline | No | Partial | Mem0 paper, zero-LLM row |
|
|
53
44
|
|
|
54
|
-
> **
|
|
45
|
+
> **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. Rows marked "In-house" were run by us; cited rows link to the vendor's public source and date. The only apples-to-apples comparison is **Mode A 74.8% vs Mem0 zero-retrieval-LLM 64.2%** (+10.6pp) — both are zero-LLM configurations. Mem0's 91.6% and EverMemOS's 93.05% use cloud LLMs; Mode C uses a local LLM (Ollama).
|
|
55
46
|
|
|
56
|
-
|
|
47
|
+
**What Mode A is:** CPU-only, SQLite-only, zero-LLM retrieval 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 this table.
|
|
57
48
|
|
|
58
|
-
|
|
59
|
-
# One command to start saving
|
|
60
|
-
slm wrap claude
|
|
61
|
-
# Your first repeat prompt → CACHE HIT → $0.00
|
|
62
|
-
# Your first long prompt → COMPRESSED 70% → $0.00 per token saved
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
### New CLI Commands (6 total)
|
|
49
|
+
Mathematical layers contribute **+12.7 percentage points** average across 6 conversations (n=832 questions), with up to **+19.9pp on the most challenging dialogues**.
|
|
66
50
|
|
|
67
|
-
|
|
68
|
-
|:--------|:-------------|
|
|
69
|
-
| `slm optimize status\|on\|off\|savings` | Master Optimize control + savings report (USD/INR/tokens) |
|
|
70
|
-
| `slm cache status\|clear\|invalidate\|ttl\|semantic` | Cache sub-control — exact + semantic tiers |
|
|
71
|
-
| `slm compress status\|mode\|prose` | Compression control — safe (lossless) / aggressive (LLMLingua-2 prose) |
|
|
72
|
-
| `slm proxy [--port] [--provider]` | Start the interception proxy (port 8765) |
|
|
73
|
-
| `slm wrap <agent>` | Proxy-activate an agent — one command to start saving |
|
|
74
|
-
| `slm help-optimize [topic]` | Full developer reference + per-agent setup recipes |
|
|
75
|
-
|
|
76
|
-
### Savings Dashboard
|
|
51
|
+
---
|
|
77
52
|
|
|
78
|
-
|
|
53
|
+
## Quick Start
|
|
79
54
|
|
|
80
55
|
```bash
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
#
|
|
84
|
-
#
|
|
85
|
-
# Estimated savings: ~$2.30 (at $3.00/M tokens — Anthropic rates)
|
|
56
|
+
# npm (recommended)
|
|
57
|
+
npm install -g superlocalmemory
|
|
58
|
+
slm setup # Choose mode (A/B/C)
|
|
59
|
+
slm doctor # Verify everything is working
|
|
86
60
|
```
|
|
87
61
|
|
|
88
|
-
### Enable / Disable
|
|
89
|
-
|
|
90
62
|
```bash
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
slm
|
|
94
|
-
slm
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
**Safety defaults:** Optimize ON. Safe mode ON (extractive only — lossless, production-safe). Semantic OFF. Aggressive OFF. No behavior change until you explicitly enable features.
|
|
98
|
-
|
|
99
|
-
### How It Works
|
|
100
|
-
|
|
101
|
-
```
|
|
102
|
-
Your App → Proxy/SDK/Wrap → Cache Check → HIT → Return Cached (0 tokens)
|
|
103
|
-
|
|
|
104
|
-
MISS
|
|
105
|
-
|
|
|
106
|
-
Compress → Provider → Store in Cache
|
|
107
|
-
60-95% + Align
|
|
63
|
+
# pip
|
|
64
|
+
pip install superlocalmemory
|
|
65
|
+
slm setup
|
|
66
|
+
slm doctor
|
|
108
67
|
```
|
|
109
68
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
Full docs:
|
|
117
|
-
- [Optimize Product Overview](docs/optimize-overview.md)
|
|
118
|
-
- [Optimize CLI Reference](docs/optimize-cli.md)
|
|
119
|
-
- [Optimize Config Reference](docs/optimize-config.md)
|
|
120
|
-
- [Wiki: V3.6 Overview](https://github.com/qualixar/superlocalmemory/wiki/V3.6-Overview)
|
|
121
|
-
- [Website: v3.6 Optimize](https://superlocalmemory.com/optimize)
|
|
122
|
-
|
|
123
|
-
</details>
|
|
124
|
-
|
|
125
|
-
---
|
|
126
|
-
|
|
127
|
-
## Three Surfaces: Proxy · MCP Tools · Skill
|
|
128
|
-
|
|
129
|
-
v3.6.11 delivers one engine across **three ways in** — choose the surface that fits your setup:
|
|
130
|
-
|
|
131
|
-
| Surface | How you use it | Requires proxy? | Window effect | Cache scope |
|
|
132
|
-
|---------|---------------|:---------------:|:-------------:|-------------|
|
|
133
|
-
| **A — Proxy** | `slm wrap claude` or `ANTHROPIC_BASE_URL=http://127.0.0.1:8765` | **Yes** | Shrinks (proxy intercepts full context) | Full-turn cache — every Claude call |
|
|
134
|
-
| **B — MCP tools** | Add 5 tools to MCP config; call `slm_compress`, `slm_cache_set/get` | **No** | **Preserved** (full 1M) | Results you explicitly route through SLM |
|
|
135
|
-
| **C — Skill** | Copy `skills/slm-optimize/SKILL.md` → `~/.claude/skills/` | **No** | **Preserved** (full 1M) | Auto-applied by the agent per skill rules |
|
|
136
|
-
|
|
137
|
-
**How to choose:**
|
|
138
|
-
- On a **metered API** (pay-per-token) and want to cache every call → **Proxy (A)**
|
|
139
|
-
- On a **Pro/Max/Team subscription** or any plan where you can't or won't run a proxy → **MCP tools (B)** or **Skill (C)**
|
|
140
|
-
- Want zero configuration → **Skill (C)**: install once, auto-compresses CLAUDE.md and large outputs
|
|
141
|
-
- Want agent-controlled caching of repeated file reads and tool outputs → **MCP tools (B)**
|
|
142
|
-
|
|
143
|
-
**The hard constraint:** The primary Claude conversation turn cannot be cached without a proxy — the MCP/skill path caches results you explicitly route through SLM (tool outputs, file reads, sub-model calls).
|
|
144
|
-
|
|
145
|
-
### MCP Tools Setup (Surface B)
|
|
146
|
-
|
|
147
|
-
Add to your `claude_desktop_config.json` or IDE MCP config alongside your existing SLM entry:
|
|
148
|
-
|
|
149
|
-
```json
|
|
150
|
-
{
|
|
151
|
-
"mcpServers": {
|
|
152
|
-
"superlocalmemory": {
|
|
153
|
-
"command": "slm",
|
|
154
|
-
"args": ["mcp"]
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
}
|
|
69
|
+
```bash
|
|
70
|
+
# First use
|
|
71
|
+
slm remember "Alice works at Google as a Staff Engineer"
|
|
72
|
+
slm recall "What does Alice do?"
|
|
73
|
+
slm status
|
|
158
74
|
```
|
|
159
75
|
|
|
160
|
-
The 5 optimize tools (`slm_compress`, `slm_retrieve`, `slm_cache_set`, `slm_cache_get`, `slm_optimize_stats`) are included automatically from v3.6.11+. Verify with `slm_optimize_stats()`.
|
|
161
|
-
|
|
162
|
-
### Skill Setup (Surface C)
|
|
163
|
-
|
|
164
76
|
```bash
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
77
|
+
# Wrap your agent — starts proxy + sets environment + launches agent
|
|
78
|
+
slm wrap claude
|
|
79
|
+
# Your first repeat prompt → CACHE HIT → $0.00
|
|
80
|
+
# See savings: slm optimize savings --since 1
|
|
168
81
|
```
|
|
169
82
|
|
|
170
|
-
|
|
171
|
-
```markdown
|
|
172
|
-
## Context Management
|
|
173
|
-
Use the `slm-optimize` skill to compress large outputs and cache repeated reads.
|
|
174
|
-
```
|
|
83
|
+
**Upgrading:** `pip install -U superlocalmemory && slm restart && slm doctor` — migration is automatic, no data loss.
|
|
175
84
|
|
|
176
85
|
---
|
|
177
86
|
|
|
178
|
-
|
|
179
|
-
<summary><strong>What's New in V3.3 — The Living Brain Evolves</strong> (click to expand)</summary>
|
|
87
|
+
## Three Pillars
|
|
180
88
|
|
|
181
|
-
|
|
89
|
+
### Memory
|
|
182
90
|
|
|
183
|
-
|
|
91
|
+
<a id="dual-interface-mcp--cli"></a>
|
|
184
92
|
|
|
185
|
-
-
|
|
186
|
-
- **Smart Compression** — embedding precision adapts to memory importance. Low-priority memories compress up to 32x. High-value memories stay full-resolution.
|
|
187
|
-
- **Cognitive Consolidation** — the system automatically extracts patterns from clusters of related memories. One decision referenced 50 times becomes one reusable insight.
|
|
188
|
-
- **Pattern Learning** — auto-learned soft prompts injected into your agent's context at session start. The system teaches itself what matters to you.
|
|
189
|
-
- **Hopfield Retrieval (6th Channel)** — vague or partial queries now complete themselves. Ask half a question, get the whole answer.
|
|
190
|
-
- **Process Health** — orphaned SLM processes detected and cleaned automatically. No more zombie workers eating RAM.
|
|
93
|
+
Five-channel hybrid retrieval: Semantic (Fisher-Rao geodesic distance) + BM25 + Entity Graph + Temporal + Hopfield (associative/partial-query completion). RRF fusion, cross-encoder reranking, adaptive LightGBM ranking. All data stays local — SQLite + optional LanceDB/CozoDB.
|
|
191
94
|
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
```bash
|
|
195
|
-
# Run a memory lifecycle review — strengthens active memories, archives neglected ones
|
|
196
|
-
slm decay
|
|
95
|
+
Three mathematical contributions replace cloud LLM dependency:
|
|
197
96
|
|
|
198
|
-
|
|
199
|
-
|
|
97
|
+
1. **Fisher-Rao Retrieval Metric** — similarity scoring from the Fisher information structure of diagonal Gaussian families. To the best of our knowledge, the first public application of information geometry to agent memory retrieval.
|
|
98
|
+
2. **Sheaf Cohomology for Consistency** — algebraic topology detects contradictions via coboundary norms on the knowledge graph.
|
|
99
|
+
3. **Riemannian Langevin Lifecycle** — memory positions evolve on the Poincare ball; neglected memories self-archive, no hardcoded thresholds.
|
|
200
100
|
|
|
201
|
-
|
|
202
|
-
slm consolidate --cognitive
|
|
101
|
+
Auto-capture hooks (`slm hooks install`) fire only on real signals — topic pivot, web call, file edit — never on a timer. Fail-open, <10ms p99 hot path.
|
|
203
102
|
|
|
204
|
-
|
|
205
|
-
slm soft-prompts
|
|
103
|
+
**Multi-scope memory (v3.6.15, opt-in):** keep memories `personal` (default), `shared` with named profiles, or `global` across the machine. Off by default — recall only ever returns your own facts until you turn sharing on, per call or in config. See **[docs/shared-memory.md](docs/shared-memory.md)**.
|
|
206
104
|
|
|
207
|
-
|
|
208
|
-
slm reap
|
|
209
|
-
```
|
|
105
|
+
<a id="multilingual-embedding-support"></a>
|
|
210
106
|
|
|
211
|
-
|
|
107
|
+
**Multilingual:** plug in any OpenAI-compatible embedding endpoint — Ollama, vLLM, LiteLLM, `bge-m3`, `multilingual-e5`, `Qwen3-Embedding`. The math layer is language-agnostic; 30+ languages work at full retrieval quality. No cloud dependency, no code changes.
|
|
212
108
|
|
|
213
|
-
|
|
214
|
-
|:-----|:------------|
|
|
215
|
-
| `forget` | Programmatic memory archival via lifecycle rules |
|
|
216
|
-
| `quantize` | Trigger smart compression on demand |
|
|
217
|
-
| `consolidate_cognitive` | Extract and store patterns from memory clusters |
|
|
218
|
-
| `get_soft_prompts` | Retrieve auto-learned patterns for context injection |
|
|
219
|
-
| `reap_processes` | Clean orphaned SLM processes |
|
|
220
|
-
| `get_retention_stats` | Memory lifecycle analytics |
|
|
109
|
+
### Cache + Compress
|
|
221
110
|
|
|
222
|
-
|
|
111
|
+
<a id="three-surfaces-proxy--mcp-tools--skill"></a>
|
|
223
112
|
|
|
224
|
-
|
|
225
|
-
|:-------|:----:|:----:|:------:|
|
|
226
|
-
| RAM usage (Mode A/B) | ~4GB | ~40MB | **100x reduction** |
|
|
227
|
-
| Retrieval channels | 5 | 6 | +Hopfield completion |
|
|
228
|
-
| MCP tools (default) | 29 | 33 | +4 new (mesh set) |
|
|
229
|
-
| CLI commands | 21 | 26 | +5 new |
|
|
230
|
-
| 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)) |
|
|
231
|
-
| API endpoints | 9 | 16 | +7 new |
|
|
113
|
+
One engine, three ways in — choose the surface that fits your setup:
|
|
232
114
|
|
|
233
|
-
|
|
115
|
+
| Surface | How you use it | Requires proxy? | Window effect | Cache scope |
|
|
116
|
+
|---------|---------------|:---------------:|:-------------:|-------------|
|
|
117
|
+
| **A — Proxy** | `slm wrap claude` or `ANTHROPIC_BASE_URL=http://127.0.0.1:8765` | **Yes** | Shrinks | Full-turn cache — every call |
|
|
118
|
+
| **B — MCP tools** | Add 5 tools to MCP config; call `slm_compress`, `slm_cache_set/get` | **No** | **Preserved (1M)** | Results you explicitly route through SLM |
|
|
119
|
+
| **C — Skill** | Copy `skills/slm-optimize/SKILL.md` → `~/.claude/skills/` | **No** | **Preserved (1M)** | Auto-applied by the agent per skill rules |
|
|
234
120
|
|
|
235
|
-
|
|
121
|
+
**The hard constraint:** The primary Claude conversation turn cannot be cached without a proxy. The MCP/skill path caches results you explicitly route through SLM (tool outputs, file reads, sub-model calls) — without a proxy the main conversation turn is not intercepted.
|
|
236
122
|
|
|
237
|
-
|
|
123
|
+
**How to choose:**
|
|
124
|
+
- Metered API (pay-per-token), want every call cached → **Proxy (A)**
|
|
125
|
+
- Pro/Max/Team subscription or any plan where you won't run a proxy → **MCP tools (B)** or **Skill (C)**
|
|
126
|
+
- Zero configuration → **Skill (C)**: install once, auto-compresses CLAUDE.md and large outputs
|
|
127
|
+
- Agent-controlled caching of repeated file reads → **MCP tools (B)**
|
|
238
128
|
|
|
239
|
-
|
|
129
|
+
**Cache:** exact-match SQLite lookup (SHA-256, zero false hits) + vCache-gated semantic (opt-in). **100% cost saved on a hit** (input + output tokens).
|
|
240
130
|
|
|
241
|
-
|
|
131
|
+
**Compress:** safe mode = lossless normalization (JSON/code/tool outputs, 60-95% fewer tokens); aggressive mode = LLMLingua-2 prose only (opt-in). CCR stores originals for byte-exact reversal. Anthropic 90% / OpenAI 50% prefix-cache discount alignment included. [CITATION-NEEDED-ONLINE: live provider prefix-cache discount rates]
|
|
242
132
|
|
|
243
|
-
|
|
244
|
-
# Turn on adaptive memory lifecycle
|
|
245
|
-
slm config set lifecycle.enabled true
|
|
133
|
+
**Savings dashboard:** `slm optimize savings --since 7` — live USD/INR/tokens saved. Hot-reload config, fail-open.
|
|
246
134
|
|
|
247
|
-
|
|
248
|
-
slm config set quantization.enabled true
|
|
135
|
+
### Mesh
|
|
249
136
|
|
|
250
|
-
|
|
251
|
-
slm config set consolidation.cognitive.enabled true
|
|
137
|
+
<a id="multi-machine-mesh-coordination"></a>
|
|
252
138
|
|
|
253
|
-
|
|
254
|
-
slm config set soft_prompts.enabled true
|
|
139
|
+
Run SLM on multiple machines and have agents coordinate as one team — no external broker, no Docker. HTTP-based sync every 30s, mDNS discovery (`SLM_MESH_DISCOVERY=on`), graceful offline queue.
|
|
255
140
|
|
|
256
|
-
|
|
257
|
-
|
|
141
|
+
```bash
|
|
142
|
+
# Machine A (broker)
|
|
143
|
+
export SLM_MESH_HOST=192.168.1.100
|
|
144
|
+
export SLM_MESH_SHARED_SECRET=my-secret-key
|
|
145
|
+
slm init
|
|
258
146
|
|
|
259
|
-
#
|
|
260
|
-
|
|
147
|
+
# Machine B (client)
|
|
148
|
+
export SLM_MESH_PEER_URL=http://192.168.1.100:8765
|
|
149
|
+
export SLM_MESH_SHARED_SECRET=my-secret-key
|
|
150
|
+
slm init
|
|
261
151
|
```
|
|
262
152
|
|
|
263
|
-
|
|
153
|
+
8 mesh MCP tools: `mesh_peers`, `mesh_send`, `mesh_broadcast`, `mesh_project`, `mesh_inbox`, `mesh_pending`, `mesh_state`, `mesh_lock`.
|
|
264
154
|
|
|
265
|
-
|
|
155
|
+
Full docs: [docs/multi-machine.md](docs/multi-machine.md) · [docs/distributed-deployment.md](docs/distributed-deployment.md)
|
|
266
156
|
|
|
267
157
|
---
|
|
268
158
|
|
|
269
|
-
##
|
|
270
|
-
|
|
271
|
-
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.
|
|
272
|
-
|
|
273
|
-
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.
|
|
159
|
+
## Install Paths
|
|
274
160
|
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
|
278
|
-
|
|
279
|
-
|
|
|
280
|
-
|
|
|
281
|
-
| 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) |
|
|
282
|
-
| **SLM V3 Mode C** | **87.7%** | Local + optional LLM | Optional (Ollama OK) | **Yes (AGPL-3.0)** | In-house, repro script in `docs/benchmarks/` |
|
|
283
|
-
| Zep v3 Cloud | 85.2% | Cloud | Yes | Community deprecated | [getzep.com](https://www.getzep.com/) |
|
|
284
|
-
| **SLM V3 Mode A** | **74.8%** | **Local, CPU-only, zero-LLM** | **No** | **Yes (AGPL-3.0)** | In-house, repro script in `docs/benchmarks/` |
|
|
285
|
-
| Mem0 (zero-retrieval-LLM) | 64.2% | Local baseline | No | Partial | Mem0 paper, zero-LLM row |
|
|
161
|
+
| Path | Command | When |
|
|
162
|
+
|:-----|:--------|:-----|
|
|
163
|
+
| **npm** (recommended) | `npm install -g superlocalmemory` | Node 14+, installs Python deps automatically |
|
|
164
|
+
| **pip** | `pip install superlocalmemory` | Python 3.11+, direct install |
|
|
165
|
+
| **Claude Code Plugin** (WP-06) | `/plugin install superlocalmemory@qualixar` | Self-bootstraps venv, isolated SLM_DATA_DIR, additive — 14-tool core |
|
|
166
|
+
| **Portable / IDE connect** (WP-08) | `slm connect <ide> [--here]` | Wire any IDE without reinstalling; `slm connect claude-code` → plugin pointer |
|
|
286
167
|
|
|
287
|
-
|
|
168
|
+
After any install path: `slm setup` → `slm doctor` → `slm warmup` (optional, pre-downloads ~500MB embedding model).
|
|
288
169
|
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
170
|
+
| Component | Size | When |
|
|
171
|
+
|:----------|:-----|:-----|
|
|
172
|
+
| Core libraries (numpy, scipy, networkx) | ~50MB | During install |
|
|
173
|
+
| Dashboard & MCP server (fastapi, uvicorn) | ~20MB | During install |
|
|
174
|
+
| Learning engine (lightgbm) | ~10MB | During install |
|
|
175
|
+
| Search engine (sentence-transformers, torch) | ~200MB | During install |
|
|
176
|
+
| Embedding model (nomic-embed-text-v1.5, 768d) | ~500MB | First use or `slm warmup` |
|
|
177
|
+
| **Mode B** requires [Ollama](https://ollama.com) + a model (`ollama pull llama3.2`) | ~2GB | Manual |
|
|
294
178
|
|
|
295
179
|
---
|
|
296
180
|
|
|
297
|
-
##
|
|
298
|
-
|
|
299
|
-
### Install via npm (recommended)
|
|
300
|
-
|
|
301
|
-
```bash
|
|
302
|
-
npm install -g superlocalmemory
|
|
303
|
-
slm setup # Choose mode (A/B/C)
|
|
304
|
-
slm doctor # Verify everything is working
|
|
305
|
-
slm warmup # Pre-download embedding model (~500MB, optional)
|
|
306
|
-
```
|
|
307
|
-
|
|
308
|
-
### Install via pip
|
|
309
|
-
|
|
310
|
-
```bash
|
|
311
|
-
pip install superlocalmemory
|
|
312
|
-
```
|
|
313
|
-
|
|
314
|
-
### Start Saving on LLM Costs (v3.6 Optimize)
|
|
315
|
-
|
|
316
|
-
```bash
|
|
317
|
-
# Wrap your agent — starts proxy + sets environment + launches agent
|
|
318
|
-
slm wrap claude
|
|
319
|
-
# Your first repeat prompt → CACHE HIT → $0.00 saved
|
|
320
|
-
# See savings: slm optimize savings --since 1
|
|
321
|
-
```
|
|
322
|
-
|
|
323
|
-
### Upgrading to v3.6 "Optimize" + v3.5.0 "Scale-Ready"
|
|
324
|
-
|
|
325
|
-
**Migration is automatic.** Upgrade the package, restart the daemon — all migrations run in the background.
|
|
326
|
-
|
|
327
|
-
```bash
|
|
328
|
-
pip install -U superlocalmemory
|
|
329
|
-
slm restart
|
|
330
|
-
slm doctor
|
|
331
|
-
```
|
|
332
|
-
|
|
333
|
-
No manual commands. No data loss. Zero downtime.
|
|
334
|
-
|
|
335
|
-
**What you get after upgrading to v3.6.0:**
|
|
336
|
-
- **Cache** — skip repeat LLM calls entirely. Exact-match + vCache-gated semantic. **100% cost saved on hit.**
|
|
337
|
-
- **Compress** — shrink prompts 60-95% before sending. Extractive JSON/code (lossless) + LLMLingua-2 prose (opt-in). CCR reversible.
|
|
338
|
-
- **Align** — stabilize prompt prefix for native provider KV-cache discounts (Anthropic 90%, OpenAI 50%).
|
|
339
|
-
- **Savings dashboard** — live USD/INR/tokens saved displayed in the Optimize tab.
|
|
340
|
-
|
|
341
|
-
**What you get after upgrading to v3.5.0:**
|
|
342
|
-
- **CozoDB on the recall path** — entity_graph channel routes through the CozoDB backend (auto-detected, no config needed). Millions of graph edges indexed and traversed in milliseconds.
|
|
343
|
-
- **LanceDB vector backend** — embedding search falls through to LanceDB when available (auto-detected, no config needed). Handles millions of vectors.
|
|
344
|
-
- **6-channel recall <1s** — BM25→FTS5 (20ms vs 11s), Hopfield ANN prefilter (0.4s vs 6s), temporal fast-parse (0.25s vs 2.6s). All surfaces (MCP/CLI/Dashboard) use the same daemon path.
|
|
345
|
-
- **Core Memory Block** — always-injected pinned facts (auto-derived + explicit pin/unpin via the `core_memory` MCP tool). Pinned facts surface even when the query doesn't match.
|
|
346
|
-
- **Context Injection v2** — unified formatter, token-budgeted injection (mode-aware 2K/4K/8K), edge-placement ordering, full-fidelity content (no more 200-char stubs).
|
|
347
|
-
- **Score normalization** — all fusion scores mapped to [0, 1] via soft-sigmoid. Monotonic — rank order preserved.
|
|
348
|
-
- **Vector store auto-backfill** — facts with embeddings missing from the vector store are indexed on daemon start. No more "only 1/3 of corpus searchable."
|
|
349
|
-
|
|
350
|
-
### Release History
|
|
351
|
-
|
|
352
|
-
| Version | Codename | Key Features |
|
|
353
|
-
|---|---|---|
|
|
354
|
-
| **v3.6.11** | Optimize Everywhere | **Three surfaces** — Proxy (A: full-turn cache), MCP tools (B: `slm_compress`/`slm_retrieve`/`slm_cache_set`/`slm_cache_get`/`slm_optimize_stats` — proxy-free, 1M window), Skill (C: `slm-optimize` zero-config). `CacheDB.get_value()` (pure KV lookup). 23 new tests. Links: [Three Surfaces →](#three-surfaces-proxy--mcp-tools--skill) · [docs/optimize-overview.md](docs/optimize-overview.md) |
|
|
355
|
-
| **v3.6.0** | Optimize | **Cache** (skip repeat calls, 100% on hit) · **Compress** (shrink prompts 60-95%) · **Align** (KV-cache stabilization) · `slm optimize\|cache\|compress\|proxy\|wrap` CLI · Live savings dashboard (USD/INR/tokens) · Hot-reload config · Safe defaults · Links: [docs/optimize-overview.md](docs/optimize-overview.md) · [V3.6 Wiki](https://github.com/qualixar/superlocalmemory/wiki/V3.6-Overview) |
|
|
356
|
-
| **v3.5.0** | Scale-Ready + Context Injection v2 | CozoDB/LanceDB migration, 6-channel recall <1s, Core Memory Block, BM25→FTS5, context injection v2, score normalization |
|
|
357
|
-
| **v3.4.5** | Scale-Ready (foundation) | Tiered storage (active/warm/cold), graph pruning, BackendOrchestrator scaffolding, CozoDB + LanceDB init + migration code (read path wired in v3.5.0) |
|
|
358
|
-
| **v3.4.51** | Recency Intelligence | Ebbinghaus decay + FSRS stability, age gate, session context time-awareness |
|
|
359
|
-
| **v3.4.22** | Scale-Ready (scaling) | v2 ranking pipeline (LightGBM, bandit ensemble), Hopfield channel, 6-channel parallel execution |
|
|
360
|
-
| **v3.3.x** | Foundation | BM25Plus, Fisher-Rao manifold, sqlite-vec, RRF fusion, cross-encoder rerank. 3 published papers (arXiv 2603.02240 / 2603.14588 / 2604.04514) |
|
|
361
|
-
|
|
362
|
-
### First Use
|
|
363
|
-
|
|
364
|
-
```bash
|
|
365
|
-
slm remember "Alice works at Google as a Staff Engineer"
|
|
366
|
-
slm recall "What does Alice do?"
|
|
367
|
-
slm status
|
|
368
|
-
```
|
|
369
|
-
|
|
370
|
-
### MCP Integration (Claude, Cursor, Windsurf, VS Code, etc.)
|
|
181
|
+
## MCP + Profiles
|
|
371
182
|
|
|
372
|
-
SLM supports
|
|
373
|
-
|
|
374
|
-
#### Option A — HTTP transport (v3.6.7+, recommended)
|
|
375
|
-
|
|
376
|
-
One shared process handles every client. RAM is flat regardless of how many IDE windows, subagents, or concurrent sessions connect. Requires the SLM daemon to be running (`slm start`).
|
|
183
|
+
SLM supports two MCP transports:
|
|
377
184
|
|
|
185
|
+
**HTTP (recommended, v3.6.7+):**
|
|
378
186
|
```json
|
|
379
|
-
{
|
|
380
|
-
"mcpServers": {
|
|
381
|
-
"superlocalmemory": {
|
|
382
|
-
"type": "http",
|
|
383
|
-
"url": "http://127.0.0.1:8765/mcp/"
|
|
384
|
-
}
|
|
385
|
-
}
|
|
386
|
-
}
|
|
187
|
+
{ "mcpServers": { "superlocalmemory": { "type": "http", "url": "http://127.0.0.1:8765/mcp/" } } }
|
|
387
188
|
```
|
|
189
|
+
Or: `claude mcp add --transport http superlocalmemory http://127.0.0.1:8765/mcp/`
|
|
388
190
|
|
|
389
|
-
|
|
390
|
-
> ```bash
|
|
391
|
-
> claude mcp add --transport http superlocalmemory http://127.0.0.1:8765/mcp/
|
|
392
|
-
> ```
|
|
393
|
-
|
|
394
|
-
#### Option B — stdio transport (universal, works everywhere)
|
|
395
|
-
|
|
396
|
-
Spawns one `slm mcp` subprocess per client connection (~90–110 MB each). Works with every MCP-compatible tool including those that do not yet support HTTP transport. No daemon required.
|
|
397
|
-
|
|
191
|
+
**stdio (universal fallback):**
|
|
398
192
|
```json
|
|
399
|
-
{
|
|
400
|
-
"mcpServers": {
|
|
401
|
-
"superlocalmemory": {
|
|
402
|
-
"command": "slm",
|
|
403
|
-
"args": ["mcp"]
|
|
404
|
-
}
|
|
405
|
-
}
|
|
406
|
-
}
|
|
193
|
+
{ "mcpServers": { "superlocalmemory": { "command": "slm", "args": ["mcp"] } } }
|
|
407
194
|
```
|
|
408
195
|
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
Some CLIs (e.g. Grok CLI) only speak stdio but you still want the RAM benefit of HTTP. The [`@modelcontextprotocol/client-cli`](https://www.npmjs.com/package/@modelcontextprotocol/client-cli) package bridges them:
|
|
412
|
-
|
|
413
|
-
```bash
|
|
414
|
-
npm install -g @modelcontextprotocol/client-cli
|
|
415
|
-
```
|
|
416
|
-
|
|
417
|
-
```json
|
|
418
|
-
{
|
|
419
|
-
"mcpServers": {
|
|
420
|
-
"superlocalmemory": {
|
|
421
|
-
"command": "mcp-remote",
|
|
422
|
-
"args": ["http://127.0.0.1:8765/mcp/", "--allow-http", "--transport", "http-only"]
|
|
423
|
-
}
|
|
424
|
-
}
|
|
425
|
-
}
|
|
426
|
-
```
|
|
427
|
-
|
|
428
|
-
#### When to use which
|
|
429
|
-
|
|
430
|
-
| Situation | Use |
|
|
431
|
-
|-----------|-----|
|
|
432
|
-
| Claude Code / Claude Desktop (v3.6.7+) | **HTTP** — zero new processes per session |
|
|
433
|
-
| Cursor, Windsurf, Gemini CLI, Antigravity | **HTTP** — native support |
|
|
434
|
-
| Grok CLI, tools that only support stdio | **`mcp-remote` bridge** |
|
|
435
|
-
| Offline / daemon-free usage | **stdio** |
|
|
436
|
-
| Any tool, any version | **stdio** always works as fallback |
|
|
196
|
+
### MCP Profiles (WP-01)
|
|
437
197
|
|
|
438
|
-
|
|
198
|
+
Control tool surface via `SLM_MCP_PROFILE`:
|
|
439
199
|
|
|
440
|
-
|
|
200
|
+
| Profile | Tools | Use case |
|
|
201
|
+
|:--------|:-----:|:---------|
|
|
202
|
+
| `core14` (default) | 14 | Memory core — `remember`, `recall`, `forget`, `session_init`, + mesh |
|
|
203
|
+
| `mesh8` | 8 | Mesh-only — multi-machine coordination |
|
|
204
|
+
| `full38` | 38 | Core + optimize + evolution + trust |
|
|
205
|
+
| `power50` | 50 | Full38 + admin + ingestion + compliance |
|
|
206
|
+
| `whole81` | 81 | Every tool (`SLM_MCP_ALL_TOOLS=1`) |
|
|
441
207
|
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
| Need | Use | Example |
|
|
445
|
-
|------|-----|---------|
|
|
446
|
-
| IDE integration | MCP | Auto-configured for 17+ IDEs via `slm connect` |
|
|
447
|
-
| Shell scripts | CLI + `--json` | `slm recall "auth" --json \| jq '.data.results[0]'` |
|
|
448
|
-
| CI/CD pipelines | CLI + `--json` | `slm remember "deployed v2.1" --json` in GitHub Actions |
|
|
449
|
-
| Agent frameworks | CLI + `--json` | OpenClaw, Codex, Goose, nanobot |
|
|
450
|
-
| Human use | CLI | `slm recall "auth"` (readable text output) |
|
|
451
|
-
|
|
452
|
-
**Agent-native JSON output** on every command:
|
|
208
|
+
**Precedence:** `ALL` > `TOOLS` > `PROFILE` > `default`
|
|
453
209
|
|
|
454
210
|
```bash
|
|
455
|
-
#
|
|
456
|
-
slm
|
|
457
|
-
# 1. [0.87] Database uses PostgreSQL 16 on port 5432...
|
|
458
|
-
|
|
459
|
-
# Agent-native JSON
|
|
460
|
-
slm recall "database schema" --json
|
|
461
|
-
# {"success": true, "command": "recall", "version": "3.0.22", "data": {"results": [...]}}
|
|
211
|
+
export SLM_MCP_PROFILE=full38 # or core14 / mesh8 / power50 / whole81
|
|
212
|
+
slm mcp
|
|
462
213
|
```
|
|
463
214
|
|
|
464
|
-
|
|
215
|
+
Per-IDE configs available for Claude Code, Cursor, Windsurf, VS Code Copilot, Continue, Gemini CLI, JetBrains, Zed, and more (15 configs in `ide/configs/`). See [docs/ide-setup.md](docs/ide-setup.md).
|
|
465
216
|
|
|
466
217
|
---
|
|
467
218
|
|
|
468
|
-
##
|
|
219
|
+
## Claude Code Plugin
|
|
469
220
|
|
|
470
|
-
|
|
471
|
-
when there's a real signal — not on a timer, not on every keystroke. The
|
|
472
|
-
hooks are perf-budgeted (<10ms p99 for the hot path) and fail-open (any
|
|
473
|
-
crash → silent exit, never blocks your prompt). Install them with one
|
|
474
|
-
command:
|
|
221
|
+
Install directly in Claude Code without a system-level npm/pip install:
|
|
475
222
|
|
|
476
223
|
```bash
|
|
477
|
-
|
|
478
|
-
slm hooks status # shows what's installed
|
|
479
|
-
slm hooks remove # cleans up, preserves non-SLM hooks
|
|
224
|
+
/plugin install superlocalmemory@qualixar
|
|
480
225
|
```
|
|
481
226
|
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
| `slm hook checkpoint` | PostToolUse on `Write\|Edit` | Every file write/edit | Auto-observes file changes into SLM. No periodic nag (removed in v3.4.43). |
|
|
489
|
-
| `slm hook post_tool_outcome` | PostToolUse (all tools) | Every tool call | Tracks which recalled facts got used (learning signal). |
|
|
490
|
-
| `slm hook stop` | Stop | Session end | Saves rich session summary with git context. |
|
|
491
|
-
|
|
492
|
-
**What "smart" means here:** the hooks don't interrupt you on a schedule.
|
|
493
|
-
They watch for specific events that indicate memory work would add value —
|
|
494
|
-
a topic pivot, a web call about to fire, a re-asked question, a file edit.
|
|
495
|
-
Otherwise they stay out of your way.
|
|
496
|
-
|
|
497
|
-
**Observability for the new hooks:**
|
|
498
|
-
`topic_shift` writes one TSV line per decision to
|
|
499
|
-
`~/.superlocalmemory/logs/topic-shift.log`
|
|
500
|
-
(`timestamp | session_hash | current_words_count | window_depth | max_overlap |
|
|
501
|
-
fired | prompt_preview`). Disable with `SLM_TOPIC_SHIFT_LOG=0`.
|
|
502
|
-
|
|
503
|
-
**Upgrading from v3.4.42 or older:** Run `slm hooks install` once after
|
|
504
|
-
upgrade to pull in the new wiring. `slm hooks status` will flag the
|
|
505
|
-
version mismatch. Merge is idempotent — safe to run twice.
|
|
227
|
+
- Self-bootstraps a Python venv, installs all deps in an isolated `SLM_DATA_DIR`
|
|
228
|
+
- Registers 14-tool core MCP surface (`core14` profile by default)
|
|
229
|
+
- Additive — does not replace an existing SLM install
|
|
230
|
+
- `slm connect claude-code` detects an existing plugin install and links them
|
|
231
|
+
|
|
232
|
+
See [docs/getting-started.md](docs/getting-started.md) for full plugin walkthrough.
|
|
506
233
|
|
|
507
234
|
---
|
|
508
235
|
|
|
509
|
-
##
|
|
236
|
+
## Modes + EU AI Act
|
|
237
|
+
|
|
238
|
+
<a id="eu-ai-act-compliance"></a>
|
|
510
239
|
|
|
511
240
|
| Mode | What | Cloud? | EU AI Act | Best For |
|
|
512
241
|
|:----:|:-----|:------:|:---------:|:---------|
|
|
@@ -520,87 +249,9 @@ slm mode b # Local Ollama
|
|
|
520
249
|
slm mode c # Cloud LLM
|
|
521
250
|
```
|
|
522
251
|
|
|
523
|
-
**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.
|
|
524
|
-
|
|
525
|
-
---
|
|
526
|
-
|
|
527
|
-
## Architecture
|
|
528
|
-
|
|
529
|
-
```
|
|
530
|
-
Query ──► Strategy Classifier ──► 5 Parallel Channels:
|
|
531
|
-
├── Semantic (Fisher-Rao geodesic distance)
|
|
532
|
-
├── BM25 (keyword matching)
|
|
533
|
-
├── Entity Graph (spreading activation, 3 hops)
|
|
534
|
-
├── Temporal (date-aware retrieval)
|
|
535
|
-
└── Hopfield (partial-query completion / associative recall)
|
|
536
|
-
│
|
|
537
|
-
RRF Fusion (k=60)
|
|
538
|
-
│
|
|
539
|
-
Scene Expansion + Bridge Discovery
|
|
540
|
-
│
|
|
541
|
-
Cross-Encoder Reranking
|
|
542
|
-
│
|
|
543
|
-
◄── Top-K Results with channel scores
|
|
544
|
-
```
|
|
545
|
-
|
|
546
|
-
### Mathematical Foundations
|
|
547
|
-
|
|
548
|
-
Three novel contributions replace cloud LLM dependency with mathematical guarantees:
|
|
549
|
-
|
|
550
|
-
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.
|
|
551
|
-
|
|
552
|
-
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.
|
|
553
|
-
|
|
554
|
-
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.
|
|
252
|
+
**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.
|
|
555
253
|
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
---
|
|
559
|
-
|
|
560
|
-
## Benchmarks
|
|
561
|
-
|
|
562
|
-
Evaluated on [LoCoMo](https://arxiv.org/abs/2402.09714) — 10 multi-session conversations, 1,986 total questions, 4 scored categories.
|
|
563
|
-
|
|
564
|
-
### Mode A (Zero-Cloud, 10 Conversations, 1,276 Questions)
|
|
565
|
-
|
|
566
|
-
| Category | Score | vs. Mem0 (64.2%) |
|
|
567
|
-
|:---------|:-----:|:-----------------:|
|
|
568
|
-
| Single-Hop | 72.0% | +3.0pp |
|
|
569
|
-
| Multi-Hop | 70.3% | +8.6pp |
|
|
570
|
-
| Temporal | 80.0% | +21.7pp |
|
|
571
|
-
| **Open-Domain** | **85.0%** | **+35.0pp** |
|
|
572
|
-
| **Aggregate** | **74.8%** | **+10.6pp** |
|
|
573
|
-
|
|
574
|
-
Mode A achieves **85.0% on open-domain questions — the highest of any system in the evaluation**, including cloud-powered ones.
|
|
575
|
-
|
|
576
|
-
### Math Layer Impact (6 Conversations, n=832)
|
|
577
|
-
|
|
578
|
-
| Conversation | With Math | Without | Delta |
|
|
579
|
-
|:-------------|:---------:|:-------:|:-----:|
|
|
580
|
-
| Easiest | 78.5% | 71.2% | +7.3pp |
|
|
581
|
-
| Hardest | 64.2% | 44.3% | **+19.9pp** |
|
|
582
|
-
| **Average** | **71.7%** | **58.9%** | **+12.7pp** |
|
|
583
|
-
|
|
584
|
-
Mathematical layers help most where heuristic methods struggle — the harder the conversation, the bigger the improvement.
|
|
585
|
-
|
|
586
|
-
### Ablation (What Each Component Contributes)
|
|
587
|
-
|
|
588
|
-
| Removed | Impact |
|
|
589
|
-
|:--------|:------:|
|
|
590
|
-
| Cross-encoder reranking | **-30.7pp** |
|
|
591
|
-
| Fisher-Rao metric | **-10.8pp** |
|
|
592
|
-
| All math layers | **-7.6pp** |
|
|
593
|
-
| BM25 channel | **-6.5pp** |
|
|
594
|
-
| Sheaf consistency | -1.7pp |
|
|
595
|
-
| Entity graph | -1.0pp |
|
|
596
|
-
|
|
597
|
-
Full ablation details in the [Wiki](https://github.com/qualixar/superlocalmemory/wiki/Benchmarks).
|
|
598
|
-
|
|
599
|
-
---
|
|
600
|
-
|
|
601
|
-
## EU AI Act Compliance
|
|
602
|
-
|
|
603
|
-
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.
|
|
254
|
+
The EU AI Act (Regulation 2024/1689) takes full effect **August 2, 2026**.
|
|
604
255
|
|
|
605
256
|
| Requirement | Mode A | Mode B | Mode C |
|
|
606
257
|
|:------------|:------:|:------:|:------:|
|
|
@@ -609,226 +260,52 @@ The EU AI Act (Regulation 2024/1689) takes full effect **August 2, 2026**. Every
|
|
|
609
260
|
| Transparency (Art. 13) | **Pass** | **Pass** | **Pass** |
|
|
610
261
|
| No network calls during memory ops | **Yes** | **Yes** | No |
|
|
611
262
|
|
|
612
|
-
To the best of our knowledge,
|
|
263
|
+
To the best of our knowledge, no existing agent memory system addresses EU AI Act compliance by architectural design. Modes A and B pass all checks — no personal data leaves the device during any memory operation.
|
|
613
264
|
|
|
614
|
-
Built-in compliance tools: GDPR Article 15/17 export + complete erasure, tamper-proof SHA-256 audit chain, data provenance tracking, ABAC policy enforcement.
|
|
265
|
+
Built-in compliance tools: GDPR Article 15/17 export + complete erasure, tamper-proof SHA-256 audit chain, data provenance tracking, ABAC policy enforcement. See [docs/compliance.md](docs/compliance.md).
|
|
615
266
|
|
|
616
267
|
---
|
|
617
268
|
|
|
618
|
-
##
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
269
|
+
## Advanced
|
|
270
|
+
|
|
271
|
+
| Topic | Link |
|
|
272
|
+
|:------|:-----|
|
|
273
|
+
| Full optimize docs | [docs/optimize-overview.md](docs/optimize-overview.md) · [docs/optimize-cli.md](docs/optimize-cli.md) · [docs/optimize-config.md](docs/optimize-config.md) |
|
|
274
|
+
| Distributed deployment | [docs/distributed-deployment.md](docs/distributed-deployment.md) |
|
|
275
|
+
| Multi-machine mesh | [docs/multi-machine.md](docs/multi-machine.md) |
|
|
276
|
+
| Auto-memory hooks | [docs/auto-memory.md](docs/auto-memory.md) |
|
|
277
|
+
| Architecture + math | [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md) |
|
|
278
|
+
| CLI reference | [docs/cli-reference.md](docs/cli-reference.md) |
|
|
279
|
+
| MCP tools reference | [docs/mcp-tools.md](docs/mcp-tools.md) |
|
|
280
|
+
| Getting started | [docs/getting-started.md](docs/getting-started.md) |
|
|
281
|
+
| IDE setup (15 configs) | [docs/ide-setup.md](docs/ide-setup.md) |
|
|
282
|
+
| Skill evolution | [docs/skill-evolution.md](docs/skill-evolution.md) |
|
|
283
|
+
| V2 migration | [docs/migration-from-v2.md](docs/migration-from-v2.md) |
|
|
284
|
+
| Configuration | [docs/configuration.md](docs/configuration.md) |
|
|
285
|
+
| Wiki | [github.com/qualixar/superlocalmemory/wiki](https://github.com/qualixar/superlocalmemory/wiki) |
|
|
286
|
+
|
|
287
|
+
**Web dashboard:**
|
|
626
288
|
```bash
|
|
627
289
|
slm dashboard # Opens at http://localhost:8765
|
|
628
290
|
```
|
|
291
|
+
17-tab sidebar with Knowledge Graph (Sigma.js WebGL, community detection), Health Monitor, Entity Explorer, Mesh Peers, Ingestion Status, Privacy blur mode. Cross-platform: macOS + Windows + Linux.
|
|
629
292
|
|
|
630
|
-
**
|
|
631
|
-
|
|
632
|
-
<!-- UX-M1: link dashboard-coverage so users can find deferred Living Brain Evolution tiles -->
|
|
633
|
-
> **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.
|
|
634
|
-
|
|
635
|
-
---
|
|
636
|
-
|
|
637
|
-
<details>
|
|
638
|
-
<summary><strong>Active Memory (V3.1) — Memory That Learns</strong> (click to expand)</summary>
|
|
639
|
-
|
|
640
|
-
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.
|
|
641
|
-
|
|
642
|
-
Auto-capture hooks: `slm hooks install` + `slm observe` + `slm session-context`. MCP tools: `session_init`, `observe`, `report_feedback`.
|
|
643
|
-
|
|
644
|
-
**`session_init` MCP parameters:**
|
|
645
|
-
| Parameter | Type | Default | Description |
|
|
646
|
-
|---|---|---|---|
|
|
647
|
-
| `project_path` | string | `""` | Working directory — used to derive search query |
|
|
648
|
-
| `query` | string | `""` | Override search query |
|
|
649
|
-
| `max_results` | int | `10` | Max memories to return |
|
|
650
|
-
| `max_age_days` | int | `30` | Suppress memories older than N days (0 = disabled). Memories with score ≥ 0.70 always surface regardless of age. |
|
|
651
|
-
|
|
652
|
-
**`slm session-context` CLI flags** (consistent with MCP):
|
|
653
|
-
```bash
|
|
654
|
-
slm session-context # fast path, 30-day window (default)
|
|
655
|
-
slm session-context --max-age-days 7 # only last 7 days
|
|
656
|
-
slm session-context --max-age-days 0 # no age filter
|
|
657
|
-
slm session-context "my query" --full # full engine path (slow, requires Ollama)
|
|
658
|
-
slm session-context --json # agent-native JSON output
|
|
659
|
-
```
|
|
660
|
-
|
|
661
|
-
**No competitor learns at zero token cost.**
|
|
293
|
+
**Release history:**
|
|
662
294
|
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
### Setup
|
|
672
|
-
|
|
673
|
-
**M4 (broker):**
|
|
674
|
-
```bash
|
|
675
|
-
export SLM_MESH_HOST=192.168.1.100
|
|
676
|
-
export SLM_MESH_SHARED_SECRET=my-secret-key
|
|
677
|
-
slm init # Starts SLM at http://192.168.1.100:8765
|
|
678
|
-
```
|
|
679
|
-
|
|
680
|
-
**M5 (client):**
|
|
681
|
-
```bash
|
|
682
|
-
export SLM_MESH_PEER_URL=http://192.168.1.100:8765
|
|
683
|
-
export SLM_MESH_SHARED_SECRET=my-secret-key
|
|
684
|
-
slm init # Syncs M4's agents every 30s, proxies messages to M4
|
|
685
|
-
```
|
|
686
|
-
|
|
687
|
-
### How It Works
|
|
688
|
-
|
|
689
|
-
- **HTTP-based sync** — M5 queries M4's `/mesh/peers` endpoint every 30 seconds
|
|
690
|
-
- **Message proxying** — When M5's agent sends a message to an M4 agent, it's routed automatically
|
|
691
|
-
- **mDNS discovery (optional)** — M5 can auto-discover M4 on the LAN via `_slm-mesh._tcp` (enable with `SLM_MESH_DISCOVERY=on`, default)
|
|
692
|
-
- **Graceful fallback** — Network errors logged but don't crash; offline agents queue messages for delivery
|
|
693
|
-
- **Shared secret** — `SLM_MESH_SHARED_SECRET` gates remote peer discovery (required for remote mode)
|
|
694
|
-
|
|
695
|
-
### Environment Variables
|
|
696
|
-
|
|
697
|
-
| Variable | Default | Purpose |
|
|
698
|
-
|:---------|:--------|:--------|
|
|
699
|
-
| `SLM_MESH_HOST` | `127.0.0.1` | Host this SLM listens on (set to IP for remote) |
|
|
700
|
-
| `SLM_MESH_PEER_URL` | unset | Full URL of remote SLM (e.g., `http://192.168.1.100:8765`) |
|
|
701
|
-
| `SLM_MESH_SHARED_SECRET` | unset | Auth secret (required when remote) |
|
|
702
|
-
| `SLM_MESH_DISCOVERY` | `on` | mDNS discovery (`on`/`off`) |
|
|
703
|
-
| `SLM_MESH_WS_PORT` | `7900` | WebSocket port for mesh (internal use) |
|
|
704
|
-
|
|
705
|
-
### Dependencies
|
|
706
|
-
|
|
707
|
-
- `zeroconf>=0.140` (new in v3.4.48, optional, pure Python, auto-installed)
|
|
708
|
-
- `httpx==0.28.1` (already in core deps)
|
|
709
|
-
- No Docker. No external broker. Works on WiFi + LAN.
|
|
710
|
-
|
|
711
|
-
### MCP Tools
|
|
712
|
-
|
|
713
|
-
All 8 mesh tools work seamlessly across machines:
|
|
714
|
-
|
|
715
|
-
| Tool | Description |
|
|
716
|
-
|:-----|:------------|
|
|
717
|
-
| `mesh_peers` | List local + remote peers merged |
|
|
718
|
-
| `mesh_send` | Send message to any peer (local or remote) |
|
|
719
|
-
| `mesh_broadcast` | Send to all agents (across machines) |
|
|
720
|
-
| `mesh_project` | Send to all agents in a project (across machines) |
|
|
721
|
-
| `mesh_inbox` | Get messages for this agent |
|
|
722
|
-
| `mesh_pending` | Get offline messages (broadcast/project) |
|
|
723
|
-
| `mesh_state` | Get/set shared state (replicated) |
|
|
724
|
-
| `mesh_lock` | Acquire/release distributed file locks |
|
|
725
|
-
|
|
726
|
-
---
|
|
727
|
-
|
|
728
|
-
## Features
|
|
729
|
-
|
|
730
|
-
### LLM Cost Optimization (v3.6 Optimize)
|
|
731
|
-
- **Exact Cache** — byte-identical repeat calls served from local SQLite. SHA-256 key derivation, stampede shield, tag-based invalidation. **100% cost saved on hit** (input + output tokens).
|
|
732
|
-
- **Semantic Cache** (opt-in) — vCache-powered learned thresholds with SAFE-CACHE centroid defense. Near-duplicate queries served within error bound. CacheAttack 86% hijack class blocked.
|
|
733
|
-
- **Extractive Compression** — structure-preserving compression for JSON, code (AST-aware: Python/JS/Go/Rust/Java/C++), and tool outputs. **60-95% fewer input tokens**, zero accuracy regression.
|
|
734
|
-
- **LLMLingua-2 Prose** (opt-in) — extractive prose summarization for open-ended chat. Safety-warned before enable.
|
|
735
|
-
- **CCR (Compressed Context Retrieval)** — pre-compression originals stored for byte-exact reversal under UUID. Every compressed block recoverable.
|
|
736
|
-
- **CacheAligner** — detects volatile tokens (UUIDs, timestamps, JWTs) in system prompts. Maximizes native provider prefix-cache discounts (Anthropic 90%, OpenAI 50%).
|
|
737
|
-
- **Interception Proxy** — HTTP proxy on port 8765 serving Anthropic, OpenAI, and Gemini surfaces. Zero-code integration — just set `base_url`.
|
|
738
|
-
- **Agent Wrapping** — `slm wrap claude` — one command starts proxy + sets environment + launches agent. 10 supported agents.
|
|
739
|
-
- **Savings Dashboard** — live USD/INR/tokens saved, hit rate, compression ratio, cache size. CLI + UI.
|
|
740
|
-
- **Hot-Reload Config** — UI/CLI writes `optimize.json`; daemon reloads in 2 seconds. No restart.
|
|
741
|
-
- **Fail-open** — any cache/compress/proxy error passes through. Your calls never break.
|
|
742
|
-
- **Data isolation** — separate `llmcache.db` with AES-256-GCM encryption. Never touches `memory.db`.
|
|
743
|
-
|
|
744
|
-
### Retrieval
|
|
745
|
-
- 5-channel hybrid: Semantic (Fisher-Rao) + BM25 + Entity Graph + Temporal + Hopfield (associative / partial-query completion)
|
|
746
|
-
- RRF fusion + cross-encoder reranking
|
|
747
|
-
- Agentic sufficiency verification (auto-retry on weak results)
|
|
748
|
-
- Adaptive ranking with LightGBM (learns from usage)
|
|
749
|
-
- Hopfield completion for vague/partial queries
|
|
750
|
-
|
|
751
|
-
### Intelligence
|
|
752
|
-
- 11-step ingestion pipeline (entity resolution, fact extraction, emotional tagging, scene building)
|
|
753
|
-
- Automatic contradiction detection via sheaf cohomology
|
|
754
|
-
- Adaptive memory lifecycle — memories strengthen with use, fade when neglected
|
|
755
|
-
- Smart compression — embedding precision adapts to memory importance (up to 32x savings)
|
|
756
|
-
- Cognitive consolidation — automatic pattern extraction from related memories
|
|
757
|
-
- Auto-learned soft prompts injected into agent context
|
|
758
|
-
- Behavioral pattern detection and outcome tracking
|
|
759
|
-
|
|
760
|
-
### Skill Evolution
|
|
761
|
-
- **Per-skill performance tracking** — tracks which skills succeed and fail across sessions (zero-LLM, always on)
|
|
762
|
-
- **Evolution engine** — 3-trigger system with blind verification. Off by default — enable via `slm config set evolution.enabled true`
|
|
763
|
-
- **MCP tools** — `evolve_skill`, `skill_health`, `skill_lineage` for programmatic access
|
|
764
|
-
- **Lineage DAG** — visual evolution history in the dashboard
|
|
765
|
-
- **CLI config** — `slm config get/set` for all evolution settings
|
|
766
|
-
- **Post-session triggers** — automatic analysis on session end via Stop hook
|
|
767
|
-
- **[ECC](https://github.com/affaan-m/everything-claude-code) integration** — optional enhanced observations via `slm ingest --source ecc`
|
|
768
|
-
|
|
769
|
-
### Tiered Storage & Scaling
|
|
770
|
-
- **4-tier lifecycle** — active, warm, cold, archived with automatic promotion/demotion
|
|
771
|
-
- **Deep recall** — archived facts searchable at reduced weight
|
|
772
|
-
- **Graph pruning** — automatic cleanup of orphan edges, self-loops, duplicates
|
|
773
|
-
- **Fact consolidation** — clusters related facts into consolidated summaries
|
|
774
|
-
|
|
775
|
-
### Trust & Security
|
|
776
|
-
- Bayesian Beta-distribution trust scoring (per-agent, per-fact)
|
|
777
|
-
- Trust gates (block low-trust agents from writing/deleting)
|
|
778
|
-
- ABAC (Attribute-Based Access Control) with DB-persisted policies
|
|
779
|
-
- Tamper-proof hash-chain audit trail (SHA-256 linked entries)
|
|
780
|
-
|
|
781
|
-
### Infrastructure
|
|
782
|
-
- 17-tab web dashboard with real-time visualization
|
|
783
|
-
- 17+ IDE integrations (Claude, Cursor, Windsurf, VS Code, JetBrains, Zed, etc.)
|
|
784
|
-
- 33 default MCP tools (+42 optional via `SLM_MCP_ALL_TOOLS=1`) + 7 MCP resources
|
|
785
|
-
- Profile isolation (independent memory spaces)
|
|
786
|
-
- 2,900+ tests, AGPL v3, cross-platform (Mac/Linux/Windows)
|
|
787
|
-
- CPU-only — no GPU required
|
|
788
|
-
- Automatic orphaned process cleanup
|
|
789
|
-
|
|
790
|
-
---
|
|
791
|
-
|
|
792
|
-
## CLI Reference
|
|
793
|
-
|
|
794
|
-
| Command | What It Does |
|
|
795
|
-
|:--------|:-------------|
|
|
796
|
-
| `slm optimize status` | Show all Optimize settings (cache, compress, proxy, config version) |
|
|
797
|
-
| `slm optimize on\|off` | Enable/disable all Optimize features (hot-reload, no restart) |
|
|
798
|
-
| `slm optimize savings [--since N] [--provider P] [--json]` | Token/cost savings report — live USD/INR |
|
|
799
|
-
| `slm cache status\|clear\|invalidate\|ttl\|semantic` | Cache sub-control — exact + semantic tiers, TTL management |
|
|
800
|
-
| `slm compress status\|mode\|code\|prose\|ccr\|align` | Compression control — per-channel toggle, safe/aggressive mode |
|
|
801
|
-
| `slm proxy [--port] [--provider] [--no-compress] [--semantic]` | Start interception proxy (port 8765) |
|
|
802
|
-
| `slm wrap <agent> [options]` | Proxy-activate an agent — one command to start saving |
|
|
803
|
-
| `slm help-optimize [topic]` | Full developer reference + per-agent setup recipes |
|
|
804
|
-
| `slm remember "..."` | Store a memory |
|
|
805
|
-
| `slm recall "..."` | Search memories |
|
|
806
|
-
| `slm forget "..."` | Delete matching memories |
|
|
807
|
-
| `slm trace "..."` | Recall with per-channel score breakdown |
|
|
808
|
-
| `slm status` | System status |
|
|
809
|
-
| `slm health` | Math layer health (Fisher, Sheaf, Langevin) |
|
|
810
|
-
| `slm doctor` | Pre-flight check (deps, worker, Ollama, database) |
|
|
811
|
-
| `slm mode a/b/c` | Switch operating mode |
|
|
812
|
-
| `slm setup` | Interactive first-time wizard |
|
|
813
|
-
| `slm warmup` | Pre-download embedding model |
|
|
814
|
-
| `slm migrate` | V2 to V3 migration |
|
|
815
|
-
| `slm dashboard` | Launch 17-tab web dashboard |
|
|
816
|
-
| `slm mcp` | Start MCP server (for IDE integration) |
|
|
817
|
-
| `slm connect` | Configure IDE integrations |
|
|
818
|
-
| `slm hooks install` | Wire auto-memory into Claude Code hooks |
|
|
819
|
-
| `slm profile list/create/switch` | Profile management |
|
|
820
|
-
| `slm decay` | Run memory lifecycle review |
|
|
821
|
-
| `slm session-context [query]` | Print session context (for hooks). Flags: `--max-age-days N` (default 30), `--full`, `--json` |
|
|
822
|
-
| `slm quantize` | Run smart compression cycle |
|
|
823
|
-
| `slm consolidate --cognitive` | Extract patterns from memory clusters |
|
|
824
|
-
| `slm soft-prompts` | View auto-learned patterns |
|
|
825
|
-
| `slm reap` | Clean orphaned SLM processes |
|
|
295
|
+
| Version | Codename | Key Features |
|
|
296
|
+
|---|---|---|
|
|
297
|
+
| **v3.6.15** | Multi-scope | **Opt-in [shared memory](docs/shared-memory.md)** (personal/shared/global, off by default), default-deny scope at every read path, recall scope-race fix, contributor PRs #42/#43/#44, fixes #46–#49 |
|
|
298
|
+
| **v3.6.14** | Plugin-native | Claude Code Plugin (WP-06), MCP profiles (WP-01), IDE connect (WP-08), asset consolidation, UI polish (WP-12) |
|
|
299
|
+
| **v3.6.x** | Optimize Everywhere / Distributed-ready | Three surfaces (proxy/MCP/skill), `SLM_REMOTE=1` LAN mode, remote dashboard, custom LLM endpoints |
|
|
300
|
+
| **v3.5.0** | Scale-Ready | CozoDB/LanceDB, 6-channel recall <1s, Core Memory Block, context injection v2, score normalization |
|
|
301
|
+
| **v3.4.x** | Scale-Ready (foundation) | Tiered storage, graph pruning, Hopfield channel, LightGBM ranking, mDNS mesh discovery |
|
|
302
|
+
| **v3.3.x** | Foundation | BM25Plus, Fisher-Rao, sqlite-vec, RRF fusion, cross-encoder rerank. 3 published papers |
|
|
826
303
|
|
|
827
304
|
---
|
|
828
305
|
|
|
829
306
|
## Research Papers
|
|
830
307
|
|
|
831
|
-
SuperLocalMemory is backed by three published research papers (arXiv preprints + Zenodo DOIs)
|
|
308
|
+
SuperLocalMemory is backed by three published research papers (arXiv preprints + Zenodo DOIs). These are preprints — not conference-accepted or journal-published yet.
|
|
832
309
|
|
|
833
310
|
### Paper 3: The Living Brain (V3.3)
|
|
834
311
|
> **SuperLocalMemory V3.3: The Living Brain — Biologically-Inspired Forgetting, Cognitive Quantization, and Multi-Channel Retrieval for Zero-LLM Agent Memory Systems**
|
|
@@ -875,79 +352,51 @@ SuperLocalMemory is backed by three published research papers (arXiv preprints +
|
|
|
875
352
|
|
|
876
353
|
---
|
|
877
354
|
|
|
878
|
-
##
|
|
879
|
-
|
|
880
|
-
| Requirement | Version | Why |
|
|
881
|
-
|:-----------|:--------|:----|
|
|
882
|
-
| **Node.js** | 14+ | npm package manager |
|
|
883
|
-
| **Python** | 3.11+ | V3 engine runtime |
|
|
884
|
-
|
|
885
|
-
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.
|
|
886
|
-
|
|
887
|
-
| Component | Size | When |
|
|
888
|
-
|:----------|:-----|:-----|
|
|
889
|
-
| Core libraries (numpy, scipy, networkx) | ~50MB | During install |
|
|
890
|
-
| Dashboard & MCP server (fastapi, uvicorn) | ~20MB | During install |
|
|
891
|
-
| Learning engine (lightgbm) | ~10MB | During install |
|
|
892
|
-
| Search engine (sentence-transformers, torch) | ~200MB | During install |
|
|
893
|
-
| Embedding model (nomic-embed-text-v1.5, 768d) | ~500MB | First use or `slm warmup` |
|
|
894
|
-
| **Mode B** requires [Ollama](https://ollama.com) + a model (`ollama pull llama3.2`) | ~2GB | Manual |
|
|
895
|
-
|
|
896
|
-
---
|
|
897
|
-
|
|
898
|
-
## Contributing
|
|
355
|
+
## Support / License / Qualixar
|
|
899
356
|
|
|
900
357
|
See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines. [Wiki](https://github.com/qualixar/superlocalmemory/wiki) for detailed documentation.
|
|
901
358
|
|
|
902
|
-
## License
|
|
903
|
-
|
|
904
359
|
GNU Affero General Public License v3.0 (AGPL-3.0). See [LICENSE](LICENSE).
|
|
905
360
|
|
|
906
361
|
For commercial licensing (closed-source, proprietary, or hosted use), see [COMMERCIAL-LICENSE.md](COMMERCIAL-LICENSE.md) or contact varun.pratap.bhardwaj@gmail.com.
|
|
907
362
|
|
|
908
363
|
Copyright (c) 2026 Varun Pratap Bhardwaj / Qualixar.
|
|
909
364
|
|
|
910
|
-
## Attribution
|
|
911
|
-
|
|
912
365
|
Part of [Qualixar](https://qualixar.com) · Author: [Varun Pratap Bhardwaj](https://varunpratap.com)
|
|
913
366
|
|
|
914
367
|
### Acknowledgments
|
|
915
368
|
|
|
916
|
-
- **[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
|
|
369
|
+
- **[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`. We recommend ECC for Claude Code users who want the deepest learning experience alongside SLM.
|
|
917
370
|
- **[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.
|
|
918
371
|
|
|
919
|
-
|
|
372
|
+
### Qualixar AI Agent Reliability Platform
|
|
920
373
|
|
|
921
|
-
|
|
922
|
-
<sub>Built with mathematical rigor. Not in the race — here to help everyone build better AI memory systems.</sub>
|
|
923
|
-
</p>
|
|
924
|
-
|
|
925
|
-
---
|
|
374
|
+
Qualixar is building the open-source infrastructure for AI agent reliability engineering. Seven products, one coherent platform:
|
|
926
375
|
|
|
927
|
-
|
|
376
|
+
| Product | Purpose | Install |
|
|
377
|
+
|---------|---------|---------|
|
|
378
|
+
| **[SuperLocalMemory](https://github.com/qualixar/superlocalmemory)** | Persistent memory + learning | `npm install -g superlocalmemory` |
|
|
379
|
+
| **[Qualixar OS](https://github.com/qualixar/qualixar-os)** | Universal agent runtime | `npx qualixar-os` |
|
|
380
|
+
| **[SLM Mesh](https://github.com/qualixar/slm-mesh)** | P2P coordination across sessions | `npm i slm-mesh` |
|
|
381
|
+
| **[SLM MCP Hub](https://github.com/qualixar/slm-mcp-hub)** | Federate 430+ MCP tools | `pip install slm-mcp-hub` |
|
|
382
|
+
| **[AgentAssay](https://github.com/qualixar/agentassay)** | Token-efficient agent testing | `pip install agentassay` |
|
|
383
|
+
| **[AgentAssert](https://github.com/qualixar/agentassert-abc)** | Behavioral contracts + drift detection | `pip install agentassert-abc` |
|
|
384
|
+
| **[SkillFortify](https://github.com/qualixar/skillfortify)** | Formal verification for agent skills | `pip install skillfortify` |
|
|
928
385
|
|
|
929
|
-
|
|
386
|
+
**Zero cloud dependency. Local-first. EU AI Act compliant.**
|
|
930
387
|
|
|
931
|
-
|
|
388
|
+
Start here → **[qualixar.com](https://qualixar.com)** · [All papers on Qualixar HuggingFace](https://huggingface.co/Qualixar)
|
|
932
389
|
|
|
933
390
|
---
|
|
934
391
|
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
392
|
+
<p align="center">
|
|
393
|
+
<sub>Built with mathematical rigor. Not in the race — here to help everyone build better AI memory systems.</sub>
|
|
394
|
+
</p>
|
|
938
395
|
|
|
939
|
-
|
|
940
|
-
|---------|---------|---------|-------|
|
|
941
|
-
| **[SuperLocalMemory](https://github.com/qualixar/superlocalmemory)** | Persistent memory + learning for AI agents | `npx superlocalmemory` | [arXiv:2604.04514](https://arxiv.org/abs/2604.04514) |
|
|
942
|
-
| **[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) |
|
|
943
|
-
| **[SLM Mesh](https://github.com/qualixar/slm-mesh)** | P2P coordination across AI agent sessions | `npm i slm-mesh` | — |
|
|
944
|
-
| **[SLM MCP Hub](https://github.com/qualixar/slm-mcp-hub)** | Federate 430+ MCP tools through one gateway | `pip install slm-mcp-hub` | — |
|
|
945
|
-
| **[AgentAssay](https://github.com/qualixar/agentassay)** | Token-efficient AI agent testing | `pip install agentassay` | [arXiv:2603.02601](https://arxiv.org/abs/2603.02601) |
|
|
946
|
-
| **[AgentAssert](https://github.com/qualixar/agentassert-abc)** | Behavioral contracts + drift detection | `pip install agentassert-abc` | [arXiv:2602.22302](https://arxiv.org/abs/2602.22302) |
|
|
947
|
-
| **[SkillFortify](https://github.com/qualixar/skillfortify)** | Formal verification for AI agent skills | `pip install skillfortify` | [arXiv:2603.00195](https://arxiv.org/abs/2603.00195) |
|
|
396
|
+
---
|
|
948
397
|
|
|
949
|
-
|
|
398
|
+
## Star This Project
|
|
950
399
|
|
|
951
|
-
|
|
400
|
+
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.
|
|
952
401
|
|
|
953
|
-
|
|
402
|
+
[](https://star-history.com/#qualixar/superlocalmemory&Date)
|