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.
Files changed (124) hide show
  1. package/.claude-plugin/marketplace.json +17 -0
  2. package/README.md +187 -741
  3. package/package.json +12 -5
  4. package/plugin/.claude-plugin/plugin.json +20 -0
  5. package/plugin/.mcp.json +12 -0
  6. package/plugin/CLAUDE.md +43 -0
  7. package/plugin/_GENERATED.md +6 -0
  8. package/plugin/agents/slm-memory-advisor.md +43 -0
  9. package/plugin/agents/slm-optimize-advisor.md +38 -0
  10. package/plugin/hooks/hooks.json +14 -0
  11. package/plugin/requirements.txt +1 -0
  12. package/plugin/scripts/ensure-venv.bat +122 -0
  13. package/plugin/scripts/ensure-venv.sh +105 -0
  14. package/plugin/scripts/slm-launch +15 -0
  15. package/plugin/scripts/slm-launch.bat +17 -0
  16. package/plugin/settings.json +16 -0
  17. package/plugin/skills/slm-cache/SKILL.md +140 -0
  18. package/plugin/skills/slm-compress/SKILL.md +143 -0
  19. package/plugin/skills/slm-graph/SKILL.md +300 -0
  20. package/plugin/skills/slm-recall/SKILL.md +196 -0
  21. package/plugin/skills/slm-remember/SKILL.md +182 -0
  22. package/plugin/skills/slm-session/SKILL.md +207 -0
  23. package/plugin/skills/slm-status/SKILL.md +149 -0
  24. package/plugin-src/.mcp.json +12 -0
  25. package/plugin-src/agents/slm-memory-advisor.md +43 -0
  26. package/plugin-src/agents/slm-optimize-advisor.md +38 -0
  27. package/plugin-src/commands/slm-optimize.md +22 -0
  28. package/plugin-src/commands/slm-recall.md +16 -0
  29. package/plugin-src/commands/slm-remember.md +16 -0
  30. package/plugin-src/commands/slm-status.md +15 -0
  31. package/plugin-src/hooks/.gitkeep +0 -0
  32. package/plugin-src/hooks/hooks.json +14 -0
  33. package/plugin-src/manifest.json +25 -0
  34. package/plugin-src/requirements.txt +1 -0
  35. package/plugin-src/rules/AGENTS.md +90 -0
  36. package/plugin-src/rules/CLAUDE.md.fragment +43 -0
  37. package/plugin-src/scripts/ensure-venv.bat +122 -0
  38. package/plugin-src/scripts/ensure-venv.sh +105 -0
  39. package/plugin-src/scripts/slm-launch +15 -0
  40. package/plugin-src/scripts/slm-launch.bat +17 -0
  41. package/plugin-src/settings.json +16 -0
  42. package/plugin-src/skills/slm-cache/SKILL.md +140 -0
  43. package/plugin-src/skills/slm-compress/SKILL.md +143 -0
  44. package/plugin-src/skills/slm-graph/SKILL.md +300 -0
  45. package/plugin-src/skills/slm-recall/SKILL.md +196 -0
  46. package/plugin-src/skills/slm-remember/SKILL.md +182 -0
  47. package/plugin-src/skills/slm-session/SKILL.md +207 -0
  48. package/plugin-src/skills/slm-status/SKILL.md +149 -0
  49. package/pyproject.toml +6 -2
  50. package/scripts/__tests__/build-plugin.test.mjs +613 -0
  51. package/scripts/_savings_math.py +270 -0
  52. package/scripts/build-plugin.js +742 -0
  53. package/scripts/dogfood_savings.py +490 -0
  54. package/scripts/install-skills.ps1 +4 -334
  55. package/scripts/install-skills.sh +4 -435
  56. package/scripts/postinstall-interactive.js +0 -27
  57. package/scripts/postinstall.js +21 -2
  58. package/src/superlocalmemory/__init__.py +1 -1
  59. package/src/superlocalmemory/cli/_lazy_init.py +115 -0
  60. package/src/superlocalmemory/cli/commands.py +348 -39
  61. package/src/superlocalmemory/cli/main.py +47 -4
  62. package/src/superlocalmemory/cli/setup_wizard.py +20 -6
  63. package/src/superlocalmemory/core/config.py +79 -9
  64. package/src/superlocalmemory/core/embeddings.py +10 -5
  65. package/src/superlocalmemory/core/engine.py +2 -2
  66. package/src/superlocalmemory/hooks/claude_code_hooks.py +27 -3
  67. package/src/superlocalmemory/hooks/portable_kit.py +506 -0
  68. package/src/superlocalmemory/infra/cloud_backup.py +99 -23
  69. package/src/superlocalmemory/mcp/cli_fallback.py +602 -0
  70. package/src/superlocalmemory/mcp/server.py +75 -4
  71. package/src/superlocalmemory/mcp/tools_code_graph.py +3 -3
  72. package/src/superlocalmemory/mcp/tools_core.py +12 -4
  73. package/src/superlocalmemory/optimize/cache/boundary_store.py +25 -6
  74. package/src/superlocalmemory/optimize/cache/centroid_store.py +27 -4
  75. package/src/superlocalmemory/optimize/cache/manager.py +92 -6
  76. package/src/superlocalmemory/optimize/cache/semantic.py +20 -1
  77. package/src/superlocalmemory/optimize/compress/ccr.py +12 -0
  78. package/src/superlocalmemory/optimize/compress/router.py +46 -13
  79. package/src/superlocalmemory/optimize/config/schema.py +6 -0
  80. package/src/superlocalmemory/optimize/proxy/_helpers.py +111 -8
  81. package/src/superlocalmemory/optimize/proxy/anthropic_surface.py +14 -4
  82. package/src/superlocalmemory/optimize/proxy/gemini_surface.py +23 -6
  83. package/src/superlocalmemory/optimize/proxy/openai_surface.py +10 -4
  84. package/src/superlocalmemory/optimize/proxy/server.py +11 -0
  85. package/src/superlocalmemory/optimize/proxy/vertex_surface.py +246 -0
  86. package/src/superlocalmemory/optimize/storage/db.py +30 -0
  87. package/src/superlocalmemory/server/recall_serializer.py +3 -1
  88. package/src/superlocalmemory/server/unified_daemon.py +24 -6
  89. package/src/superlocalmemory/ui/css/legacy-dashboard.css +18 -0
  90. package/src/superlocalmemory/ui/css/neural-glass.css +5 -0
  91. package/src/superlocalmemory/ui/index.html +2 -2
  92. package/src/superlocalmemory/ui/js/core.js +98 -0
  93. package/src/superlocalmemory/ui/js/dashboard.js +8 -1
  94. package/src/superlocalmemory/ui/js/ide-status.js +16 -3
  95. package/src/superlocalmemory/ui/js/math-health.js +15 -3
  96. package/src/superlocalmemory/ui/js/optimize.js +18 -2
  97. package/src/superlocalmemory/ui/js/trust-dashboard.js +10 -1
  98. package/src/superlocalmemory.egg-info/PKG-INFO +189 -742
  99. package/src/superlocalmemory.egg-info/SOURCES.txt +6 -9
  100. package/src/superlocalmemory.egg-info/requires.txt +1 -0
  101. package/ide/skills/slm-build-graph/SKILL.md +0 -423
  102. package/ide/skills/slm-list-recent/SKILL.md +0 -348
  103. package/ide/skills/slm-recall/SKILL.md +0 -326
  104. package/ide/skills/slm-remember/SKILL.md +0 -194
  105. package/ide/skills/slm-show-patterns/SKILL.md +0 -224
  106. package/ide/skills/slm-status/SKILL.md +0 -363
  107. package/ide/skills/slm-switch-profile/SKILL.md +0 -442
  108. package/skills/slm-build-graph/SKILL.md +0 -423
  109. package/skills/slm-list-recent/SKILL.md +0 -348
  110. package/skills/slm-optimize/README.md +0 -55
  111. package/skills/slm-optimize/SKILL.md +0 -139
  112. package/skills/slm-recall/SKILL.md +0 -343
  113. package/skills/slm-remember/SKILL.md +0 -194
  114. package/skills/slm-show-patterns/SKILL.md +0 -224
  115. package/skills/slm-status/SKILL.md +0 -363
  116. package/skills/slm-switch-profile/SKILL.md +0 -442
  117. package/src/superlocalmemory/cli/doctor_cmd.py +0 -152
  118. package/src/superlocalmemory/skills/slm-build-graph/SKILL.md +0 -423
  119. package/src/superlocalmemory/skills/slm-list-recent/SKILL.md +0 -348
  120. package/src/superlocalmemory/skills/slm-recall/SKILL.md +0 -343
  121. package/src/superlocalmemory/skills/slm-remember/SKILL.md +0 -194
  122. package/src/superlocalmemory/skills/slm-show-patterns/SKILL.md +0 -224
  123. package/src/superlocalmemory/skills/slm-status/SKILL.md +0 -363
  124. 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.11</h1>
