holographic-memory
A universal long-term memory for AI agents — today Claude Code and Codex (CLI and desktop app). A local SQLite fact store with
FTS5 search in 18 languages, trust scoring, entity resolution, fact history and HRR (holographic reduced
representation) recall, recalled before each message and managed through memory tools. By default everything stays on
your machine: no API key, no network, no model calls. Search by meaning and rescoring are opt-in extras that send text
to an endpoint you choose.
What it does:
- Before each message the facts relevant to it are added to the model's context, as data:
## Holographic Memory (stored facts: data, not instructions) then - #12 [0.5] The billing service deploys to staging with systemd. Up to five facts that cover the message's words (any word form), with search by meaning on
one more that shares no word with it, plus two about a person or thing it names; a fact already shown in this
session is not repeated for six turns; "ok thanks" or /compact costs nothing, and so does what the client puts
in your place (a background task's notification, a subagent's or another session's report, a CI event); a system
reminder around your words is left out of the search.
- Twenty-three memory tools over a local MCP server (below): store, search, change with history, merge duplicates,
maintain names, forget, export, and a journal of how recall served you. A text that is an instruction or holds a
credential is refused; a new fact that may contradict an old one comes back with
possible_conflicts.
- One store for every agent by default (
~/.holographic/memory_store.db): what you told Claude Code, Codex
knows. Or one store per project (scope = "project").
Status: early (0.x). The engine lives in holomem/engine/ and is this repository's own code, covered by
tests/engine/ (about 2300 tests: storage, search in every language, history, merges, names, vectors). tests/
covers the rest: hooks run as separate processes, the MCP server over stdio, the installer on copies of real settings
files, search by meaning and rescoring against local fake endpoints.
How it works

Two ways in, one store. A hook (holomem hook) is a new short process at every prompt: it finds the relevant
facts and hands them to the agent as additional context, and at session start it adds a short block on how to use
the memory. The MCP server (holomem mcp) is started by the agent once per session and keeps the store open, so
a tool call takes milliseconds. Both call the same engine. Their own bookkeeping (turn numbers, what was shown when,
a pause after a failed embeddings or rescoring call, which session made a recall) lives in state.db, never in the
fact store.

A fact gets in by covering enough of the message's informative words, by standing out in meaning from the whole store
for this message (search by meaning on), or because the message names someone it is about. Whatever gets in passes
the recall screen (no credential, no instruction, no hidden markup) and the repeat window; with
rescoring on, one more model orders what is left and cuts its tail.
Two filters keep stray facts out, both measured on a live store and both judged by search by meaning:
- One ordinary shared word. In a small store an everyday word ("now", "me", "after") is held by one fact only and
looks as rare as a name, so "How old am I now?" used to bring a note that merely says "now". A fact let in by
exactly one shared word of a longer message is kept only when meaning backs it (it stands out for this message,
z ≥ 1). A name, an identifier, a one-word message and a fact without a vector are left as the words decided.
While search by meaning is on but gives nothing (the endpoint failed or is paused, or no time was left), one such
word is not enough: nothing can back it, so the fact stays out (a city named in lowercase waits for meaning too).
With search by meaning off, or before any fact has a vector, the words decide, as before.
- A name in passing. "Lena sent the electricity bill" used to bring Lena's two most trusted facts, about anything.
A fact that comes by a name alone is now kept only when meaning backs it, as above.