Governed admission
Identity, role, scope and the write gate check every save, then a durable receipt is issued.
One local control plane for evidence, memory, retrieval, optimization, governance, and peer coordination — memory runs on infrastructure you control. Enterprise deployments add per-workspace isolation, role-based access, GDPR controls, and a per-mode EU AI Act self-assessment. The design makes optional providers, connectors, scale projections, and networked surfaces explicit rather than hiding them behind a single “local” claim.
Pick a mode to see what changes, or read the architecture documentation.
Canonical state stays local. Every external path is visible and explicitly enabled.
Mode A: remember and recall make no model-provider call by default. Rules extract facts; a local encoder and cross-encoder retrieve.
Identity, role, scope and the write gate check every save, then a durable receipt is issued.
SQLite, sqlite-vec and FTS are the source of truth, with restore points before upgrades.
Facts, entities, time, nine memory kinds and the knowledge graph advance in bounded, retryable stages.
rules, no language modelA bandit and a LightGBM ranker learn from outcomes; a shadow test promotes and rolls back.
Semantic, keyword, temporal, Hopfield and graph candidates are fused, reranked and traced.
local encoder, 768-dimLaya on your Mac or Jev online decides whether the memories answer the question, or says “I don’t have that”.
same in every modeSecrets are redacted, boundaries neutralised and provenance attached before anything reaches a prompt.
Exact cache, reversible compression, doctor, audit trail and encrypted backup keep it inspectable.
SuperLocalMemory is a durable memory runtime, not a standalone vector index. The same installed system accepts evidence, derives governed memory, retrieves bounded context, checks whether the memories actually answer the question, and exposes optimization, coordination and optional Web access to agents and operators.
One map of the whole system: callers and the four doors, the save and recall paths, the answer gate and check, pictures and documents, the living brain, governance and SLM-Mesh. Light up a pillar, switch the operating mode, then select any component for its role, data flow, controls, boundary and guide.
The memory database stays on your laptop. Tool requests and results pass through the gateway and the app you connected, and the laptop must be online.
Boundary: installed optional components are not silently promoted. The receipt, trace, health, doctor, and scale commands are the release evidence for the stages actually active in a deployment.
This view isolates the five surfaces that agents and operators touch most often. The interactive map above defines every component beneath them.
The MCP server exposes a profile-selected tool surface. Named client templates configure transport, but each client still needs a release-specific install, session, mutation, recall, restart, and uninstall check.
Data-returning CLI commands support --json where documented, returning an envelope with command metadata and data. Consumers must parse the versioned fields they use rather than infer meaning from display text.
slm connect --list for the release surfaceWhen Optimize or proxy caching is enabled, exact-match caching keys the normalized request and can avoid a repeated provider call. Caching is off by default in the shipped configuration; runtime latency and provider accounting must be measured.
Semantic cache is experimental and explicitly opt-in because a near-match can return the wrong response. The implementation can record prompt-class threshold state, but production use remains blocked on held-out false-hit calibration, tenant isolation, and invalidation evidence. LRU and TTL settings bound retained entries when configured.
When compression is explicitly enabled, safe handling preserves JSON and code invariants and may produce no reduction. Reversible CCR storage can retain the original for byte-exact retrieval; aggressive prose reduction is a separate opt-in, lossy path.
Prefix ordering can improve reuse when the configured provider supports prompt caching and all provider-specific conditions are met. Pricing, TTL, minimum-prefix, and discount behavior belong to the provider contract and must be measured separately.
Every accepted write owns a durable operation record and raw evidence in the SQLite-backed source of truth. A queryable relational and FTS projection is committed before asynchronous enrichment begins.
Enrichment is lease-owned, checkpointed, retryable, and marked complete only after its declared stages succeed. SQLite remains canonical; CozoDB and LanceDB projections are activated only through explicit prepare, verify, promote, and rollback controls.
Dense semantic candidate generation uses cosine similarity. Lexical, temporal, Hopfield associative, and spreading-activation channels can add candidates before fusion; entity-graph information enhances scores after fusion.
Fisher-derived terms can inform later scoring when their state is available. This ranking utility is not answer probability. The score contract keeps query relevance, stored-memory confidence, trust, and internal ranking utility separate.
slm recall.A recall command traverses the configured layers and records runtime evidence. Latency depends on corpus, hardware, warmup state, enabled channels, and reranker availability.
slm recall "JWT token lifetime". If --json is present, the response envelope is prepared. Input and explicit scope are normalized and validated before retrieval.
calibration_status is uncalibrated and answer_confidence is null.
SQLite is the normal-path source of truth. The scale engine includes CozoDB and LanceDB scale-engine projectors, but promotion is explicit and reversible: prepare an isolated projection, verify parity, then promote or roll back.
| Optional graph projector | Optional vector projector | Canonical store | |
|---|---|---|---|
| Engine | CozoDB | LanceDB | SQLite + zstd |
| Format | Property graph | Columnar vectors | Compressed rows |
| Access time | Benchmark required | Benchmark required | Benchmark required |
| Compression | None | None | Content-specific; release benchmark required |
| Use for | Promotion-gated graph projection | Promotion-gated vector projection | Normal-path durable records, indexes, and configured compressed payloads |
Read the code, fork it, and audit it. The SuperLocalMemory source and packages are AGPL-3.0-or-later. Optional model providers and external integrations retain their own licenses, terms, and network behavior.
Read the guidesArchitecture in detail · Scale engine · Score contract
An accepted write is recorded first in the ingestion_operations table (migration M018). The source type and an idempotency key decide whether a request is a replay. If the same key arrives with different evidence, the write is rejected instead of merged.
| Phase | What is true at that point |
|---|---|
raw | The content, metadata, scope, session context and trusted actor are durable. |
queryable | A relational fact and its SQLite FTS row are committed in one transaction. You can find it by wording. |
enriching | A worker holding a lease does extraction, entity resolution, consolidation, graph, temporal, provenance and embedding work. |
| checkpoint | Final fact ids and finished derivation stages are committed before any optional external projection. |
complete | Every declared derivation and projector stage reported success. |
failed | Evidence and checkpoint data stay inspectable and the work is retried with bounded backoff. |
Which enrichment stages exist depends on the mode and on which dependencies are installed. The state record reports what actually ran, so an optional backend that was not available is not counted as having taken part.
Recall runs up to five candidate producers, whichever have healthy dependencies: dense semantic, BM25 keyword, temporal, Hopfield associative and spreading activation. A sixth, pictures, joins only when pictures and documents are turned on. Entity-graph evidence is not a producer. It changes scores later.
max_tokens cap. expand opens one result.No producer is guaranteed to run in every mode. The runtime falls back to the indexes that are healthy and reports where each result came from. While models are still loading, recall says it is warming up and shows what it found, instead of claiming the memory is empty.
The architecture doc names three layers and gives each a practical job. The formal statements come from the architecture preprint. The research page lists what each paper measured.
Plain vector similarity treats every memory as equally well supported. Fisher-Rao geometry takes the statistical confidence of an embedding into account: a memory confirmed many times has a tighter region of uncertainty than one stored once and never checked. The preprint derives the metric from the Fisher information structure of diagonal Gaussian families and computes it in O(d) time. In the shipped path, dense candidates still use cosine and Fisher-derived terms can inform a later score adjustment.
Say you store "We use PostgreSQL" and months later "We migrated to MySQL". Simple retrieval returns both with no warning. In the sheaf model from the preprint, contradictions across memory contexts show up as non-trivial first cohomology classes. In the product, a detected contradiction records a supersedes link from the newer memory to the older one. The older memory stays in the store and can still be recalled. The check that runs at store time is off by default; you can ask for contradictions on demand with the consistency_check tool, which is in the power tool set. Nothing is hidden from you on the strength of an automatic contradiction check.
Memory stores grow without limit and old entries dilute retrieval. The Langevin lifecycle moves each memory through Active, Warm, Cold and Archived zones using a dynamic that balances recency, access frequency and information value, in place of a fixed time rule. The preprint proves that the stationary distribution of the Riemannian Langevin dynamics exists and is unique. The released lifecycle also has explicit policy, usage and threshold code, so run a dry run before you enable maintenance on data you care about.
Profiles partition the active workspace. Inside a profile a memory is personal by default, shared with named profile readers, or global. Reading across profiles is default-deny: recall includes shared and global facts only when an operator enables the policy or the caller passes the scope option. This is local authorization and is separate from SLM-Mesh coordination between trusted peers.
The daemon does the work that must not slow a save or a recall, and it stands aside for the foreground. Memory health describes older memories while the computer is idle, and it only adds. A backfill measures each memory's baseline for the answer-support gate. Consolidation and lifecycle maintenance run after the daemon has been idle for a while. Answer-check calibration runs only when you start it. The memory graph is built when the daemon starts, never during a recall.
Core memory is a SQLite database at ~/.superlocalmemory/memory.db in WAL mode. The same folder holds configuration, logs, models, queues, derived indexes and optional backend state, so back up or migrate the whole data root rather than the one file. The table groups are core (memories, sessions, profiles), knowledge (atomic_facts, graph_edges, canonical_entities, temporal_events), durable ingestion, retrieval indexes (SQLite FTS plus configured derived indexes), the per-fact similarity and lifecycle columns on atomic_facts, and compliance and provenance records.
Stored text is data, even when you wrote it. Every injection surface maps recalled results through one renderer that applies token budgets, redacts recognized secrets, neutralizes attempts to forge the canonical boundary, and attaches fact and source provenance. The rendered block is reference-only evidence: instructions found inside it gain no authority to call tools, change roles or request secrets. Cursor, Copilot and Antigravity instruction files hold only static protocol text, and dynamic memories arrive through MCP at runtime.
The bounded loop engine runs laps until an independent gate passes or a hard bound trips. The agent's own claim that it is done is recorded for each lap, but only the gate can end the run. The CLI (slm loop), the MCP tools (slm_loop_run, slm_loop_history, slm_loop_show) and the /slm-loop slash command all drive the same engine and the same ledger. Each lap is stored under the tag loop:<name>, so the history is queryable with slm recall.
The framework adapters are Python packages that implement each framework's own memory interface on top of the same engine: LangGraph, Semantic Kernel, Microsoft Agent Framework, LangChain, LlamaIndex, CrewAI, AutoGen, Google ADK and OpenAI Agents. They are described on the MCP and integrations page.