# SuperLocalMemory architecture

[Architecture on superlocalmemory.com](https://www.superlocalmemory.com/architecture)

SuperLocalMemory keeps canonical memory in SQLite with sqlite-vec. The configured data root can also contain models, logs, queues and derived indexes. A copy of the SQLite file alone does not capture those files.

## Writes and retrieval

A save records the raw input, makes the memory queryable, then records completion. Unfinished work remains visible and can be retried. The recall pipeline combines dense semantic, lexical, temporal, Hopfield associative and spreading-activation candidates. It fuses the candidate lists before optional reranking and graph-based scoring. The relevance score orders results for the current query.

## Operating boundaries

Mode A handles the core store and recall path locally after you have the required assets. Mode B adds a configured model endpoint. Mode C can send configured query or enrichment content to a provider. Optional Web access, backups, connectors, model downloads and proxies have their own network paths.

- [Architecture documentation](https://github.com/qualixar/superlocalmemory/blob/main/docs/ARCHITECTURE.md)
- [Operating modes](https://www.superlocalmemory.com/modes)
- [Research and published evaluation protocols](https://www.superlocalmemory.com/research)

## Durable writes

An accepted write is recorded first in the `ingestion_operations` table. It moves through raw (content and scope are durable), queryable (a relational fact and its SQLite FTS row are committed in one transaction), enriching (a lease-owning worker extracts entities, graph, temporal and embedding data), a checkpoint, then complete. A failed write keeps its evidence and is retried with bounded backoff. Source: [docs/ARCHITECTURE.md](https://github.com/qualixar/superlocalmemory/blob/main/docs/ARCHITECTURE.md).

## Recall pipeline

Up to five candidate producers run when their dependencies are healthy: dense semantic, BM25 keyword, temporal, Hopfield associative and spreading activation. Pictures add a sixth when pictures and documents are on. Reciprocal Rank Fusion merges the lists, an optional reranker refines the leaders, and graph evidence adjusts later scoring. The answer-support gate then places the recall in one of three tiers: supported, closest memories, or "That isn't in SuperLocalMemory." The answer check (Laya on your Mac, or Jev online) is one input to that gate. Layered output returns depth 0, 1 or 2 under a hard `max_tokens` cap.

## Mathematical layers

Fisher-Rao similarity accounts for how well supported each memory is. Sheaf consistency records a supersedes link when memories about one subject contradict each other, and the older memory stays recallable. The Langevin lifecycle moves memories through Active, Warm, Cold and Archived zones by balancing recency, access frequency and information value. The formal statements are in [arXiv:2603.14588](https://arxiv.org/abs/2603.14588). In the shipped path, dense candidates use cosine similarity and Fisher-derived terms can inform a later score adjustment.

## Boundaries

Profiles partition the workspace. A memory is personal by default, shared with named profiles, or global, and reads across profiles are default-deny. The data root holds `memory.db` in WAL mode plus configuration, logs, models, queues and derived indexes, so back up the whole folder. Recalled text is rendered as reference-only evidence: secrets are redacted, forged boundary markers are neutralised and provenance is attached.

Written and maintained by Varun Pratap Bhardwaj, Founder, Qualixar. Last reviewed 25 November 2026.