6
- <p align="center"><strong>Cache. Compress. Remember. Three surfaces — proxy, MCP tools, or skill. Every setup covered.</strong><br/><em>The only local-first layer that pairs persistent memory with compression + caching across every Claude plan. Full 1M window preserved in MCP and skill mode.</em></p>
7
- <p align="center"><code>v3.6.11 "Optimize Everywhere"</code> <strong>Compress + cache on any plan, three ways in.</strong><br/>Proxy (full-turn cache): <code>slm wrap claude</code> &nbsp;·&nbsp; MCP (proxy-free): add <code>slm_compress</code> to your MCP config &nbsp;·&nbsp; Skill (zero-config): <code>~/.claude/skills/slm-optimize/</code></p>
8
- <p align="center"><strong>Backed by 3 published research papers</strong> (arXiv preprints + Zenodo-archived) · <a href="https://arxiv.org/abs/2603.02240">arXiv:2603.02240</a> · <a href="https://arxiv.org/abs/2603.14588">arXiv:2603.14588</a> · <a href="https://arxiv.org/abs/2604.04514">arXiv:2604.04514</a></p>
9
-
10
- <p align="center">
11
- <code>Proxy · MCP tools · Skill — three surfaces</code> &nbsp;·&nbsp; <code>+10.6pp vs Mem0 zero-LLM</code> &nbsp;·&nbsp; <code>85% Open-Domain (best zero-LLM score)</code> &nbsp;·&nbsp; <code>EU AI Act Ready</code>
12
- </p>
5
+ <h1 align="center">SuperLocalMemory V3.6.14</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.14</code> <strong>Plugin-native. Profile-aware. Distributed-ready.</strong><br/>
9
+ Proxy: <code>slm wrap claude</code> &nbsp;·&nbsp; MCP: add <code>slm_compress</code> to your config &nbsp;·&nbsp; 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,218 @@
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
- <details>
34
- <summary><strong>What's New in V3.6 — Optimize: SKIP, SHRINK, DISCOUNT, REMEMBER</strong> (click to expand)</summary>
35
-
36
- > 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.
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.
43
-
44
- ### The Three Levers
27
+ ## Why SuperLocalMemory?
45
28
 
