The write-time filter
Every perception passes through one filter before it can be stored. There is no side door: the CLI, the MCP server, background reflection, and file watchers all go through the same gate. The filter has three outcomes:- Durable fact. The perception enters the fact store and the knowledge graph, and joins working memory. This is the only lane that survives a restart.
- Session-only. Useful right now but not a fact about you or the world: questions you asked (“what do you remember about X?”), task commands (“open Safari and search for Y”), the agent’s own narration of what it just did. These go to the working memory ring so the current session can use them, but they are never written to the fact store, so a question you asked today cannot come back tomorrow disguised as a fact.
- Rejected. Never stored anywhere: content matching the privacy blocklist, raw tool output and shell dumps, the agent’s injected prompt scaffolds, oversized dumps, and low-signal chatter.
The fact store
Durable facts land in the Binary Memory Core (BMC), the storage engine the brain hosts in-process. A fact is stored as a fixed 64-byte binary record carrying a 256-bit signature derived from its embedding, alongside the verbatim text and its provenance. Search is two-stage: a locality-sensitive hash index proposes candidates by Hamming distance over the bit signatures, then a precise cosine pass over just those candidates re-scores them. Both stages run in-process and synchronously: recall does not cross a network, and typical queries complete in under a millisecond. Nothing in this path leaves your machine. Embeddings are computed locally, and the stores are plain files under~/.xynthis/bmc/.
The knowledge graph
Alongside the fact store, the brain maintains a temporal knowledge graph of subject-predicate-object triples:(you, prefers, rust), (project, uses, postgres). Extraction is structural (a precedence-ordered pattern table, no LLM call), so it is fast and predictable:
- Explicit verbs (“chose”, “built”, “prefers”) produce triples at 0.75-0.9 confidence; a bare “is” statement gets 0.45.
- Hedged statements (“I think”, “maybe”) have their confidence multiplied by 0.6.
- Negated clauses produce no triple at all.
- “Ended” phrasing closes the triple’s validity window instead of deleting it.
Working memory
Working memory is a 256-slot ring of the most recent perceptions, held in RAM only. It gives the current session short-term context (including the session-only lane from the filter), and it is the raw material the consolidation cycle and reflection read from. It is never persisted: restart the brain and the ring starts empty. Durable facts are unaffected.Recall
A recall query walks four layers, cheapest first:- Identity: who you are, standing preferences.
- Working memory: the current session’s recent context.
- Knowledge graph: matching triples, filtered by validity window.
- Binary facts: the two-stage semantic search over the fact store.
XYNTHIS_LEXICAL_FLOOR=0 to disable it. On top of the base score, a learned reranker nudges results by at most ±0.25, and small recency and frequency terms break ties: a learned signal can reorder close calls but never override a strong direct match.