Memory for AI agents that knows what is still true.
Brain keeps one current value per field, with the instant it became true and where it came from. A new value supersedes the old one rather than sitting beside it — and a recall with no answer says so instead of guessing.
Apache 2.0 for the engine, the SDKs, the MCP server and the eval harness. Run it yourself or let us run it.
import { BrainHttpClient } from '@brain-db/sdk'
const brain = new BrainHttpClient({ baseUrl, apiKey })
// march 2023
await brain.encode("Priya is a staff engineer.")
// a year later, a fact that contradicts it
await brain.encode("Priya is now an engineering manager.")
await brain.recall("what is Priya’s role?")
// → answer_kind: "single"
// "engineering manager", since 2024-03-02
// the old value is superseded, not returnedFour stages, then the write is durable.
encode validates, embeds, reserves a slot and persists. The WAL fsync is the acknowledgement barrier, so the call returns as soon as the write cannot be lost. Everything else is derived after that, off the response path. Two of the four stages take something out of the line; the other two turn nothing away.
- Validate
- Checks the input against the planner, and refuses a namespace with no usable model credential.
- MALFORMEDEmpty or malformed writes, and writes Brain could not later ground.
- Embed
- Turns the text into a vector with the bundled model. Nothing leaves the process.
- DUPLICATEA content-hash match returns the memory that already exists instead of storing a second copy.
- Reserve
- Takes a fresh memory id from the shard's slot allocator.
- Turns nothing away.
- Persist
- Commits a single-phase write to the WAL. The fsync is the acknowledgement barrier.
- Turns nothing away.
After the acknowledgement, off the response path: auto_edge, temporal_edge, extractor, hype, lexical index.
A test bench, not a claim about one.
Encode a few sentences, then ask a question, right here. This runs the real write path and the real read path against a live sandbox — the typed graph you get back is the one Brain built. No signup.
Watch it in production.
Every write, read, and quality signal in one view — write volume by outcome, junk and duplicate rates, and cost attributed per pipeline stage. Instrumented in the engine, so there is no third-party dashboard to stand up alongside it.
One part, two configurations.
Same API, same guarantees, same binary — whether it is the brain container inside your VPC or our managed cloud. The specification below is the part itself, and it does not change between them.
Self-hosted
One containerThe `brain` Docker image. Storage, vectors and the embedding model all live in the one process — no Postgres, no Neo4j, no Redis, no separate vector database. Apache 2.0, your infrastructure, no ops tax.
- Runtime
- Docker (Linux)
- Storage
- redb + mmap arena
- Vectors
- built-in HNSW
- Embeddings
- BGE bundled
Cloud
ManagedWe run it for you. Auto-scaling, replicas and the observability dashboard are included. Pay for compute, not seats.
- Runtime
- managed
- Storage
- managed
- Vectors
- managed
- Scale
- elastic
- IsLicence
- Apache 2.0 — the engine, the SDKs, the MCP server and the eval harness.
- IsFootprint
- One binary. Zero-dependency core, no second database alongside it.
- IsTypes
- Five: fact, preference, event, entity, relation — each with a lifecycle.
- NotNot a vector DB
- We do not sell storage, embeddings or benchmark numbers.
- NotNot an agent loop
- No orchestration, no runtime, no opinion about your agent.
- NotNot a graph DB
- There is no graph language to learn and no graph to query.
Give your agent something worth remembering.
One install, one API key, and the record above is the record your agent reads. The engine is free forever; we make money on hosting, not on paywalling the parts that make it work.
npm install @brain-db/sdk- Licence
- Apache 2.0
- SDKs
- TypeScript · Python · Rust
- Deploy
- Self-hosted or cloud
- Cost
- Free tier, no seat pricing