46
- | Lever | Mechanism | Saving | Off by default? |
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 |
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.
51
30
 
52
- **Memory** (v3.5's existing engine) runs in parallelit shapes *what is in* the prompt (relevant facts); Optimize decides *whether and how* it is sent.
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.
53
32
 
54
- > **Independent at runtime:** enable caching only, compression only, both, or neither — from the dashboard Optimize tab, applied live (no restart). Each AI client can also get its own memory identity over HTTP MCP via `http://127.0.0.1:8765/mcp/{agent_id}`.
33
+ **Benchmark results** (evaluated on [LoCoMo](https://arxiv.org/abs/2402.09714), the standard long-conversation memory benchmark, published April 2026):
55
34
 
56
- ### Quick Start
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 |
57
44
 
58
- ```bash
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
- ```
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).
64
46
 
65
- ### New CLI Commands (6 total)
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.
66
48
 
67
- | Command | What It Does |
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 |
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**.
75
50
 
76
- ### Savings Dashboard
51
+ ---
77
52
 
78
- All metrics tracked and displayed live — from the dashboard (Optimize tab) or CLI:
53
+ ## Quick Start
79
54
 
80
55
  ```bash
81
- slm optimize savings --since 7
82
- # Savings (last 7 days):
83
- # Exact cache hits: 43 (127,580 input tokens saved)
84
- # Tokens saved (total): 153,096
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
- slm optimize on # Enable cache + compress
92
- slm optimize off # Disable (proxy passes through)
93
- slm cache semantic on # Enable semantic cache (needs embedding model)
94
- slm compress mode aggressive # Enable prose compression (with safety warning)
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
- - **Fail-open** — any error passes through. Your calls never break.
111
- - **Separate database** — `llmcache.db` never touches `memory.db`. AES-256-GCM at rest.
112
- - **Hot-reload config** UI/CLI writes `~/.superlocalmemory/optimize.json`, daemon reloads in 2s.
113
-
114
- ### Links
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
- mkdir -p ~/.claude/skills/slm-optimize
166
- cp $(pip show superlocalmemory | grep Location | awk '{print $2}')/superlocalmemory/skills/slm-optimize/SKILL.md \
167
- ~/.claude/skills/slm-optimize/SKILL.md
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
- Then reference in your `CLAUDE.md`:
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
- <details>
179
- <summary><strong>What's New in V3.3 — The Living Brain Evolves</strong> (click to expand)</summary>
180
-
181
- > 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.
87
+ ## Three Pillars
182
88
 
183
- ### Features at a Glance
89
+ ### Memory
184
90
 
185
- - **Adaptive Memory Lifecycle** — memories naturally strengthen with use and fade when neglected. No manual cleanup, no hardcoded TTLs.
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.
91
+ <a id="dual-interface-mcp--cli"></a>
191
92
 
192
- ### New CLI Commands
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.
193
94
 
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
- # Run smart compressionadapts embedding precision to memory importance
199
- slm quantize
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
- # Extract reusable patterns from memory clusters
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
- # View auto-learned patterns that get injected into agent context
205
- slm soft-prompts
103
+ <a id="multilingual-embedding-support"></a>
206
104
 
207
- # Clean up orphaned SLM processes
208
- slm reap
209
- ```
105
+ **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.
210
106
 
211
- ### New MCP Tools
107
+ ### Cache + Compress
212
108
 
213
- | Tool | Description |
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
+ <a id="three-surfaces-proxy--mcp-tools--skill"></a>
221
110
 
222
- ### Mode A/B Memory Improvements
111
+ One engine, three ways in — choose the surface that fits your setup:
223
112
 
224
- | Metric | V3.2 | V3.3 | Change |
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
+ | Surface | How you use it | Requires proxy? | Window effect | Cache scope |
114
+ |---------|---------------|:---------------:|:-------------:|-------------|
115
+ | **A Proxy** | `slm wrap claude` or `ANTHROPIC_BASE_URL=http://127.0.0.1:8765` | **Yes** | Shrinks | Full-turn cache — every call |
116
+ | **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 |
117
+ | **C Skill** | Copy `skills/slm-optimize/SKILL.md` → `~/.claude/skills/` | **No** | **Preserved (1M)** | Auto-applied by the agent per skill rules |
232
118
 
233
- Embedding migration happens automatically when you switch modesno manual steps needed.
119
+ **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.
234
120
 
235
- ### Dashboard
121
+ **How to choose:**
122
+ - Metered API (pay-per-token), want every call cached → **Proxy (A)**
123
+ - Pro/Max/Team subscription or any plan where you won't run a proxy → **MCP tools (B)** or **Skill (C)**
124
+ - Zero configuration → **Skill (C)**: install once, auto-compresses CLAUDE.md and large outputs
125
+ - Agent-controlled caching of repeated file reads → **MCP tools (B)**
236
126
 
237
- Three new tabs: **Memory Lifecycle** (retention curves, decay stats), **Compression** (storage savings, precision distribution), and **Patterns** (auto-learned soft prompts, consolidation history). Seven new API endpoints power the new views.
127
+ **Cache:** exact-match SQLite lookup (SHA-256, zero false hits) + vCache-gated semantic (opt-in). **100% cost saved on a hit** (input + output tokens).
238
128
 
239
- ### Enable V3.3 Features
129
+ **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]
240
130
 
241
- All new features default OFF. Zero breaking changes. Opt in when ready:
131
+ **Savings dashboard:** `slm optimize savings --since 7` — live USD/INR/tokens saved. Hot-reload config, fail-open.
242
132
 
243
- ```bash
244
- # Turn on adaptive memory lifecycle
245
- slm config set lifecycle.enabled true
133
+ ### Mesh
246
134
 
247
- # Turn on smart compression
248
- slm config set quantization.enabled true
135
+ <a id="multi-machine-mesh-coordination"></a>
249
136
 
250
- # Turn on cognitive consolidation
251
- slm config set consolidation.cognitive.enabled true
137
+ 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.
252
138
 
253
- # Turn on pattern learning (soft prompts)
254
- slm config set soft_prompts.enabled true
255
-
256
- # Turn on Hopfield retrieval (6th channel)
257
- slm config set retrieval.hopfield.enabled true
139
+ ```bash
140
+ # Machine A (broker)
141
+ export SLM_MESH_HOST=192.168.1.100
142
+ export SLM_MESH_SHARED_SECRET=my-secret-key
143
+ slm init
258
144
 
259
- # Or enable everything at once
260
- slm config set v33_features.all true
145
+ # Machine B (client)
146
+ export SLM_MESH_PEER_URL=http://192.168.1.100:8765
147
+ export SLM_MESH_SHARED_SECRET=my-secret-key
148
+ slm init
261
149
  ```
262
150
 
263
- **Fully backward compatible.** All existing MCP tools, CLI commands, and configs work unchanged. New tables are created automatically on first run. No migration needed.
151
+ 8 mesh MCP tools: `mesh_peers`, `mesh_send`, `mesh_broadcast`, `mesh_project`, `mesh_inbox`, `mesh_pending`, `mesh_state`, `mesh_lock`.
264
152
 
265
- </details>
153
+ Full docs: [docs/multi-machine.md](docs/multi-machine.md) · [docs/distributed-deployment.md](docs/distributed-deployment.md)
266
154
 
267
155
  ---
268
156
 
269
- ## Why SuperLocalMemory?
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.
157
+ ## Install Paths
274
158
 
275
- **The numbers** (evaluated on [LoCoMo](https://arxiv.org/abs/2402.09714), the standard long-conversation memory benchmark). Published numbers as of April 2026:
276
-
277
- | System | Score | Config | Cloud LLM required? | Open Source | Source |
278
- |:-------|:-----:|:-------|:-------------------:|:-----------:|:-------|
279
- | EverMemOS | 93.05% | Cloud (proprietary) | Yes | Core only | [evermind.ai](https://evermind.ai/) (Feb 2026) |
280
- | Hindsight (LoComo10) | 92.0% | Cloud | Yes | No | [benchmarks.hindsight.vectorize.io](https://benchmarks.hindsight.vectorize.io) (Apr 2026) |
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 |
159
+ | Path | Command | When |
160
+ |:-----|:--------|:-----|
161
+ | **npm** (recommended) | `npm install -g superlocalmemory` | Node 14+, installs Python deps automatically |
162
+ | **pip** | `pip install superlocalmemory` | Python 3.11+, direct install |
163
+ | **Claude Code Plugin** (WP-06) | `/plugin install superlocalmemory@qualixar` | Self-bootstraps venv, isolated SLM_DATA_DIR, additive 14-tool core |
164
+ | **Portable / IDE connect** (WP-08) | `slm connect <ide> [--here]` | Wire any IDE without reinstalling; `slm connect claude-code` → plugin pointer |
286
165
 
287
- > **How to read this table.** Scores from different papers use different LoCoMo splits, judge models, and prompt variants. We do NOT claim these numbers are apples-to-apples across rows. The rows we re-ran in-house are marked "In-house"; cited rows link to the vendor's public source and date. Mode A is the only zero-LLM configuration in the list, so the comparison that is apples-to-apples is **Mode A 74.8% vs Mem0 zero-retrieval-LLM 64.2%** (+10.6pp). Mem0's 91.6% and EverMemOS's 93.05% use cloud LLMs; Mode C uses a local LLM (Ollama). BEAM-10M, the emerging successor benchmark, will be added in a future release.
166
+ After any install path: `slm setup` `slm doctor` `slm warmup` (optional, pre-downloads ~500MB embedding model).
288
167
 
289
- **What Mode A is**: CPU-only, SQLite-only, zero-LLM retrieval pipeline on published LoCoMo questions. To the best of our knowledge it is the only publicly-released local-first memory that clears Mem0's zero-LLM baseline on this benchmark. If another fully-local system hits similar numbers, please open an issue so we can update the table.
290
-
291
- Mathematical layers contribute **+12.7 percentage points** on average across 6 conversations (n=832 questions), with up to **+19.9pp on the most challenging dialogues**. This isn't more compute — it's better math.
292
-
293
- > **Upgrading from V2 (2.8.6)?** V3 is a complete architectural reinvention — new mathematical engine, new retrieval pipeline, new storage schema. Your existing data is preserved but requires migration. After installing V3, run `slm migrate` to upgrade your data. Read the [Migration Guide](https://github.com/qualixar/superlocalmemory/wiki/Migration-from-V2) before upgrading. Backup is created automatically.
168
+ | Component | Size | When |
169
+ |:----------|:-----|:-----|
170
+ | Core libraries (numpy, scipy, networkx) | ~50MB | During install |
171
+ | Dashboard & MCP server (fastapi, uvicorn) | ~20MB | During install |
172
+ | Learning engine (lightgbm) | ~10MB | During install |
173
+ | Search engine (sentence-transformers, torch) | ~200MB | During install |
174
+ | Embedding model (nomic-embed-text-v1.5, 768d) | ~500MB | First use or `slm warmup` |
175
+ | **Mode B** requires [Ollama](https://ollama.com) + a model (`ollama pull llama3.2`) | ~2GB | Manual |
294
176
 
295
177
  ---
296
178
 
297
- ## Quick Start
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.)
179
+ ## MCP + Profiles
371
180
 
372
- SLM supports **two MCP transports** — use whichever fits your tool. Both expose the same 33 tools and 7 resources.
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`).
181
+ SLM supports two MCP transports:
377
182
 
