superlocalmemory 2.7.6 → 2.8.1
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/CHANGELOG.md +120 -155
- package/README.md +115 -89
- package/api_server.py +25 -12
- package/bin/slm +20 -0
- package/docs/PATTERN-LEARNING.md +64 -199
- package/docs/example_graph_usage.py +4 -6
- package/install.sh +74 -0
- package/mcp_server.py +120 -9
- package/package.json +1 -8
- package/scripts/generate-thumbnails.py +3 -5
- package/skills/slm-build-graph/SKILL.md +1 -1
- package/skills/slm-list-recent/SKILL.md +2 -2
- package/skills/slm-recall/SKILL.md +1 -1
- package/skills/slm-remember/SKILL.md +2 -2
- package/skills/slm-show-patterns/SKILL.md +1 -1
- package/skills/slm-status/SKILL.md +2 -2
- package/skills/slm-switch-profile/SKILL.md +4 -4
- package/src/agent_registry.py +7 -18
- package/src/auth_middleware.py +3 -5
- package/src/auto_backup.py +3 -7
- package/src/behavioral/__init__.py +49 -0
- package/src/behavioral/behavioral_listener.py +203 -0
- package/src/behavioral/behavioral_patterns.py +275 -0
- package/src/behavioral/cross_project_transfer.py +206 -0
- package/src/behavioral/outcome_inference.py +194 -0
- package/src/behavioral/outcome_tracker.py +193 -0
- package/src/behavioral/tests/__init__.py +4 -0
- package/src/behavioral/tests/test_behavioral_integration.py +108 -0
- package/src/behavioral/tests/test_behavioral_patterns.py +150 -0
- package/src/behavioral/tests/test_cross_project_transfer.py +142 -0
- package/src/behavioral/tests/test_mcp_behavioral.py +139 -0
- package/src/behavioral/tests/test_mcp_report_outcome.py +117 -0
- package/src/behavioral/tests/test_outcome_inference.py +107 -0
- package/src/behavioral/tests/test_outcome_tracker.py +96 -0
- package/src/cache_manager.py +4 -6
- package/src/compliance/__init__.py +48 -0
- package/src/compliance/abac_engine.py +149 -0
- package/src/compliance/abac_middleware.py +116 -0
- package/src/compliance/audit_db.py +215 -0
- package/src/compliance/audit_logger.py +148 -0
- package/src/compliance/retention_manager.py +289 -0
- package/src/compliance/retention_scheduler.py +186 -0
- package/src/compliance/tests/__init__.py +4 -0
- package/src/compliance/tests/test_abac_enforcement.py +95 -0
- package/src/compliance/tests/test_abac_engine.py +124 -0
- package/src/compliance/tests/test_abac_mcp_integration.py +118 -0
- package/src/compliance/tests/test_audit_db.py +123 -0
- package/src/compliance/tests/test_audit_logger.py +98 -0
- package/src/compliance/tests/test_mcp_audit.py +128 -0
- package/src/compliance/tests/test_mcp_retention_policy.py +125 -0
- package/src/compliance/tests/test_retention_manager.py +131 -0
- package/src/compliance/tests/test_retention_scheduler.py +99 -0
- package/src/db_connection_manager.py +2 -12
- package/src/embedding_engine.py +61 -669
- package/src/embeddings/__init__.py +47 -0
- package/src/embeddings/cache.py +70 -0
- package/src/embeddings/cli.py +113 -0
- package/src/embeddings/constants.py +47 -0
- package/src/embeddings/database.py +91 -0
- package/src/embeddings/engine.py +247 -0
- package/src/embeddings/model_loader.py +145 -0
- package/src/event_bus.py +3 -13
- package/src/graph/__init__.py +36 -0
- package/src/graph/build_helpers.py +74 -0
- package/src/graph/cli.py +87 -0
- package/src/graph/cluster_builder.py +188 -0
- package/src/graph/cluster_summary.py +148 -0
- package/src/graph/constants.py +47 -0
- package/src/graph/edge_builder.py +162 -0
- package/src/graph/entity_extractor.py +95 -0
- package/src/graph/graph_core.py +226 -0
- package/src/graph/graph_search.py +231 -0
- package/src/graph/hierarchical.py +207 -0
- package/src/graph/schema.py +99 -0
- package/src/graph_engine.py +45 -1451
- package/src/hnsw_index.py +13 -11
- package/src/hybrid_search.py +36 -683
- package/src/learning/__init__.py +27 -12
- package/src/learning/adaptive_ranker.py +50 -12
- package/src/learning/cross_project_aggregator.py +2 -12
- package/src/learning/engagement_tracker.py +2 -12
- package/src/learning/feature_extractor.py +175 -43
- package/src/learning/feedback_collector.py +7 -12
- package/src/learning/learning_db.py +180 -12
- package/src/learning/project_context_manager.py +2 -12
- package/src/learning/source_quality_scorer.py +2 -12
- package/src/learning/synthetic_bootstrap.py +2 -12
- package/src/learning/tests/__init__.py +2 -0
- package/src/learning/tests/test_adaptive_ranker.py +2 -6
- package/src/learning/tests/test_adaptive_ranker_v28.py +60 -0
- package/src/learning/tests/test_aggregator.py +2 -6
- package/src/learning/tests/test_auto_retrain_v28.py +35 -0
- package/src/learning/tests/test_e2e_ranking_v28.py +82 -0
- package/src/learning/tests/test_feature_extractor_v28.py +93 -0
- package/src/learning/tests/test_feedback_collector.py +2 -6
- package/src/learning/tests/test_learning_db.py +2 -6
- package/src/learning/tests/test_learning_db_v28.py +110 -0
- package/src/learning/tests/test_learning_init_v28.py +48 -0
- package/src/learning/tests/test_outcome_signals.py +48 -0
- package/src/learning/tests/test_project_context.py +2 -6
- package/src/learning/tests/test_schema_migration.py +319 -0
- package/src/learning/tests/test_signal_inference.py +11 -13
- package/src/learning/tests/test_source_quality.py +2 -6
- package/src/learning/tests/test_synthetic_bootstrap.py +3 -7
- package/src/learning/tests/test_workflow_miner.py +2 -6
- package/src/learning/workflow_pattern_miner.py +2 -12
- package/src/lifecycle/__init__.py +54 -0
- package/src/lifecycle/bounded_growth.py +239 -0
- package/src/lifecycle/compaction_engine.py +226 -0
- package/src/lifecycle/lifecycle_engine.py +355 -0
- package/src/lifecycle/lifecycle_evaluator.py +257 -0
- package/src/lifecycle/lifecycle_scheduler.py +130 -0
- package/src/lifecycle/retention_policy.py +285 -0
- package/src/lifecycle/tests/__init__.py +4 -0
- package/src/lifecycle/tests/test_bounded_growth.py +193 -0
- package/src/lifecycle/tests/test_compaction.py +179 -0
- package/src/lifecycle/tests/test_lifecycle_engine.py +137 -0
- package/src/lifecycle/tests/test_lifecycle_evaluation.py +177 -0
- package/src/lifecycle/tests/test_lifecycle_scheduler.py +127 -0
- package/src/lifecycle/tests/test_lifecycle_search.py +109 -0
- package/src/lifecycle/tests/test_mcp_compact.py +149 -0
- package/src/lifecycle/tests/test_mcp_lifecycle_status.py +114 -0
- package/src/lifecycle/tests/test_retention_policy.py +162 -0
- package/src/mcp_tools_v28.py +281 -0
- package/src/memory-profiles.py +3 -12
- package/src/memory-reset.py +2 -12
- package/src/memory_compression.py +2 -12
- package/src/memory_store_v2.py +76 -20
- package/src/migrate_v1_to_v2.py +2 -12
- package/src/pattern_learner.py +29 -975
- package/src/patterns/__init__.py +24 -0
- package/src/patterns/analyzers.py +247 -0
- package/src/patterns/learner.py +267 -0
- package/src/patterns/scoring.py +167 -0
- package/src/patterns/store.py +223 -0
- package/src/patterns/terminology.py +138 -0
- package/src/provenance_tracker.py +4 -14
- package/src/query_optimizer.py +4 -6
- package/src/rate_limiter.py +2 -6
- package/src/search/__init__.py +20 -0
- package/src/search/cli.py +77 -0
- package/src/search/constants.py +26 -0
- package/src/search/engine.py +239 -0
- package/src/search/fusion.py +122 -0
- package/src/search/index_loader.py +112 -0
- package/src/search/methods.py +162 -0
- package/src/search_engine_v2.py +4 -6
- package/src/setup_validator.py +7 -13
- package/src/subscription_manager.py +2 -12
- package/src/tree/__init__.py +59 -0
- package/src/tree/builder.py +183 -0
- package/src/tree/nodes.py +196 -0
- package/src/tree/queries.py +252 -0
- package/src/tree/schema.py +76 -0
- package/src/tree_manager.py +10 -711
- package/src/trust/__init__.py +45 -0
- package/src/trust/constants.py +66 -0
- package/src/trust/queries.py +157 -0
- package/src/trust/schema.py +95 -0
- package/src/trust/scorer.py +299 -0
- package/src/trust/signals.py +95 -0
- package/src/trust_scorer.py +39 -697
- package/src/webhook_dispatcher.py +2 -12
- package/ui/app.js +1 -1
- package/ui/index.html +152 -4
- package/ui/js/agents.js +1 -1
- package/ui/js/behavioral.js +276 -0
- package/ui/js/compliance.js +252 -0
- package/ui/js/init.js +10 -0
- package/ui/js/lifecycle.js +298 -0
- package/ui/js/profiles.js +4 -0
- package/ui_server.py +21 -14
- package/ATTRIBUTION.md +0 -140
- package/docs/ARCHITECTURE-V2.5.md +0 -190
- package/docs/GRAPH-ENGINE.md +0 -503
- package/docs/architecture-diagram.drawio +0 -405
- package/docs/plans/2026-02-13-benchmark-suite.md +0 -1349
package/README.md
CHANGED
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
<p align="center">
|
|
2
|
-
<img src="https://superlocalmemory.com/assets/logo-mark.png" alt="SuperLocalMemory
|
|
2
|
+
<img src="https://superlocalmemory.com/assets/logo-mark.png" alt="SuperLocalMemory" width="200"/>
|
|
3
3
|
</p>
|
|
4
4
|
|
|
5
|
-
<h1 align="center">SuperLocalMemory
|
|
5
|
+
<h1 align="center">SuperLocalMemory</h1>
|
|
6
6
|
<p align="center"><strong>Your AI Finally Remembers You</strong></p>
|
|
7
7
|
|
|
8
8
|
<p align="center">
|
|
9
|
-
<strong
|
|
10
|
-
<em>Solution Architect • Original Creator • 2026</em>
|
|
9
|
+
<strong>Stop re-explaining your codebase every session. 100% local. Zero setup. Completely free.</strong>
|
|
11
10
|
</p>
|
|
12
11
|
|
|
13
12
|
<p align="center">
|
|
14
|
-
<
|
|
13
|
+
<a href="https://superlocalmemory.com"><img src="https://img.shields.io/badge/🌐_Website-superlocalmemory.com-ff6b35?style=for-the-badge" alt="Official Website"/></a>
|
|
15
14
|
</p>
|
|
16
15
|
|
|
17
16
|
<p align="center">
|
|
18
|
-
<a href="https://
|
|
17
|
+
<a href="https://zenodo.org/records/18709670"><img src="https://img.shields.io/badge/DOI-10.5281%2Fzenodo.18709670-blue?style=for-the-badge&logo=doi&logoColor=white" alt="DOI"/></a>
|
|
18
|
+
<a href="https://zenodo.org/records/18709670"><img src="https://img.shields.io/badge/Zenodo-Research_Paper-1682D4?style=for-the-badge&logo=zenodo&logoColor=white" alt="Zenodo"/></a>
|
|
19
|
+
<a href="https://www.researchgate.net/publication/400976053"><img src="https://img.shields.io/badge/ResearchGate-Paper-00CCBB?style=for-the-badge&logo=researchgate&logoColor=white" alt="ResearchGate"/></a>
|
|
19
20
|
</p>
|
|
20
21
|
|
|
21
22
|
<p align="center">
|
|
@@ -39,86 +40,114 @@
|
|
|
39
40
|
<p align="center">
|
|
40
41
|
<b>Created by <a href="https://github.com/varun369">Varun Pratap Bhardwaj</a></b> •
|
|
41
42
|
<a href="https://github.com/sponsors/varun369">💖 Sponsor</a> •
|
|
42
|
-
<a href="
|
|
43
|
+
<a href="LICENSE">📜 MIT License</a>
|
|
43
44
|
</p>
|
|
44
45
|
|
|
45
46
|
---
|
|
46
47
|
|
|
47
|
-
##
|
|
48
|
+
## Research Paper
|
|
48
49
|
|
|
49
|
-
**SuperLocalMemory
|
|
50
|
+
**SuperLocalMemory: Privacy-Preserving Multi-Agent Memory with Bayesian Trust Defense Against Memory Poisoning**
|
|
50
51
|
|
|
51
|
-
|
|
52
|
+
*Varun Pratap Bhardwaj, 2026*
|
|
52
53
|
|
|
53
|
-
|
|
54
|
+
The paper presents SuperLocalMemory's architecture for defending against OWASP ASI06 memory poisoning through local-first design, Bayesian trust scoring, and adaptive learning-to-rank — all without cloud dependencies or LLM inference calls.
|
|
54
55
|
|
|
55
|
-
|
|
|
56
|
-
|
|
57
|
-
| **
|
|
58
|
-
| **
|
|
59
|
-
| **
|
|
56
|
+
| Platform | Link |
|
|
57
|
+
|----------|------|
|
|
58
|
+
| **Zenodo** (CERN) | [DOI: 10.5281/zenodo.18709670](https://zenodo.org/records/18709670) |
|
|
59
|
+
| **ResearchGate** | [Publication Page](https://www.researchgate.net/publication/400976053) |
|
|
60
|
+
| **arXiv** | Submission under review |
|
|
61
|
+
| **Research Portfolio** | [superlocalmemory.com/research](https://superlocalmemory.com/research) |
|
|
60
62
|
|
|
61
|
-
|
|
63
|
+
If you use SuperLocalMemory in your research, please cite:
|
|
62
64
|
|
|
63
|
-
|
|
65
|
+
```bibtex
|
|
66
|
+
@misc{bhardwaj2026superlocalmemory,
|
|
67
|
+
title={SuperLocalMemory: Privacy-Preserving Multi-Agent Memory with Bayesian Trust Defense Against Memory Poisoning},
|
|
68
|
+
author={Bhardwaj, Varun Pratap},
|
|
69
|
+
year={2026},
|
|
70
|
+
doi={10.5281/zenodo.18709670},
|
|
71
|
+
url={https://zenodo.org/records/18709670},
|
|
72
|
+
note={Preprint}
|
|
73
|
+
}
|
|
74
|
+
```
|
|
64
75
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
## What's New in v2.8 — "Memory That Manages Itself"
|
|
68
79
|
|
|
69
|
-
|
|
80
|
+
**SuperLocalMemory now manages its own memory lifecycle, learns from action outcomes, and provides enterprise-grade compliance — all 100% locally on your machine.**
|
|
70
81
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
| **Telemetry?** | Zero. Absolutely none. | Usage analytics, behavior tracking |
|
|
82
|
+
### Memory Lifecycle Management (v2.8)
|
|
83
|
+
Memories automatically transition through lifecycle states based on usage patterns:
|
|
84
|
+
- **Active** — Frequently used, instantly available
|
|
85
|
+
- **Warm** — Recently used, included in searches
|
|
86
|
+
- **Cold** — Older, retrievable on demand
|
|
87
|
+
- **Archived** — Compressed, restorable when needed
|
|
78
88
|
|
|
79
|
-
|
|
89
|
+
Configure bounds to keep your memory system fast:
|
|
90
|
+
```bash
|
|
91
|
+
# Check lifecycle status
|
|
92
|
+
slm lifecycle-status
|
|
80
93
|
|
|
81
|
-
|
|
94
|
+
# Compact stale memories
|
|
95
|
+
slm compact --dry-run
|
|
96
|
+
```
|
|
82
97
|
|
|
83
|
-
|
|
98
|
+
### Behavioral Learning (v2.8)
|
|
99
|
+
The system learns from what works:
|
|
100
|
+
- Report outcomes: `slm report-outcome --memory-ids 1,5 --outcome success`
|
|
101
|
+
- View patterns: `slm behavioral-patterns`
|
|
102
|
+
- Knowledge transfers across projects automatically
|
|
84
103
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
| Bayesian confidence scoring | MACLA (arXiv:2512.18950) |
|
|
91
|
-
| LightGBM LambdaRank | Pairwise ranking (Burges 2010, MO-LightGBM SIGIR 2025) |
|
|
92
|
-
| Privacy-preserving feedback | Zero-communication design — stronger than differential privacy (ADPMF, IPM 2024) |
|
|
104
|
+
### Enterprise Compliance (v2.8)
|
|
105
|
+
Built for regulated environments:
|
|
106
|
+
- **Access Control** — Attribute-based policies (ABAC)
|
|
107
|
+
- **Audit Trail** — Tamper-evident event logging
|
|
108
|
+
- **Retention Policies** — GDPR erasure, HIPAA retention, EU AI Act compliance
|
|
93
109
|
|
|
94
|
-
### New MCP Tools
|
|
110
|
+
### New MCP Tools (v2.8)
|
|
95
111
|
|
|
96
112
|
| Tool | Purpose |
|
|
97
113
|
|------|---------|
|
|
98
|
-
| `
|
|
99
|
-
| `
|
|
100
|
-
| `
|
|
114
|
+
| `report_outcome` | Record action outcomes for behavioral learning |
|
|
115
|
+
| `get_lifecycle_status` | View memory lifecycle states |
|
|
116
|
+
| `set_retention_policy` | Configure retention policies |
|
|
117
|
+
| `compact_memories` | Trigger lifecycle transitions |
|
|
118
|
+
| `get_behavioral_patterns` | View learned behavioral patterns |
|
|
119
|
+
| `audit_trail` | Query compliance audit trail |
|
|
101
120
|
|
|
102
|
-
###
|
|
121
|
+
### Performance
|
|
103
122
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
slm engagement # Local engagement health metrics
|
|
110
|
-
```
|
|
123
|
+
| Operation | Latency |
|
|
124
|
+
|-----------|---------|
|
|
125
|
+
| Lifecycle evaluation | Sub-2ms |
|
|
126
|
+
| Access control check | Sub-1ms |
|
|
127
|
+
| Feature vector (20-dim) | Sub-5ms |
|
|
111
128
|
|
|
112
|
-
**Upgrade:** `npm install -g superlocalmemory@latest` —
|
|
129
|
+
**Upgrade:** `npm install -g superlocalmemory@latest` — All v2.7 behavior preserved, zero breaking changes.
|
|
113
130
|
|
|
114
|
-
[
|
|
131
|
+
[Upgrading to v2.8](https://github.com/varun369/SuperLocalMemoryV2/wiki/Upgrading-to-v2.8) | [Full Changelog](CHANGELOG.md)
|
|
115
132
|
|
|
116
133
|
---
|
|
117
134
|
|
|
135
|
+
<details>
|
|
136
|
+
<summary><strong>Previous: v2.7 — "Your AI Learns You"</strong></summary>
|
|
137
|
+
|
|
138
|
+
SuperLocalMemory learns your patterns, adapts to your workflow, and personalizes recall — all 100% locally. No cloud. No LLM. Your behavioral data never leaves your device.
|
|
139
|
+
|
|
140
|
+
- **Adaptive Learning** — Learns tech preferences, project context, and workflow patterns
|
|
141
|
+
- **Three-Phase Ranking** — Baseline → Rule-Based → ML Ranking (gets smarter over time)
|
|
142
|
+
- **Privacy by Design** — Learning data stored separately, one-command GDPR erasure
|
|
143
|
+
- **3 New MCP Tools** — Feedback signal, pattern transparency, and user correction
|
|
144
|
+
|
|
145
|
+
</details>
|
|
146
|
+
|
|
118
147
|
<details>
|
|
119
148
|
<summary><strong>Previous: v2.6.5 — Interactive Knowledge Graph</strong></summary>
|
|
120
149
|
|
|
121
|
-
- Fully interactive visualization with zoom, pan, click-to-explore
|
|
150
|
+
- Fully interactive visualization with zoom, pan, and click-to-explore
|
|
122
151
|
- 6 layout algorithms, smart cluster filtering, 10,000+ node performance
|
|
123
152
|
- Mobile & accessibility support: touch gestures, keyboard nav, screen reader
|
|
124
153
|
|
|
@@ -141,7 +170,7 @@ SuperLocalMemory is now **production-hardened** with security, performance, and
|
|
|
141
170
|
|
|
142
171
|
**Upgrade:** `npm install -g superlocalmemory@latest`
|
|
143
172
|
|
|
144
|
-
[Interactive Architecture Diagram](https://superlocalmemory.com/architecture.html) | [Architecture Doc](docs/ARCHITECTURE
|
|
173
|
+
[Interactive Architecture Diagram](https://superlocalmemory.com/architecture.html) | [Architecture Doc](docs/ARCHITECTURE.md) | [Full Changelog](CHANGELOG.md)
|
|
145
174
|
|
|
146
175
|
</details>
|
|
147
176
|
|
|
@@ -232,22 +261,13 @@ python3 ~/.claude-memory/ui_server.py
|
|
|
232
261
|
| Code preferences | "I prefer React..." every time | Pattern learning knows your style |
|
|
233
262
|
| Multi-project | Context constantly bleeds | Separate profiles per project |
|
|
234
263
|
|
|
235
|
-
### Built on
|
|
236
|
-
|
|
237
|
-
Not another simple key-value store. SuperLocalMemory implements **cutting-edge memory architecture** backed by peer-reviewed research:
|
|
264
|
+
### Built on Peer-Reviewed Research
|
|
238
265
|
|
|
239
|
-
- **
|
|
240
|
-
- **GraphRAG** (Microsoft) → Knowledge graph with auto-clustering
|
|
241
|
-
- **xMemory** (Stanford) → Identity pattern learning
|
|
242
|
-
- **A-RAG** → Multi-level retrieval with context awareness
|
|
243
|
-
- **LambdaRank** (Burges 2010, MO-LightGBM SIGIR 2025) → Adaptive re-ranking *(v2.7)*
|
|
244
|
-
- **TSW-PrefixSpan** (IEEE 2020) → Time-weighted workflow pattern mining *(v2.7)*
|
|
245
|
-
- **MACLA** (arXiv:2512.18950) → Bayesian temporal confidence scoring *(v2.7)*
|
|
246
|
-
- **FCS** (LREC 2024) → Hierarchical cold-start mitigation *(v2.7)*
|
|
266
|
+
Not another simple key-value store. SuperLocalMemory implements **cutting-edge memory architecture** backed by peer-reviewed research — hierarchical organization, knowledge graph clustering, identity pattern learning, multi-level retrieval, adaptive re-ranking, workflow sequence mining, temporal confidence scoring, and cold-start mitigation.
|
|
247
267
|
|
|
248
|
-
**The only open-source implementation combining all
|
|
268
|
+
**The only open-source implementation combining all these approaches — entirely locally.**
|
|
249
269
|
|
|
250
|
-
[
|
|
270
|
+
[Read the paper →](https://zenodo.org/records/18709670)
|
|
251
271
|
|
|
252
272
|
---
|
|
253
273
|
|
|
@@ -270,52 +290,54 @@ Not another simple key-value store. SuperLocalMemory implements **cutting-edge m
|
|
|
270
290
|
│ 17+ IDEs with single database │
|
|
271
291
|
├─────────────────────────────────────────────────────────────┤
|
|
272
292
|
│ Layer 6: MCP INTEGRATION │
|
|
273
|
-
│ Model Context Protocol:
|
|
293
|
+
│ Model Context Protocol: 18 tools, 6 resources, 2 prompts │
|
|
274
294
|
│ Auto-configured for Cursor, Windsurf, Claude │
|
|
275
295
|
├─────────────────────────────────────────────────────────────┤
|
|
276
296
|
│ Layer 5½: ADAPTIVE LEARNING (v2.7 — NEW) │
|
|
277
297
|
│ Three-layer learning: tech prefs + project context + flow │
|
|
278
|
-
│
|
|
279
|
-
│ Research: eKNOW 2025, MACLA, TSW-PrefixSpan, LREC 2024 │
|
|
298
|
+
│ Local ML re-ranking — no cloud, no telemetry │
|
|
280
299
|
├─────────────────────────────────────────────────────────────┤
|
|
281
300
|
│ Layer 5: SKILLS LAYER │
|
|
282
301
|
│ 7 universal slash-commands for AI assistants │
|
|
283
302
|
│ Compatible with Claude Code, Continue, Cody │
|
|
284
303
|
├─────────────────────────────────────────────────────────────┤
|
|
285
|
-
│ Layer 4: PATTERN LEARNING
|
|
286
|
-
│
|
|
304
|
+
│ Layer 4: PATTERN LEARNING │
|
|
305
|
+
│ Confidence-scored preference detection │
|
|
287
306
|
│ "You prefer React over Vue" (73% confidence) │
|
|
288
307
|
├─────────────────────────────────────────────────────────────┤
|
|
289
308
|
│ Layer 3: KNOWLEDGE GRAPH + HIERARCHICAL CLUSTERING │
|
|
290
|
-
│
|
|
291
|
-
│ Community summaries with
|
|
309
|
+
│ Auto-clustering: "Python" → "Web API" → "Auth" │
|
|
310
|
+
│ Community summaries with auto-generated labels │
|
|
292
311
|
├─────────────────────────────────────────────────────────────┤
|
|
293
312
|
│ Layer 2: HIERARCHICAL INDEX │
|
|
294
313
|
│ Tree structure for fast navigation │
|
|
295
314
|
│ O(log n) lookups instead of O(n) scans │
|
|
296
315
|
├─────────────────────────────────────────────────────────────┤
|
|
297
316
|
│ Layer 1: RAW STORAGE │
|
|
298
|
-
│ SQLite + Full-text search +
|
|
317
|
+
│ SQLite + Full-text search + vector search │
|
|
299
318
|
│ Compression: 60-96% space savings │
|
|
300
319
|
└─────────────────────────────────────────────────────────────┘
|
|
301
320
|
```
|
|
302
321
|
|
|
303
322
|
### Key Capabilities
|
|
304
323
|
|
|
305
|
-
- **[Adaptive Learning System](https://github.com/varun369/SuperLocalMemoryV2/wiki/Learning-System)** — Learns your tech preferences, workflow patterns, and project context. Personalizes recall ranking using local ML
|
|
306
|
-
- **[Knowledge Graphs](https://github.com/varun369/SuperLocalMemoryV2/wiki/Knowledge-Graph)** — Automatic relationship discovery. Interactive visualization with zoom, pan, click.
|
|
307
|
-
- **[Pattern Learning](https://github.com/varun369/SuperLocalMemoryV2/wiki/Pattern-Learning)** — Learns your coding preferences and style automatically.
|
|
308
|
-
- **[Multi-Profile Support](https://github.com/varun369/SuperLocalMemoryV2/wiki/
|
|
324
|
+
- **[Adaptive Learning System](https://github.com/varun369/SuperLocalMemoryV2/wiki/Learning-System)** — Learns your tech preferences, workflow patterns, and project context. Personalizes recall ranking using local ML. Zero cloud dependency. *New in v2.7*
|
|
325
|
+
- **[Knowledge Graphs](https://github.com/varun369/SuperLocalMemoryV2/wiki/Knowledge-Graph-Guide)** — Automatic relationship discovery. Interactive visualization with zoom, pan, click.
|
|
326
|
+
- **[Pattern Learning](https://github.com/varun369/SuperLocalMemoryV2/wiki/Pattern-Learning-Explained)** — Learns your coding preferences and style automatically.
|
|
327
|
+
- **[Multi-Profile Support](https://github.com/varun369/SuperLocalMemoryV2/wiki/Multi-Profile-Workflows)** — Isolated contexts for work, personal, clients. Zero context bleeding.
|
|
309
328
|
- **[Hybrid Search](https://github.com/varun369/SuperLocalMemoryV2/wiki/Advanced-Search)** — Semantic + FTS5 + Graph retrieval combined for maximum accuracy.
|
|
310
329
|
- **[Visualization Dashboard](https://github.com/varun369/SuperLocalMemoryV2/wiki/Visualization-Dashboard)** — Web UI for timeline, search, graph exploration, analytics.
|
|
311
330
|
- **[Framework Integrations](docs/FRAMEWORK-INTEGRATIONS.md)** — Use with LangChain and LlamaIndex applications.
|
|
312
331
|
- **[Real-Time Events](https://github.com/varun369/SuperLocalMemoryV2/wiki/Real-Time-Event-System)** — Live notifications via SSE/WebSocket/Webhooks when memories change.
|
|
332
|
+
- **[Memory Lifecycle](https://github.com/varun369/SuperLocalMemoryV2/wiki/Memory-Lifecycle)** — Automatic state transitions (Active → Warm → Cold → Archived) with bounded growth guarantees. *New in v2.8*
|
|
333
|
+
- **[Behavioral Learning](https://github.com/varun369/SuperLocalMemoryV2/wiki/Behavioral-Learning)** — Learns from action outcomes, extracts success/failure patterns, transfers knowledge across projects. *New in v2.8*
|
|
334
|
+
- **[Enterprise Compliance](https://github.com/varun369/SuperLocalMemoryV2/wiki/Enterprise-Compliance)** — ABAC access control, tamper-evident audit trail, GDPR/HIPAA/EU AI Act retention policies. *New in v2.8*
|
|
313
335
|
|
|
314
336
|
---
|
|
315
337
|
|
|
316
338
|
## 🌐 Works Everywhere
|
|
317
339
|
|
|
318
|
-
**SuperLocalMemory
|
|
340
|
+
**SuperLocalMemory is the ONLY memory system that works across ALL your tools:**
|
|
319
341
|
|
|
320
342
|
### Supported IDEs & Tools
|
|
321
343
|
|
|
@@ -340,7 +362,7 @@ Not another simple key-value store. SuperLocalMemory implements **cutting-edge m
|
|
|
340
362
|
1. **MCP (Model Context Protocol)** — Auto-configured for Cursor, Windsurf, Claude Desktop
|
|
341
363
|
- AI assistants get natural access to your memory
|
|
342
364
|
- No manual commands needed
|
|
343
|
-
- "Remember that we use
|
|
365
|
+
- "Remember that we use this framework" just works
|
|
344
366
|
|
|
345
367
|
2. **Skills & Commands** — For Claude Code, Continue.dev, Cody
|
|
346
368
|
- `/superlocalmemoryv2:remember` in Claude Code
|
|
@@ -369,11 +391,11 @@ Not another simple key-value store. SuperLocalMemory implements **cutting-edge m
|
|
|
369
391
|
| **Supermemory** | 1M tokens, 10K queries | $19-399/mo | Not local, no graphs |
|
|
370
392
|
| **Personal.AI** | ❌ No free tier | $33/month | Cloud-only, closed ecosystem |
|
|
371
393
|
| **Letta/MemGPT** | Self-hosted (complex) | TBD | Requires significant setup |
|
|
372
|
-
| **SuperLocalMemory
|
|
394
|
+
| **SuperLocalMemory** | **Unlimited** | **$0 forever** | **Nothing.** |
|
|
373
395
|
|
|
374
396
|
### What Actually Matters
|
|
375
397
|
|
|
376
|
-
| Feature | Mem0 | Zep | Khoj | Letta | **SuperLocalMemory
|
|
398
|
+
| Feature | Mem0 | Zep | Khoj | Letta | **SuperLocalMemory** |
|
|
377
399
|
|---------|------|-----|------|-------|------------------------|
|
|
378
400
|
| **Works in Cursor** | Cloud Only | ❌ | ❌ | ❌ | ✅ **Local** |
|
|
379
401
|
| **Works in Windsurf** | Cloud Only | ❌ | ❌ | ❌ | ✅ **Local** |
|
|
@@ -388,7 +410,7 @@ Not another simple key-value store. SuperLocalMemory implements **cutting-edge m
|
|
|
388
410
|
| **Zero Setup** | ❌ | ❌ | ❌ | ❌ | ✅ |
|
|
389
411
|
| **Completely Free** | Limited | Limited | Partial | ✅ | ✅ |
|
|
390
412
|
|
|
391
|
-
**SuperLocalMemory
|
|
413
|
+
**SuperLocalMemory is the ONLY solution that:**
|
|
392
414
|
- ✅ **Learns and adapts** locally — no cloud LLM needed for personalization
|
|
393
415
|
- ✅ Works across 17+ IDEs and CLI tools
|
|
394
416
|
- ✅ Remains 100% local (no cloud dependencies)
|
|
@@ -421,7 +443,7 @@ For typical personal use (under 500 memories), search results return faster than
|
|
|
421
443
|
| 2 AI tools simultaneously | **220/sec** | 0 |
|
|
422
444
|
| 5 AI tools simultaneously | **130/sec** | 0 |
|
|
423
445
|
|
|
424
|
-
|
|
446
|
+
Concurrent-safe architecture = zero "database is locked" errors, ever.
|
|
425
447
|
|
|
426
448
|
### Storage
|
|
427
449
|
|
|
@@ -434,7 +456,7 @@ WAL mode + serialized write queue = zero "database is locked" errors, ever.
|
|
|
434
456
|
| 100 | 0.28s |
|
|
435
457
|
| 1,000 | 10.6s |
|
|
436
458
|
|
|
437
|
-
|
|
459
|
+
Auto-clustering discovers 6-7 natural topic communities from your memories.
|
|
438
460
|
|
|
439
461
|
[Full benchmark details →](https://github.com/varun369/SuperLocalMemoryV2/wiki/Performance-Benchmarks)
|
|
440
462
|
|
|
@@ -479,8 +501,12 @@ python ~/.claude-memory/ui_server.py # Launch web UI
|
|
|
479
501
|
| [Visualization Dashboard](https://github.com/varun369/SuperLocalMemoryV2/wiki/Visualization-Dashboard) | Interactive web UI guide |
|
|
480
502
|
| [Interactive Graph](https://github.com/varun369/SuperLocalMemoryV2/wiki/Using-Interactive-Graph) | Graph exploration guide (NEW v2.6.5) |
|
|
481
503
|
| [Framework Integrations](docs/FRAMEWORK-INTEGRATIONS.md) | LangChain & LlamaIndex setup |
|
|
482
|
-
| [Knowledge Graph](
|
|
504
|
+
| [Knowledge Graph](https://github.com/varun369/SuperLocalMemoryV2/wiki/Knowledge-Graph-Guide) | How clustering works |
|
|
483
505
|
| [Pattern Learning](docs/PATTERN-LEARNING.md) | Identity extraction |
|
|
506
|
+
| [Memory Lifecycle](https://github.com/varun369/SuperLocalMemoryV2/wiki/Memory-Lifecycle) | Lifecycle states, compaction, bounded growth (v2.8) |
|
|
507
|
+
| [Behavioral Learning](https://github.com/varun369/SuperLocalMemoryV2/wiki/Behavioral-Learning) | Action outcomes, pattern extraction (v2.8) |
|
|
508
|
+
| [Enterprise Compliance](https://github.com/varun369/SuperLocalMemoryV2/wiki/Enterprise-Compliance) | ABAC, audit trail, retention policies (v2.8) |
|
|
509
|
+
| [Upgrading to v2.8](https://github.com/varun369/SuperLocalMemoryV2/wiki/Upgrading-to-v2.8) | Migration guide from v2.7 |
|
|
484
510
|
| [API Reference](docs/API-REFERENCE.md) | Python API documentation |
|
|
485
511
|
|
|
486
512
|
---
|
package/api_server.py
CHANGED
|
@@ -1,16 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env python3
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
Copyright (c) 2026 Varun Pratap Bhardwaj
|
|
5
|
-
Licensed under MIT License
|
|
6
|
-
|
|
7
|
-
Repository: https://github.com/varun369/SuperLocalMemoryV2
|
|
8
|
-
Author: Varun Pratap Bhardwaj (Solution Architect)
|
|
9
|
-
|
|
10
|
-
NOTICE: This software is protected by MIT License.
|
|
11
|
-
Attribution must be preserved in all copies or derivatives.
|
|
12
|
-
"""
|
|
13
|
-
|
|
2
|
+
# SPDX-License-Identifier: MIT
|
|
3
|
+
# Copyright (c) 2026 SuperLocalMemory (superlocalmemory.com)
|
|
14
4
|
"""
|
|
15
5
|
SuperLocalMemory V2 - FastAPI UI Server
|
|
16
6
|
Provides REST endpoints for memory visualization and exploration.
|
|
@@ -681,6 +671,29 @@ async def get_tree():
|
|
|
681
671
|
}
|
|
682
672
|
|
|
683
673
|
|
|
674
|
+
# ============================================================================
|
|
675
|
+
# v2.8 Routes (graceful — don't fail if engines unavailable)
|
|
676
|
+
# ============================================================================
|
|
677
|
+
|
|
678
|
+
try:
|
|
679
|
+
from routes.lifecycle import router as lifecycle_router
|
|
680
|
+
app.include_router(lifecycle_router)
|
|
681
|
+
except ImportError:
|
|
682
|
+
pass
|
|
683
|
+
|
|
684
|
+
try:
|
|
685
|
+
from routes.behavioral import router as behavioral_router
|
|
686
|
+
app.include_router(behavioral_router)
|
|
687
|
+
except ImportError:
|
|
688
|
+
pass
|
|
689
|
+
|
|
690
|
+
try:
|
|
691
|
+
from routes.compliance import router as compliance_router
|
|
692
|
+
app.include_router(compliance_router)
|
|
693
|
+
except ImportError:
|
|
694
|
+
pass
|
|
695
|
+
|
|
696
|
+
|
|
684
697
|
# ============================================================================
|
|
685
698
|
# Server Startup
|
|
686
699
|
# ============================================================================
|
package/bin/slm
CHANGED
|
@@ -55,6 +55,23 @@ case "$1" in
|
|
|
55
55
|
"$SLM_DIR/bin/superlocalmemoryv2:profile" "$@"
|
|
56
56
|
;;
|
|
57
57
|
|
|
58
|
+
switch-profile)
|
|
59
|
+
shift
|
|
60
|
+
# Convenience alias: "slm switch-profile <name>" -> "slm profile switch <name>"
|
|
61
|
+
"$SLM_DIR/bin/superlocalmemoryv2:profile" switch "$@"
|
|
62
|
+
;;
|
|
63
|
+
|
|
64
|
+
list-profiles)
|
|
65
|
+
# Convenience alias: "slm list-profiles" -> "slm profile list"
|
|
66
|
+
"$SLM_DIR/bin/superlocalmemoryv2:profile" list
|
|
67
|
+
;;
|
|
68
|
+
|
|
69
|
+
create-profile)
|
|
70
|
+
shift
|
|
71
|
+
# Convenience alias: "slm create-profile <name>" -> "slm profile create <name>"
|
|
72
|
+
"$SLM_DIR/bin/superlocalmemoryv2:profile" create "$@"
|
|
73
|
+
;;
|
|
74
|
+
|
|
58
75
|
reset)
|
|
59
76
|
shift
|
|
60
77
|
# Calls existing command - no duplicate logic
|
|
@@ -310,6 +327,9 @@ PROFILE MANAGEMENT:
|
|
|
310
327
|
slm profile switch <name> Switch to profile
|
|
311
328
|
slm profile delete <name> Delete profile
|
|
312
329
|
slm profile current Show current profile
|
|
330
|
+
slm switch-profile <name> Shortcut for profile switch
|
|
331
|
+
slm list-profiles Shortcut for profile list
|
|
332
|
+
slm create-profile <name> Shortcut for profile create
|
|
313
333
|
|
|
314
334
|
KNOWLEDGE GRAPH:
|
|
315
335
|
slm graph build Build/rebuild knowledge graph
|