Features
Brain Server packs a lot of capability into a single Rust binary. This page is the complete feature tour — grouped by what the feature does for you. It is a living inventory of what is shipped (verified against the codebase up to v1.27.22); if a capability is described here, it exists in the current source.
Retrieval
- Hybrid retrieval — vector KNN (
vec0) + lexical FTS5 (BM25) fused via Reciprocal Rank Fusion, with deterministic PRF query expansion and full per-result provenance. - Structured query —
QueryDocwithLexSpec(phrases, exclusions, code paths), multi-source OR scope, temporalsince/as_ofpredicates. - Optional graph leg — Personalized PageRank over the knowledge graph as a third, opt-in
?graph=trueRRF leg (HippoRAG-2 style). - Noise-aware graph retrieval (v1.12) — hub dampening + edge-type weights tame taxonomy-noise mega-hubs; the graph leg auto-engages as a rescue pass when the estimator says the query is ambiguous.
- Calibrated abstention (v1.5) — when retrieval quality is too low,
/recallreturns{decision: "low_confidence", hits: []}instead of top-1 garbage. No magic score cutoff — a calibrated multi-signal recommendation drives it. - Span verification (v1.5) —
POST /verifychecks whether a claim is supported by a chunk’s actual text (deterministic lexical match, no LLM). - Recall-gate QA (
qa.rs) — a pure scorecard that weighs in-scope / cited / confident / has-trace signals so an agent can decide when it has enough evidence to answer.
Temporal & knowledge
- Temporal evidence — every ingest stamps
observed_at/valid_from/valid_to/authority. Point-in-time recall returns the revision active at a timestamp. - Knowledge graph — entities and relationships extracted from
[[relation::entity]]syntax in markdown. Traverse, query, and follow links.GET /graph/entity/{name},GET /graph/relations,GET /graph/traverse. - Faithful explanations (v1.7) —
/graph/traverse?explain=truereturns structured hop chains (A --works_at--> B --ceo_of--> C), not a flat id string. Edge-type filter via?kind=. - Ordered procedures (v1.10) —
POST /procedureingests a root + ordered steps in one transaction;GET /procedure/{id}/stepsreturns them vianext_stepedges. - Deterministic classification (v1.10) —
POST /classifyroutes text to a category by matched keywords (auditable);POST /decision/{id}/evaluatefires the matched branch of a stored decision rule. No LLM.
Self-correction & maintenance
- Self-correction (v1.6) — operator-approved
supersedeslinks atomically expire the prior fact; historical recall (?at=<past>) still returns it.brain resolve+brain check-consistencysurface action items. - Automatic edge supersession (v1.27.22) — re-ingesting a relation with a changed window retires the old edge (
superseded_atset, old row preserved verbatim) and inserts the corrected belief; handoff is exact (old.superseded_at == new.created_at). Traversal + every graph read surface only current edges (no newer live same-triple row).GET /graph/relationships/{id}/historyrecovers the full version lineage (every version, four timestamps +currentflag). - Reviewable proposals (v1.8) —
/consolidate/proposedetects exact duplicates, subject conflicts, unresolved contradictions, stale sources (deleted vault files), and near-duplicates (cosine ≥ 0.95)./consolidate/applyapplies,/consolidate/undoreverses prior resolutions without retrieval regression.brain undo-resolvedrives the reverse. - Write-back gating (v1.14) —
POST /ingest/proposalscores a candidate (novelty via KNN, conflict via consolidation, salience via heuristics) but creates noknowledgerow; it becomes memory only via human approval. - Approval binds to the displayed bytes (v1.27.12) —
/proposalsserves the read-canonical review form (PII-redacted, markdown-ref-stripped, invisible-Unicode-free) plus a stablecontent_digest; approving with a stale digest is rejected (409), so a decision can never bless content that recall would render differently.
Human in the loop
- Meaningful control, not a checkpoint — the human review is a real job with tooling, time, and consequences, built against the four failure modes of supervised automation (out-of-the-loop skill loss, automation bias, the explainability paradox, moral crumple zones). See Human in the loop.
- A reviewable, not rubber-stamped, queue — every proposal card carries a novelty/conflict/salience breakdown, a PII-screened sourcing prompt, and a screen verdict; raw evidence (verbatim span,
source_uri, revision, heading, line range) opens on demand viaGET /get/{id}. - The queue is a clock (v1.20.6) — the Memory Operations panel shows a live SLA countdown per pending proposal and a gate-health strip (over-rejecting / under-reviewing / expired) so review load and drift are visible, not hidden in a log.
- Reviewer calibration (v1.20.23) — the client computes approve-rate / median decision latency / edit-rate / screen-override-rate from
ProposalView.decided_atand warns when the queue drifts into rubber-stamping. - Provenance ledger (v1.20.9) — the Agent Memory Register partitions the store by
origin(human/model/imported) with owner/source/kind filters and drill-down evidence, so how much of the store is model-originated is auditable at a glance. - Consequential and recorded — every approve / reject / supersede / expire is appended to the SHA-256 audit chain, making each operator decision reconstructable. (A free-text reject rationale is a client-side affordance; the server records the decision itself, not the reason.)
- Human-only erasure — agents can read and propose, but only a human can delete memory. The
memory_forgetagent tool was removed (v1.20.25); erasure runs through the audited console / HTTP API paths (DELETE /memory/{id},POST /purge, DSAR). Theump.forgettool is fence-gated by the legal-hold guard (409 legal_hold_activewhen the id is held).
Anticipation & suggestions
- Opt-in anticipation (v1.9) —
POST /suggestreturns related-but-not-surfaced chunks (taggedreason: "anticipated");POST /suggest/feedbackrecords accept/dismiss;GET /suggest/metricsreports the false-positive rate. No push, no decay, no hidden personalization — the agent asks explicitly.
Source lifecycle & connectors
- Source lifecycle — every chunk carries provenance (
source+ immutablerevision). Connectors backfill external sources through a supervised pipeline;POST /sources/reconcilesweeps orphans from deleted sources;DELETE /sources/{id}retires a source. - Connectors (v1.24) — a profile-gated registry (
POST /connectors/register) over a fixed vocabulary (CRM / Slack / Jira-Linear / read-only HRIS-EHR / GitHub) with a shared supervised translate+ingest pipeline. Thegithubconnector is the only runnable network backfill binary; the others ship in registry + translate-template form. Reconcile is never auto-sync; translated records flow through the injection screen (poisoned records quarantine, not memory).
Governance, privacy & compliance
- Append-only audit log — ingest and auth-denial events recorded hash-only in a SHA-256 hash chain;
GET /auditreads it,GET /audit/verifyverifies the whole chain. - Prompt-injection quarantine — suspicious content stored but excluded from retrieval until reviewed.
GET /quarantinelists it;POST /quarantine/{id}/release//deleteresolve it. The quarantine flag is one-shot at construction and rides a#[serde(skip)]flag through every read seam (a recalled chunk cannot forge or lose its taint). - Read-event audit (v1.15) — recall/search/get emit rows into the hash chain (opt-in), plus a replayable recall trace (
GET /recall/{trace_id}/trace). - DSAR workflow (v1.15) —
POST /dsarlocate → export → purge → chain-verifiable deletion certificate;GET /dsarledger (per-row deadline);GET /tombstonesregistry;GET /dsar/{id}/certificatere-fetches the certificate + live chain check.dry_runreturns a write-freeFootprintpreview. Per-jurisdiction deadlines viaJurisdictionRule. - GDPR export/purge (v1.14) —
GET /exportportable JSON;POST /purgehard audited delete by id or owner. - PII controls (v1.14) — deterministic read-time output redaction (
[redacted:…]); no write-time placeholder vault (v1.20.19). - Profiles (v1.21) — a Profile is a typed JSON bundle of existing knob defaults (default access scope, PII posture, per-kind retention, audit level, kind vocabulary). Apply invariant: the profile sets defaults, the row wins. A bound profile’s
retentionblock replaces the server-wide policy for that domain.GET /profiles,GET|POST /profiles/{name}. 12 USE_CASES presets seeded. - Roles (v1.23) — named bundles of scopes + default panel visibility + an action
canallowlist, mapped onto the existingaccess_scope/ownermechanism. Role names come from the JWTrolesclaim; definitions live in the editablerolesstore.GET /roles,GET|POST /roles/{name}. Role-gated console views in the client. - Legal hold (v1.22) — freeze a knowledge id against every erasure path (decay,
/purge, DSAR) until every hold is explicitly released.POST /legal-hold,POST /legal-hold/{id}/release,GET /legal-holds. Held ids are deferred (never purged) and reported on the DSAR certificate’sheld_ids[]. - Retention (v1.17.1 / v1.22) — per-kind
ttl_daysdecay marks expired rows into/decayed; the client surfaces “next to expire”.GET/POST /retentionedits the policy;GET /retention/reportis the per-domain × kind → count → expiring-within-30d evidence report;GET /art30emits the Article 30 processing record. - Cross-border transfers (v1.26) — the evidence + tagging layer for a PH BPO serving US/UK/EU/AU/SG/CA clients: a validated transfer register (
POST/GET /transfers, curated mechanism + jurisdiction vocabularies), per-jurisdiction DSAR deadlines, and pre-filled TIA (/transfers/{id}/tia, Schrems II) + DPA (/transfers/{id}/dpa, Art 28) templates a human DPO signs. Honestly framed: evidence, not enforcement. - Breach notification (v1.25) — human-opened (by the DPO role) append-only incident workflow with a notification/knowledge event log, per-jurisdiction notification deadlines, and every event hash-chained into the audit.
POST /breach,/breach/{id}/event,/breach/{id}/close,GET /breaches,GET /breaches/{id}. - BPO client register (v1.27) — one row per operating client (name, isolation domain, jurisdiction, bound profile, status) in the global DB — the spine of the BPO arc.
POST/GET /clients,GET /clients/{name}, per-client DSAR (/clients/{name}/dsar), legal hold (/clients/{name}/hold), and termination (/clients/{name}/end). Client-auditor role tokens see only their granted domains (read:team/*wildcards only reach the sharedglobalpool). - Supervisor QA queue (v1.27.8) —
/clients/{name}/proposals(sameProposalViewshape as/proposals) +POST /clients/{name}/proposals/{id}/coachcoaching notes, so a supervisor can review an agent’s proposed memories before promotion.
Domains & routing
- Domain isolation — each knowledge domain is its own SQLite pool (
POST /domains).GET /domains,DELETE /domains/{name}(echo-confirm),POST /domains/{name}/vacuum,GET /domains/{name}/export(consistentVACUUM INTOsnapshot),POST /domains/{name}/import(restore into a NEW domain),POST /domains/recompute(one-shot centroid sweep),POST /domains/move(relabel chunks). - Capacity envelopes — a config exceeding a documented capacity refuses new ingests with HTTP 507; read routes are never blocked.
- Alert feed — decision-critical events (pending/expiry/injection/chain-verify) stream to the
/opspanel via SSE (GET /events) and optionally to a signed webhook (BRAIN_ALERT_WEBHOOK_URL). - Observability —
GET /health(+ capacity + hardening incl. the monotonicaudit_commit_failurescounter),/health/db,/ready,/version,/stats, and Prometheus text/metrics(auth-gated).
Security
- Two authentication modes — opaque bearer (default) or JWT/JWS (opt-in), with per-route AuthZ, record-level access scoping, and fail-closed identity (poisoned auth store → 500, configured-but-empty → 401, role-store outage → deny).
GET /rolesresolves capabilities. - Fail-closed erasure + fence (v1.27.21) — the legal-hold fence guards every erasure path including
POST /ump/forget {"hard":true}and the ingest-replace/vault sweep; emptylive_urisreconcile requiresallow_empty: true;read:<team>/*wildcard grants only the shared pool; a no-role token passesrequire_dpo_roleonly when no roles are defined at all. - Atomic token rotation (v1.27.12) —
brain token rotatereplaces the bearer token via a 0600 temp file (fsync + rename); the server fails closed on group/world-readable tokens and signing keys. - Per-IP rate limiting (v1.27.16) — a distinct bucket per peer
SocketAddr(bounded key set, oldest-evicted), not a single shared global limiter. - Provenance-labeled recall (v1.27.12) — recalled context carries per-hit
source/node_kind/lawful_basis/regiontags inside theUNTRUSTED_*fence, so the model can attribute — not just trust — what it recalls. The samestrip_sentinels+sanitizeForBlockseam strips invisible/zero-width/bidi characters on the MCP envelope, CLI prints, and plugin render boundary. - Verified webhooks — HMAC verification, replay-window enforcement, idempotency, signed sinks fail closed on wide permission modes.
- Encrypted backup/restore — AES-256-GCM with an Argon2id-derived per-backup key, GCM AAD header binding, 0600 +
create_newsnapshot hygiene (fail-closed, never clobbers a live file). Backup format v3 default (--format v1|v2|v3); v1/v2 files stay readable. - AI transparency + SSO discovery —
/.well-known/ai-notice,/.well-known/security.txt,/.well-known/openid-configuration,/.well-known/jwks.jsonfor JWT/OIDC mode.
Integration surface
- OpenAI-compatible embeddings —
POST /v1/embeddings. - MCP server —
mcpbinary exposes search/recall/ingest plus the UMP family (ump.remember/revise/forget/feedback/recall/get/audit/capabilities) as MCP tools. brainCLI — the operator surface: status, doctor, query, explain, get, ingest-dir, reconcile, resolve, undo-resolve, check-consistency, classify, procedure, evaluate, suggest (+feedback/metrics), retention, domains (move/recompute), clients, ump, backup, restore, token, key, setup, sync, connector-status, snapshot-status, eval, bench, and more.--jsonenvelope mode on data commands.- UMP 1.0 — a full implementation of the open Universal Memory Protocol at conformance L3 (L2 without an operator key): signed records, capability tokens, HTTP + MCP + file bindings,
GET /ump/capabilities,/ump/remember/revise/forget/feedback/recall/memory/{id}/subscribe/audit. - Client control surface (v1.16+) — a Dioxus app (web + desktop + iOS + Android) with connection state machine, honest-batch review (A/S/R/J/K), recall decision-path viewer, DSAR certificate card, auth-failure feed, audit filters + export, live SLA clocks, role-gated console views, and an i18n-clean WCAG 2.2 AA interface.
- OpenClaw plugin —
brain-server/plugin/(TypeScript) calls/recalleach turn via openclaw’sbefore_prompt_buildhook, renders recalled context inside theUNTRUSTED_*fence, and offers the offline-queue + token-ladder posture.
Next steps
- See how it all works in Architecture.
- Try the Quickstart.
- Browse the API Reference.