183
+ **HTTP (recommended, v3.6.7+):**
378
184
  ```json
379
- {
380
- "mcpServers": {
381
- "superlocalmemory": {
382
- "type": "http",
383
- "url": "http://127.0.0.1:8765/mcp/"
384
- }
385
- }
386
- }
185
+ { "mcpServers": { "superlocalmemory": { "type": "http", "url": "http://127.0.0.1:8765/mcp/" } } }
387
186
  ```
187
+ Or: `claude mcp add --transport http superlocalmemory http://127.0.0.1:8765/mcp/`
388
188
 
389
- > **Claude Code** also accepts:
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
-
189
+ **stdio (universal fallback):**
398
190
  ```json
399
- {
400
- "mcpServers": {
401
- "superlocalmemory": {
402
- "command": "slm",
403
- "args": ["mcp"]
404
- }
405
- }
406
- }
191
+ { "mcpServers": { "superlocalmemory": { "command": "slm", "args": ["mcp"] } } }
407
192
  ```
408
193
 
409
- #### Option C — `mcp-remote` bridge (for stdio-only tools that want HTTP)
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 |
194
+ ### MCP Profiles (WP-01)
437
195
 
438
- See [`docs/ide-setup.md`](docs/ide-setup.md) for per-IDE configs. 33 MCP tools by default (+42 optional behind `SLM_MCP_ALL_TOOLS=1`) + 7 resources. Works with any MCP-compatible client — we ship templated configs for Claude Code, Cursor, Windsurf, VS Code Copilot, Continue, Cody, ChatGPT Desktop, Gemini CLI, JetBrains, Zed, and Antigravity (15 IDE configs in `ide/configs/`).
196
+ Control tool surface via `SLM_MCP_PROFILE`:
439
197
 
