// concepts · 03

Memory and persona

An always-on file layer + one external backend at a time, both following a common lifecycle. What's frequent and durable lives in the files; the rest is retrieved b…

File layer (always injected)

These .md files enter the system prompt on every task, in this priority order, each with a configurable character limit:

filerolelimit
SOUL.mdvalues, principles (slot #1)6000
VOICE.mdtone, style, lexicon6000
PERSONA.mdself-model: traits, expertise6000
AGENTS.mdproject context4000
USER.mduser model4000
MEMORY.mddurable facts4000

Backend lifecycle

Every backend implements the same automatic flow, mirroring Hermes:

  1. inject — context into the system prompt.
  2. prefetch — before each turn.
  3. sync — store the turn after the response.
  4. extract — distill facts at the end of the session.
  5. mirror — mirror the built-in's writes.
  6. tools — the backend's own search/management.

Backends

backendhow it works
sqlite-fts5default hybrid: BM25 (accent-insensitive) + recency + importance · optional embeddings
honchomodels user and agent over time · remote over Tailscale
holographicHRR/VSA in local numpy (dim 1024) · no embedding server

Hybrid search and write policy

Recall on the default backend isn't just full-text. Each item is scored by three combined signals: lexical relevance (BM25, accent-insensitive), recency and importance (the fact's category). When the embedder is available, semantic similarity joins the mix; when it isn't, search degrades to plain BM25 without changing the interface. Every memory injected into the prompt carries a [category · source · confidence] citation, so the model knows where the fact came from.

On writes, a policy classifies each fact (fact · preference · decision · skill · error) and blocks the ephemeral/trivial before persisting — that's what prevents the junk build-up that rots context (context-rot). okami memory add forces the write (you're explicit), but the fact still goes through classification.

The threshold is per-model: it compacts at ~72% of the window. Before compacting, durable facts are promoted to long-term memory (and return via recall). Compaction = promote + point, never forget — even on a 32K model the conversation doesn't lose context.

Identity that evolves

An observer reads how you talk and infers style traits (technical register, nicknames, sarcasm, explicit requests). VOICE and PERSONA evolve on their own once a pattern crosses the threshold (min_count: explicit=1, inferred=2+). SOUL stays protected as an anti-drift anchor. All with an append-only changelog and /undo.

Open this page in the interactive docs