Brain
PlaygroundDocsGitHubSign InGet your API key →
Brain v0.1 · Open core · Apache 2.0

Memory
that doesn't
suck.

Rust-core memory layer for AI agents. Five-stage write pipeline rejects noise before storage. Three-retriever hybrid search. Typed schema with provenance. Self-hosted or cloud — same API, same guarantees.

Get your API key — free →Try the playground →★ GitHub
85%+LongMemEval
Apache 2.0Open source
Built-inEmbeddings included
2 modesSelf-host · cloud
~/inbox3 — brain v0.1.0zsh
$ npm install @brain-db/sdk
+ @brain-db/sdk@0.1.0 (TypeScript · Python · Rust)
 
> import { BrainHttpClient } from '@brain-db/sdk'
> const brain = new BrainHttpClient({ apiKey })
 
> await brain.encode({ text: 'I just moved to Lisbon' })
 
{
memory_id: 'mem_01HX7R…',
was_deduplicated: false,
kind: 'fact', salience: 0.94,
}
 
>
Why Brain exists

Every memory store
ships with 98% junk.

We audited 10,134 production memory entries from the leading vendor. What we found was duplicates, hallucinated profiles, 4000-word state dumps, and the same memory repeated 668 times. This is why agents feel dumb.

97.8%
Junk rate

Duplicates, hallucinations, feedback-loop noise in a production Mem0 deployment.

668×
Same row, repeated

A single hallucinated memory stored 668 times because no pre-write filter caught it.

20s
Write latency

Reported sync writes blocking user responses. Self-hosted async client didn't exist.

$249/mo
To get a graph

Temporal and relational features paywalled behind Pro tier. No self-host escape.

Write path

From raw text to typed memory.

Most memory systems are a single function call: extract → store. Brain is a five-stage pipeline. The first stage rejects 40% with zero LLM calls; the middle stages are the quality moat. By the time a memory reaches storage, we're confident it deserves to be there.

01 / GATE

gate

Input validation. Rejects short, rate-limited, or pattern-matched turns before any API call. Zero LLM cost.

✕ REJECTED
Input: "I think maybe I like blue? hmm" → Rejected (low confidence, vague pattern)
40Rejected
0.3msLatency

What lands: five typed records.

A memory isn't a string. It has a subject, a predicate, an object, a valid-from timestamp, a confidence score, and a trail back to the turn that produced it. Each of the five types carries its own fields and lifecycle.

F
Fact

Stable information. Slow to change. High confidence.

subject — entity
predicate — string
object — any
confidence — float
provenance — turn[]
P
Preference

Revisable. Versioned. Supersession over deletion.

subject — entity
predicate — string
version — int
superseded_by — id?
valid_from — ts
E
Event

Something that happened at a specific moment. Immutable.

subject — entity
predicate — string
object — entity
event_at — ts
tags — string[]
N
Entity

People, projects, companies — canonical references.

canonical_name — str
entity_type — enum
aliases — str[]
attributes — kv
mention_count — int
R
Relation

Edges between entities. Graph queries, no graph DB.

from_entity — id
to_entity — id
relation_type — str
valid_from/to — ts
evidence — mem[]
Read pipeline3 RETRIEVERS · RRF · RERANK

Three retrievers,
fused in parallel.

Pure vector similarity loses on temporal reasoning — LongMemEval measures 5-65% accuracy across existing systems. Brain runs three retrievers concurrently, fuses them with Reciprocal Rank Fusion, runs a cross-encoder rerank, then applies the filter chain — type, temporal, confidence, tombstone, and supersession.

query> "what did Priya say about the deadline?"
semantic
88
lexical
64
graph
92
RRF FUSION · TOP RESULT
content > "Priya stated the deadline is Friday for Inbox3 MVP"
type > event · confidence > 0.92
when > 2026-04-15T14:30Z
latency > 47ms (parallel)
01

Semantic

