What makes Brain different
Closed-loop intelligence
Generate → Reflect → Curate → Evolve.
brain auto-kb runs a fully autonomous loop — searches, scores, finds duplicates, proposes new links, sweeps retrieval parameters, grades itself A–F. Your knowledge base improves while you sleep.Knowledge graph, not just a vector store
Documents form a typed graph.
brain link auto-generates tag-overlap + semantic links. brain graph reports orphans and components. brain dedup collapses near-duplicates with audit trails. Retrieval results are uplifted by graph proximity, not only embeddings.Hybrid retrieval with authority
BM25 + pgvector + trigram in parallel, fused with Reciprocal Rank Fusion (k=60). Results weighted by source type, frontmatter confidence, and link-graph authority. Fewer strong hits over many noisy ones — by design.
Zero lock-in, zero assumed infra
Your vault is just markdown — open in Obsidian, edit in vim, version in git. Brain ships with an embedded Postgres (
pgserve), so you don’t run a database. Ephemeral, local-disk, or synced-to-remote — one CLI, three modes.Architecture, end to end
brain update syncs filesystem to Postgres (hash-skips unchanged files). The closed loop writes its decisions and reflections back to the vault — not hidden in a database row.
Command surface (grouped)
| Group | Commands | Purpose |
|---|---|---|
| Lifecycle | brain init · brain update · brain ingest · brain autoschema · brain serve | Create vault, sync to Postgres, classify and organize, stand up a server |
| Query | brain search · brain get · brain analyze | Hybrid search, fetch by path/id, LLM analysis via rlmx |
| Knowledge graph | brain link · brain graph · brain dedup · brain health · brain score · brain decisions · brain forget | Generate links, audit structure, remove dupes, grade quality A–F |
| Intelligence | brain domain · brain reflect · brain strategy · brain sweep · brain auto-kb | Route by knowledge area, reflect on quality, sweep params, self-optimize |
Brain types (vault templates)
Brain ships with specialized templates so the AI classifier (brain autoschema) knows where to put things:
| Type | Purpose |
|---|---|
generic | General-purpose knowledge base |
engineering | Codebase knowledge, architecture decisions |
pm | Product specs, roadmaps, stakeholder context |
gtm | Go-to-market playbooks, competitive intel |
research | Papers, findings, hypotheses |
ops | Runbooks, incident history, infrastructure |
personal | Personal notes, learning journal |
brain init time — it seeds the domain set and the autoschema classifier’s priors.
Deployment modes
Brain is designed to run anywhere an agent runs — no external Postgres required for dev, but ready for production when you need it.| Mode | Trigger | Storage | Use case |
|---|---|---|---|
| Ephemeral | Neither env var set | pgserve RAM-only | Tests, CI, exploration |
| Data-dir | BRAIN_DATA_DIR=/path | pgserve persists to disk | Single-machine personal brain |
| Persistent | DATABASE_URL=postgres://… | pgserve RAM + WAL sync to remote Postgres | Production, multi-agent, HA |
What’s next
Quickstart
Install, create a brain, run your first search in under 5 minutes.
Closed-loop intelligence
The hero feature — how Brain improves itself without you.