feat: Sovereign Memory Store — zero-API durable memory (SQLite + FTS5 + HRR) #380
Reference in New Issue
Block a user
Delete Branch "perplexity/sovereign-memory-store"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
The missing backbone of the zero-API memory story. Replaces the third-party
mempalaceCLI (and its ONNX dependency) with a self-contained store built on SQLite, FTS5, and Holographic Reduced Representations.Zero external dependencies. Zero API calls. Zero cloud.
Closes the open gaps in epic #367:
spromote_to_palace()` can target instead of shelling out to the mempalace CLIWhat's in the PR
sovereign_store.py(474 lines)Self-contained memory store at
~/.hermes/palace/sovereign.db:The HRR approach (ported from
hermes-agent/plugins/memory/holographic/) generates semantic vectors without any embedding model or API call — just SHA-256 hashing and trigonometry. Not as precise as transformer embeddings, but sufficient for memory retrieval and completely sovereign.promotion.py(188 lines)Quality-gated scratchpad → palace promotion (MP-4, #371):
Also provides:
evaluate_for_promotion()dry-run,promote_session_batch()for end-of-session cleanup,force=Trueoverride, and full audit logging inpromotion_logtable.tests/test_sovereign_store.py(255 lines, 21 tests)All 21 pass. All run against in-memory SQLite — no network, no fixtures.
How this fits the architecture
Next step: wire
scratchpad.py:promote_to_palace()to callpromotion.promote()instead of shelling out to the CLI. That's a ~10 line change.Dependencies eliminated
mempalacepip packagemempalaceCLI binary path hardcodedRefs: #367 #370 #371
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.