Everything SLM does
A governed, local-first memory brain: three-tier recall that never bluffs, memory before every prompt, cues, disputes, imports from other apps, a living wiki, trust controls with a decision log and a kill switch, measured memory help, documents and pictures, SLM-Mesh, outcome learning, cache and compression, and governance with per-workspace isolation, role-based access and GDPR controls. Optional network features are disclosed per capability.
Every capability area.
From recall that admits what it does not know to agents and web bots that talk to each other. Each card links to its guide; optional network features are disclosed separately.
Recall that knows when it doesn't know
Every recall ends in one of three tiers: a supported answer; “I don’t have this exactly — here are the closest memories” (up to three, labelled); or “That isn’t in SuperLocalMemory.” for nonsense. While models load, recall says it is still warming up and to try again in a few minutes. Hooks that inject memory automatically only ever inject supported answers.
Never floods your context
Depth 0 is a one-line glance, depth 1 the facts, depth 2 adds the source, session neighbours, related entities and corrections. A hard max_tokens cap bounds the reply, and the expand tool drills into one result only when the agent needs it.
Traceable Hybrid Retrieval
Semantic, keyword (BM25), entity-graph, temporal, associative (Hopfield), spreading-activation and picture channels feed fusion and reranking, with inspectable diagnostics; slm trace shows each channel's score.
A sense of time
Bi-temporal facts: ask what was true then (--valid-at) or what SLM knew then (--known-as-of). Corrections replace a fact and stay undoable; unused memories fade the way human memory does.
Screenshots, PDFs and pictures you can ask
Google's EmbeddingGemma 2, on your computer, is the one model for text and pictures in one search space, so a description finds the image. OCR runs locally too. Pictures are found by describing them, PDFs are indexed page by page, and every answer cites its file and page. Folders and Obsidian vaults mirror in read-only. No generative model ever looks at your files.
Karpathy's LLM-wiki idea, built in
A document index of every file with its people, projects and dates, and a document health check that finds empty pages, unlinked documents, duplicate pages and contradicted facts. Hybrid search is kept for finding things.
It looks after itself
While your computer is idle, older memories get dates, names, projects and kinds filled in — only by adding, never over what you wrote. Repairs that move or delete wait for your Fix, and Undo puts everything back.
Laya on your Mac, Jev online
A second opinion on whether the memories found really answer the question. Laya runs on-device and is on by default on Apple Silicon; Jev runs online only after you consent, through TypeSafe or OpenRouter.
Governed, not just stored
Roles and workspaces, save receipts, a hash-chained audit trail, per-profile retention, and GDPR export and erasure that reach every derived copy — summaries, caches, indexes, picture mirrors — with a verifiable receipt. Engineering controls, not a certification.
Many agents, one brain
Every write records which agent made it, with Bayesian trust scores against memory poisoning, so several agents can share one memory without poisoning it.
Agents and web bots that talk, across the internet
Messages, waits, locks and shared state between Claude Code, Codex and Hermes sessions on one machine or several. ChatGPT, Claude on the web, Grok Bot and Muse join with your permission: message a named peer and read the inbox. Messages arrive labelled as data, never as instructions.
Learns every day, can't quietly get worse
Outcomes teach the ranker; stable habits become soft prompts; agent skills are measured and revised. A new ranker is promoted only on a statistically valid win and rolled back automatically if it slips.
Done means a gate passed
Loops end only when an independent gate passes (tests, a linter, a schema), never on the agent's word, and every lap is stored as auditable memory. Multi-step graphs run in Bounded Loops, and SLM keeps their finished runs as read-only evidence.
SQLite Core + Scale Engine
SQLite with WAL, FTS, and profile isolation is the canonical path. Optional CozoDB graph and LanceDB vector copies serve only once they match SQLite. A restore point is taken before every store update.
MCP, CLI, Hooks, and Skills
Profile-selected MCP tools, structured CLI commands, and additive client assets support Claude Code, Codex, Cursor, Copilot, Antigravity, Hermes and any harness that speaks MCP or runs a command, without overwriting a user's configuration.
Local Operations Console
Search, knowledge graph, Entity Explorer, answer check, Memory health, documents and images, connected apps, bot messages and governance, all through the local service.
Memory before your agent answers
A per-prompt hook asks memory before the agent answers, but only when the prompt needs it. Greetings, arithmetic and slash commands are skipped, and a memory the conversation already has is never repeated. Hooks that inject memory only ever inject supported answers.
Reminders tied to a file, command or date
slm remember --cue ties a memory to a file pattern, a command, an error text, a repository or a date. It comes back right before or after that step, at most once per conversation. Editing a file that memories came from warns that they may be out of date.
Every result says why it was returned
Each result names the channels that found it, the answer check's verdict, and whether it is current, disputed or from a file that changed since. slm trace shows each channel's score.
Disagreements shown, not overwritten
When two memories give different values for the same thing, recall shows both sides, newest first, until an agent or you settle it with slm disputes, the settle_dispute tool or the dashboard. A settled dispute can be rolled back.
Bring memory from other apps
ChatGPT and Claude exports, Mem0, Letta .af files, OKF folders and Markdown such as AGENTS.md. Preview first, run in the background, and undo the whole run with one command. An import never overwrites what you saved; a contradiction opens a dispute.
Pages where every sentence cites a memory
slm wiki compiles Markdown pages on the current state of a subject, a family of decisions or a topic. Every sentence quotes a memory it cites and is re-checked on every read. Your edits come back as proposals, never as silent writes.
Where a memory came from, and what may become a rule
Every memory is classed by how it arrived, from your own words to a model's rewrite; slm why FACT_ID shows its origin, signature and disputes. A minimal instruction firewall stops text from a web page, tool output, another agent or an import from becoming a pinned rule or core block without one recorded promotion. Nothing is hidden from recall or learning.
Secret screen and signed memories
Anything shaped like a credential is replaced with a typed placeholder before it is stored. Each memory is signed with a key from the operating system's keychain, and slm doctor --truth names any memory changed outside SLM.
A decision log with Undo, and judges that earn trust
Every decision by an agent or a person is recorded with who, which channel and when, and listed on the dashboard with an Undo button. Typed questions about memories go to rules, then Laya on your Mac, then Jev online after your consent; a judge acts only once blind audit labels support it.
Measured, with confidence intervals
SLM keeps receipts (ids and scores, never text) of what it gave your agents. slm health --memory reports how often each memory is used and the measured effect of giving it to an agent, with at least 20 sessions per arm before any claim. It stays on your computer, and slm measurement off stops it.
One switch turns the newer passes off
Each newer part has its own off switch under slm flags, and slm flags kill on stops every one of those passes and makes reads behave as before, without a downgrade.
SLM from any shell, in JSON
slm tool list, slm tool describe and slm tool NAME --json reach every MCP tool from a shell, so a client that cannot load SLM's MCP server still has the pictures, mesh, code-graph and learning tools. Every slm command answers in JSON with --json, for agents.
More depth: Answer check, Governance, Skill evolution and Plugins and bots. Memory kinds are covered under Workflows. The full README is at GitHub, and the what’s new page covers recent additions. SuperLocalMemory is part of the Qualixar research work; a guide to Claude Code memory and films about SLM are on qualixar.com. Author: Varun Pratap Bhardwaj.
Ten-layer operating stack.
An inspectable stack from SQLite-backed storage through retrieval diagnostics, lifecycle controls, optional optimization, and local visualization.
Learning to rank, locally.
SuperLocalMemory records local behavioral signals that influence ranking without a separate LLM call for the learning step. Three phases: baseline observation, rule-based heuristics, optional ML model activation. Inspect signals, thresholds, and rank changes; optional modes and integrations retain their own network paths.
Three retrieval mechanisms
Semantic, graph, and adaptive channels feed the ranking pipeline. Each channel is independently inspectable.
Semantic Search
Dense vector candidates from a local embedding model. Finds memories conceptually related to a query even when keywords do not match exactly.
Graph Association
Entities — files, functions, concepts — are extracted and linked. Querying one entity can surface linked neighbours via graph traversal, not keyword matches alone.
Adaptive Re-Ranking
Local behavioral signals — access patterns, explicit feedback, recency — adjust candidate rank without an additional LLM call for the learning step itself.
Three-phase adaptive learning
Recall emits local exposure telemetry. Exposure alone is not positive feedback and does not increase truth or trust scores stored in memory.
Baseline
Optional reranking and channel diagnostics can record exposure. Explicit positive, negative, or corrective feedback remains separate from stored-memory confidence and trust. No model activation at this phase.
Rule-Based
Heuristic boosts from learned patterns: recency weight, access frequency, and trust score. The ranking influence is deterministic and inspectable — no trained model is loaded at this phase.
ML Model
When the learning path has sufficient valid signals and model activation is enabled, it can train on local behavioral state. Verify activation, model state, and rank impact in the installed release.
Inspectable learning signals
Each signal type has distinct semantics. Read the source before inferring intent from a rank change.
Integration and activation paths
These features require hooks, background workers, or explicit configuration. Each needs independent verification for a complete deployment review.
The retrieval pipeline
Query enters, candidate producers run, re-ranking applies behavioral weights, ranked context exits. Every stage is traceable.
# Five candidate producers run in parallel stage candidates semantic (dense, local embedding) bm25 (full-text lexical) temporal (recency) hopfield (associative) spreading activation stage re-rank fusion score · entity-graph adjustment · access weight · trust score · decay ✓ ranked context returned · rank deltas inspectable in the dashboard # Per-channel score breakdown for any query $ slm trace "token expiry" names the channels that contributed to each result ✓ signal sources visible · no black-box ranking
Entity-graph information can adjust a post-fusion score but is not a separate candidate producer.
Content-aware compression. Exact cache reuse.
An exact cache path, content-aware compression controls, provider-prefix preparation, and release-gated semantic-cache safeguards. Cache reuse and compression results remain workload- and configuration-specific. Defaults: exact cache on, semantic cache off, safe compression on, aggressive compression off.
Three surfaces
The primary Claude conversation turn cannot be cached without the proxy; the MCP tools and skills cache results you explicitly route through SLM. Optimization is designed to fail open: handled optimization errors pass through to the provider, though provider and transport failures remain possible.
MCP optimize tools
Semantic caching is experimental.
The exact cache is the stable path. Semantic caching is opt-in because a similarity threshold can return the wrong response. The implementation contains threshold-learning machinery, but it is not a production claim until the frozen release proves calibration, invalidation, tenant isolation, and false-hit behavior on a representative corpus.
# Opt-in experimental path $ slm cache semantic on ↳ Enabled locally; this is not evidence of production precision # Inspect the cache $ slm cache status Entry count, DB size, TTLs, hit rate
Lossless by default, prose-only when aggressive.
Safe mode is lossless: whitespace and compact-JSON normalisation only. It never removes content and leaves code untouched, so reduction may be small or zero. Aggressive mode is opt-in and applies LLMLingua-2 to prose only, never code, numbers, structured data, instructions, or the current turn. A lossy result can be made reversible by storing its original in the CCR path and using the returned identifier before its TTL expires.
$ slm compress status ↳ Mode and per-channel state $ slm compress mode safe ↳ Lossless normalisation (aggressive is the opt-in alternative) $ slm compress prose on ↳ Prose compression, aggressive mode only
Stabilise prefixes, then verify provider reuse.
Alignment stabilises the prompt prefix to improve reuse of native provider prefix caching, and is on when compression is on. It helps only when the configured provider supports prompt caching and its cache conditions are met. Pricing, minimums, TTLs, and discounts belong to the provider's current contract; measure actual usage instead of publishing a fixed saving.
$ slm wrap claude ↳ Starts the proxy, sets ANTHROPIC_BASE_URL, launches Claude Code $ slm optimize status ↳ Show all settings (also: on, off) $ slm optimize savings --since 7 ↳ Token and cost report; compare against provider accounting ✓ No fixed hit-rate or cost multiplier without release-linked evidence
Architecture, research and installation.
Read the full technical architecture or the published research behind the memory design, then follow the installation guide and compare cache correctness, token use, latency, and provider accounting on your own workload.
One memory shared by Claude Code, Codex, ChatGPT and Grok Bot, walked through pane by pane. The video loads only after you click it.
Every memory can say what sort of thing it is, so recall can answer "what did we decide" with decisions and "how do I" with how-tos. The kinds are semantic (a fact), episodic (something that happened), status (the current state of something), opinion, rule, decision, procedure (a how-to), prospective (a plan or to-do) and correction.
slm remember "Always run the migration dry-run before a release." --kind rule
slm remember "We deploy the API blue-green; rollback is a DNS flip." --kind decision
slm recall "what did we decide about rollback" --kind decision If you give no kind, SLM suggests one, and a suggestion changes nothing until someone confirms it. Background work never overwrites a kind you confirmed. A model's suggestion below a display threshold (display_min_confidence, default 0.20) is not shown as a kind at all. Above it, the memory shows the kind marked as suggested until you confirm it.
Confirmed rules, up to 10, and confirmed decisions, up to 5, are handed to every new agent session through the MCP session_init call. Proposed, rejected, archived, quarantined and replaced items are never included, and slm kinds settings --standing-rules off turns it off. To replace an old memory, save the new one with --replaces <fact_id>. The old memory is retired, not deleted, and review_correction with the rollback action brings it back exactly. Classifying with Jev sends memory text online, so it needs its own consent on top of the answer-check consent.
SLM can compile pages from your memories and write them to a folder of Markdown files, then read your edits back. There are three kinds of page: current state (one per subject, showing the value a thing holds now and since when, with a disputed value shown as a dispute), story (one per family of decisions, a dated sentence each, in time order) and topic (one per entity or tag that has enough live memories).
Every sentence is extractive. It is either a span copied word for word from a memory it cites, or a fixed template filled with slot values and the verbatim text of cited memories. No model writes any sentence. Each sentence carries the ids of its source memories and is checked again every time a page is read. If a span can no longer be found word for word in a live memory, the sentence is hidden and the page is marked stale. Each page also says how many sentences were withheld and why. A page is never a memory: it has the origin derived, lives in its own table and is never admitted to recall. Erasing a memory removes the sentences that cite it from every page and file.
Pages enter the store only as a proposal that needs your approval, and slm proposals rollback restores an earlier version exactly. slm wiki rebuild compiles and applies in one recorded step. With compiler.dream on, the background cycle looks at each profile at most every six hours and queues proposals for review. It uses rules only, asks no model and never applies anything on its own.
Every update that changes the memory store first takes a verified copy into pre-migration-snapshots/ in your data directory. The copies from the last two updates are kept. slm db restore-points lists them with the id, time, reason, versions, size and memory count. slm db restore <point_id> first prints what it will do: how many memories the copy holds and how many exist now, how many were added since (they are set aside and added back), and how many were deleted or erased since (they stay deleted or erased). Nothing changes until you type RESTORE or pass --yes.
A restore never runs under a live engine: SLM stops the service, restores and starts it again. It refuses a copy made by a newer version or one whose checksum no longer matches. Before it replaces anything, it copies the current store into pre-restore/, keeping damaged files byte for byte. The newest two safety copies are kept however old they are, and older ones are removed after 30 days. A privacy erasure registers every copy that still holds the erased profile, and a later restore erases that profile again.