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