440
- ### Dual Interface: MCP + CLI
198
+ | Profile | Tools | Use case |
199
+ |:--------|:-----:|:---------|
200
+ | `core14` (default) | 14 | Memory core — `remember`, `recall`, `forget`, `session_init`, + mesh |
201
+ | `mesh8` | 8 | Mesh-only — multi-machine coordination |
202
+ | `full38` | 38 | Core + optimize + evolution + trust |
203
+ | `power50` | 50 | Full38 + admin + ingestion + compliance |
204
+ | `whole81` | 81 | Every tool (`SLM_MCP_ALL_TOOLS=1`) |
441
205
 
442
- SLM works everywhere from IDEs to CI pipelines to Docker containers. Both the MCP server and the agent-native CLI are first-class, so the same backend serves IDE-side integrations and scripted automations.
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:
206
+ **Precedence:** `ALL` > `TOOLS` > `PROFILE` > `default`
453
207
 
454
208
  ```bash
455
- # Human-readable (default)
456
- slm recall "database schema"
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": [...]}}
209
+ export SLM_MCP_PROFILE=full38 # or core14 / mesh8 / power50 / whole81
210
+ slm mcp
462
211
  ```
463
212
 
464
- All `--json` responses follow a consistent envelope with `success`, `command`, `version`, `data`, and `next_actions` for agent guidance.
213
+ 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
214
 
