Brain in 90 seconds
A quick tour of the ideas behind Brain, with pointers into the concept pages that teach each one.
Brain is a memory database for AI agents. Your agent sends text through encode;
Brain stores it as typed memories with provenance, confidence, and time, and
answers recall cues by fusing several retrieval signals. It is not a vector
store with a chat wrapper — it is a typed knowledge graph that retrieval walks.
Typed memory + entity graph
Every memory is a fact, preference, event, entity, or relation,
with a confidence score and a source. Entities and relations build into a
graph the retriever actually walks — not everything collapses to cosine
distance.
Identity by key
An API key is bound to a (namespace, agent) at creation. Clients never
construct a scope — the server resolves identity, namespace, and permissions
from the key alone.
One write path, one read path
encode runs a synchronous fast path — validate → embed → reserve → persist
(WAL fsync acknowledges) — then derives edges and the typed graph
asynchronously. recall fans out to three retrievers (semantic, lexical,
entity-graph), fuses ranks with RRF, and reranks.
Provenance and honest answers
Every memory records what produced it. Corrections supersede instead of
overwrite, and history stays queryable. When nothing matches, recall
returns an explicit none rather than a fabricated hit.
What that means in practice
You encode text and recall cues; everything between — extraction, embedding,
indexing, graph-building, ranking — happens inside a single Rust binary. There is
no Postgres, no pgvector, and no external datastore to operate. The same binary
runs self-hosted (Docker) and on the managed cloud, so behaviour doesn't change
between the two.
Learn each idea
Was this page helpful?