Dense embedding similarity over the built-in HNSW index (BGE-small, 384-dim). Catches paraphrases and implicit meaning.

HNSW · BGE-small · cosine
02

Lexical

Proper nouns, exact terms, IDs. Vector search misses these — a BM25 full-text index nails them.

tantivy · BM25
03

Graph

When the query mentions a known entity, Brain walks the typed graph and pulls related statements directly.

entity graph · statement store
+

RRF + cross-encoder rerank

Score-weighted RRF: weight × √score / (k + rank). Candidates from multiple retrievers accumulate higher scores. Optional second pass through a cross-encoder reranker for quality-critical queries.

Skipped for entity-specific queries where entity graph provides direct matches. 429 retry with backoff — quality preserved through rate limits.

RRF · cross-encoder · optional
See inside

Black box?
Not anymore.

Encode a few sentences, then ask a question — right here. Watch the real pipeline turn text into a typed graph and shape an answer. Then see the same signals rolled up in the console every deployment ships with. No signup required.

Pipeline output
Encode the facts, then recall — the answer and the extracted graph appear here.

Watch it in production.

Every write, read, and quality signal in one view. The observability console reflects the exact state of your pipelines — no extra wiring, no third-party dashboard to stand up.

Last 24h
Writes: 847
P99 write: 1.2s
Reads: 12,341
P99 read: 180ms
Cost: $3.42
$0.11/hour
Writes per minute (stacked by outcome)
storedmergeddiscarded
Quality
Junk rate:8.4%(↓2.1% vs 7d avg)✓
Duplicate rate:12.1%(↑0.5% vs 7d avg)▲
Contradiction rate:0.3/1k(stable)✓
Active alerts
▲ Duplicate rate rising — possible extractor regression
Open the full playground →
every pipeline stage · LLM prompts · DB mutations · latency & cost
Launch →
Why not them

The matrix, unfiltered.

Every row is a promise we're making. Every column is a competitor whose docs we read. We'd rather show the comparison than let you discover the gaps in production.

CapabilityMem0ZepLettaAgentCoreBrain
Open source corepartialpartial✓✕Apache 2.0
Zero-dependency core✕✕✕✕single binary
Self-host, no extra DB✓needs Neo4j✓✕no extra DB
Typed memory schemaflat textgraph onlyblocksstructured5 types + lifecycle
Pre-write filter✕✕✕✕5-stage pipeline
Multi-retriever hybrid12123 parallel + rerank
Temporal queries✕pro only✕✕native
Transparent pricing✕opaque✓✕pass-through LLM
Deploy

Run it your way.

Same API, same guarantees — whether it's the `brain` container in your VPC or our managed cloud.

your-vpc:5432

Self-hosted

One container

The `brain` Docker image. Storage, vectors, and the embedding model all live in the one process — no Postgres, no Neo4j, no Redis, no separate vector DB. Apache 2.0, your infra, full power, no ops tax.

Runtime: Docker (Linux)
Storage: redb + mmap arena
Vectors: built-in HNSW
Embeddings: BGE bundled
brain.arc-labs.ai

Cloud

Managed

We run it for you. Auto-scaling, replicas, observability dashboard included. Pay for compute, not seats. Perfect for production at scale.

Runtime: managed
Storage: managed
Vectors: managed
Scale: unlimited

Memory that deserves to be remembered.

Get your API key →Try the playground →★ GitHub
npm install @brain-db/sdkcopy
Brain

Memory that agents can actually use. Rust-core, five-stage write pipeline, three-retriever hybrid search. Open source Apache 2.0.

GitHubTwitterDiscord
Product
  • How it works
  • Retrieval
  • Playground
  • Changelog
Developers
  • Documentation
  • TypeScript SDK
  • Python SDK
  • API Reference
Community
  • GitHub
  • Discord
  • Twitter
Company
  • Arc Labs
  • About
  • Careers
© 2026 Arc Labs · Bangalore

BRAIN