466
215
  ---
467
216
 
468
- ## Smart-hook architecture (v3.4.43)
217
+ ## Claude Code Plugin
469
218
 
470
- SLM ships a small set of Claude Code hooks that fire memory operations only
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:
219
+ Install directly in Claude Code without a system-level npm/pip install:
475
220
 
476
221
  ```bash
477
- slm hooks install # wires hooks into ~/.claude/settings.json
478
- slm hooks status # shows what's installed
479
- slm hooks remove # cleans up, preserves non-SLM hooks
222
+ /plugin install superlocalmemory@qualixar
480
223
  ```
481
224
 
482
- | Hook | Event | When it fires | Why |
483
- |---|---|---|---|
484
- | `slm hook start` | SessionStart | Once at session boot | Injects core memory + recent context + learned patterns. ~80ms. |
485
- | `slm hook user_prompt_rehash` | UserPromptSubmit | Every prompt | Detects re-queries within 60s (negative signal that prior recall didn't satisfy). <10ms hot path. |
486
- | **`slm hook topic_shift`** *(new in 3.4.43)* | UserPromptSubmit | When current prompt shares zero content words with every prompt in a 5-turn sliding window | Surfaces a one-line "consider recall" hint on real topic pivots. Replaces the time-based 15-min nag — event-based, not timer-based. <10ms. |
487
- | **`slm hook before_web`** *(new in 3.4.43)* | PreToolUse on `WebSearch\|WebFetch` | Every web search/fetch | Runs `slm recall <query> --limit 5` and injects local memories as a system-reminder BEFORE the web call. Cost: ~500-800ms per fire, fires 5-20× per session. |
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.
225
+ - Self-bootstraps a Python venv, installs all deps in an isolated `SLM_DATA_DIR`
226
+ - Registers 14-tool core MCP surface (`core14` profile by default)
227
+ - Additive does not replace an existing SLM install
228
+ - `slm connect claude-code` detects an existing plugin install and links them
229
+
230
+ See [docs/getting-started.md](docs/getting-started.md) for full plugin walkthrough.
506
231
 
507
232
  ---
508
233
 
509
- ## Three Operating Modes
234
+ ## Modes + EU AI Act
235
+
236
+ <a id="eu-ai-act-compliance"></a>
510
237
 
511
238
  | Mode | What | Cloud? | EU AI Act | Best For |
512
239
  |:----:|:-----|:------:|:---------:|:---------|
@@ -520,87 +247,9 @@ slm mode b # Local Ollama
520
247
  slm mode c # Cloud LLM
521
248
  ```
522
249
 
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. If another fully-local system hits similar numbers, please open an issue — we'll update this line.
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.
250
+ **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
251
 
556
- These three layers collectively yield **+12.7pp average improvement** over the engineering-only baseline, with the Fisher metric alone contributing **+10.8pp** on the hardest conversations.
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.
252
+ The EU AI Act (Regulation 2024/1689) takes full effect **August 2, 2026**.
604
253
 
605
254
  | Requirement | Mode A | Mode B | Mode C |
606
255
  |:------------|:------:|:------:|:------:|
@@ -609,226 +258,51 @@ The EU AI Act (Regulation 2024/1689) takes full effect **August 2, 2026**. Every
609
258
  | Transparency (Art. 13) | **Pass** | **Pass** | **Pass** |
610
259
  | No network calls during memory ops | **Yes** | **Yes** | No |
611
260
 
612
- To the best of our knowledge, **no existing agent memory system addresses EU AI Act compliance**. Modes A and B pass all checks by architectural design — no personal data leaves the device during any memory operation.
261
+ 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
262
 
614
- Built-in compliance tools: GDPR Article 15/17 export + complete erasure, tamper-proof SHA-256 audit chain, data provenance tracking, ABAC policy enforcement.
263
+ 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
264
 
616
265
  ---
617
266
 
618
- ## Multilingual Embedding Support
619
-
620
- **v3.4.24+:** Plug in any OpenAI-compatible embedding endpoint — Ollama, vLLM, LiteLLM, or self-hosted models like `bge-m3`, `multilingual-e5`, `Qwen3-Embedding`. Configure from the dashboard (Settings > Step 3) or `config.json`. SLM's math layer (Fisher-Rao, Sheaf, Langevin) is language-agnostic — swap the embedding model and all 30+ languages work at full retrieval quality. No cloud dependency. No code changes. Your data, your language, your model.
621
-
622
- ---
623
-
624
- ## Web Dashboard
625
-
267
+ ## Advanced
268
+
269
+ | Topic | Link |
270
+ |:------|:-----|
271
+ | 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) |
272
+ | Distributed deployment | [docs/distributed-deployment.md](docs/distributed-deployment.md) |
273
+ | Multi-machine mesh | [docs/multi-machine.md](docs/multi-machine.md) |
274
+ | Auto-memory hooks | [docs/auto-memory.md](docs/auto-memory.md) |
275
+ | Architecture + math | [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md) |
276
+ | CLI reference | [docs/cli-reference.md](docs/cli-reference.md) |
277
+ | MCP tools reference | [docs/mcp-tools.md](docs/mcp-tools.md) |
278
+ | Getting started | [docs/getting-started.md](docs/getting-started.md) |
279
+ | IDE setup (15 configs) | [docs/ide-setup.md](docs/ide-setup.md) |
280
+ | Skill evolution | [docs/skill-evolution.md](docs/skill-evolution.md) |
281
+ | V2 migration | [docs/migration-from-v2.md](docs/migration-from-v2.md) |
282
+ | Configuration | [docs/configuration.md](docs/configuration.md) |
283
+ | Wiki | [github.com/qualixar/superlocalmemory/wiki](https://github.com/qualixar/superlocalmemory/wiki) |
284
+
285
+ **Web dashboard:**
626
286
  ```bash
627
287
  slm dashboard # Opens at http://localhost:8765
628
288
  ```
289
+ 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
290
 
630
- **v3.4.4 "Neural Glass":** 17-tab sidebar dashboard with light + dark theme. Knowledge Graph (Sigma.js WebGL, community detection), Health Monitor, Entity Explorer (1,300+ entities), Mesh Peers (P2P agent communication), Ingestion Status (Gmail/Calendar/Transcript management), Privacy blur mode. Always-on daemon with auto-start. 8 mesh MCP tools built-in. Cross-platform: macOS + Windows + Linux. All data stays local.
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.**
291
+ **Release history:**
662
292
 
663
- </details>
664
-
665
- ---
666
-
667
- ## Multi-Machine Mesh Coordination (New in v3.4.48)
668
-
669
- Run SLM on multiple machines (M4 + M5) and have your agents coordinate as one team without any disruption.
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 |
293
+ | Version | Codename | Key Features |
294
+ |---|---|---|
295
+ | **v3.6.14** | Plugin-native | Claude Code Plugin (WP-06), MCP profiles (WP-01), IDE connect (WP-08), asset consolidation, UI polish (WP-12) |
296
+ | **v3.6.x** | Optimize Everywhere / Distributed-ready | Three surfaces (proxy/MCP/skill), `SLM_REMOTE=1` LAN mode, remote dashboard, custom LLM endpoints |
297
+ | **v3.5.0** | Scale-Ready | CozoDB/LanceDB, 6-channel recall <1s, Core Memory Block, context injection v2, score normalization |
298
+ | **v3.4.x** | Scale-Ready (foundation) | Tiered storage, graph pruning, Hopfield channel, LightGBM ranking, mDNS mesh discovery |
299
+ | **v3.3.x** | Foundation | BM25Plus, Fisher-Rao, sqlite-vec, RRF fusion, cross-encoder rerank. 3 published papers |
826
300
 
827
301
  ---
828
302
 
829
303
  ## Research Papers
830
304
 
831
- SuperLocalMemory is backed by three published research papers (arXiv preprints + Zenodo DOIs) covering trust, information geometry, and cognitive memory architecture. These are preprints — not conference-accepted or journal-published yet.
305
+ SuperLocalMemory is backed by three published research papers (arXiv preprints + Zenodo DOIs). These are preprints — not conference-accepted or journal-published yet.
832
306
 
833
307
  ### Paper 3: The Living Brain (V3.3)
834
308
  > **SuperLocalMemory V3.3: The Living Brain — Biologically-Inspired Forgetting, Cognitive Quantization, and Multi-Channel Retrieval for Zero-LLM Agent Memory Systems**
@@ -875,79 +349,51 @@ SuperLocalMemory is backed by three published research papers (arXiv preprints +
875
349
 
876
350
  ---
877
351
 
878
- ## Prerequisites
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
352
+ ## Support / License / Qualixar
899
353
 
900
354
  See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines. [Wiki](https://github.com/qualixar/superlocalmemory/wiki) for detailed documentation.
901
355
 
902
- ## License
903
-
904
356
  GNU Affero General Public License v3.0 (AGPL-3.0). See [LICENSE](LICENSE).
905
357
 
906
358
  For commercial licensing (closed-source, proprietary, or hosted use), see [COMMERCIAL-LICENSE.md](COMMERCIAL-LICENSE.md) or contact varun.pratap.bhardwaj@gmail.com.
907
359
 
908
360
  Copyright (c) 2026 Varun Pratap Bhardwaj / Qualixar.
909
361
 
910
- ## Attribution
911
-
912
362
  Part of [Qualixar](https://qualixar.com) · Author: [Varun Pratap Bhardwaj](https://varunpratap.com)
913
363
 
914
364
  ### Acknowledgments
915
365
 
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`, giving ECC users richer skill performance tracking. We recommend ECC for Claude Code users who want the deepest learning experience alongside SLM.
366
+ - **[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
367
  - **[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
368
 
919
- ---
369
+ ### Qualixar AI Agent Reliability Platform
920
370
 
921
- <p align="center">
922
- <sub>Built with mathematical rigor. Not in the race — here to help everyone build better AI memory systems.</sub>
923
- </p>
924
-
925
- ---
371
+ Qualixar is building the open-source infrastructure for AI agent reliability engineering. Seven products, one coherent platform:
926
372
 
927
- ## Support This Project
373
+ | Product | Purpose | Install |
374
+ |---------|---------|---------|
375
+ | **[SuperLocalMemory](https://github.com/qualixar/superlocalmemory)** | Persistent memory + learning | `npm install -g superlocalmemory` |
376
+ | **[Qualixar OS](https://github.com/qualixar/qualixar-os)** | Universal agent runtime | `npx qualixar-os` |
377
+ | **[SLM Mesh](https://github.com/qualixar/slm-mesh)** | P2P coordination across sessions | `npm i slm-mesh` |
378
+ | **[SLM MCP Hub](https://github.com/qualixar/slm-mcp-hub)** | Federate 430+ MCP tools | `pip install slm-mcp-hub` |
379
+ | **[AgentAssay](https://github.com/qualixar/agentassay)** | Token-efficient agent testing | `pip install agentassay` |
380
+ | **[AgentAssert](https://github.com/qualixar/agentassert-abc)** | Behavioral contracts + drift detection | `pip install agentassert-abc` |
381
+ | **[SkillFortify](https://github.com/qualixar/skillfortify)** | Formal verification for agent skills | `pip install skillfortify` |
928
382
 
929
- If this project solves a real problem for you, **please star the repo** it helps other developers discover Qualixar and signals that the AI agent reliability community is growing. Every star matters.
383
+ **Zero cloud dependency. Local-first. EU AI Act compliant.**
930
384
 
931
- [![Star History Chart](https://api.star-history.com/svg?repos=qualixar/superlocalmemory&type=Date)](https://star-history.com/#qualixar/superlocalmemory&Date)
385
+ Start here → **[qualixar.com](https://qualixar.com)** · [All papers on Qualixar HuggingFace](https://huggingface.co/Qualixar)
932
386
 
933
387
  ---
934
388
 
935
- ## Part of the Qualixar AI Agent Reliability Platform
936
-
937
- Qualixar is building the open-source infrastructure for AI agent reliability engineering. Seven products, seven research papers (published as arXiv preprints + Zenodo archives), one coherent platform. Each tool solves one reliability pillar:
389
+ <p align="center">
390
+ <sub>Built with mathematical rigor. Not in the race — here to help everyone build better AI memory systems.</sub>
391
+ </p>
938
392
 
939
- | Product | Purpose | Install | Paper |
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) |
393
+ ---
948
394
 
949
- **Zero cloud dependency. Local-first. EU AI Act compliant.**
395
+ ## Star This Project
950
396
 
951
- Start here **[qualixar.com](https://qualixar.com)** · [All papers on Qualixar HuggingFace](https://huggingface.co/Qualixar)
397
+ 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
398
 
953
- ---
399
+ [![Star History Chart](https://api.star-history.com/svg?repos=qualixar/superlocalmemory&type=Date)](https://star-history.com/#qualixar/superlocalmemory&Date)