Bitemporal knowledge graph

Memory that keeps time.

Every fact gets two clocks: when it was true, and when Brain found out. Ask what's true now, or replay exactly what the graph knew last March. Conflicts get scored, not silently overwritten. Forget means deleted, not hidden. REST or MCP — self-hosted or managed.

AGPL-3.0NestJS · SurrealDB · BGE-M3eval-gated in CI
Bitemporal readoutasOf=now
valid timet →
transaction timet →
Default queries answer 'now'. Pass asOf and the same query returns what Brain knew at that moment — nothing reconstructed after the fact.
[01]Bitemporal · live demo

Replay what Brain knew, not what's true now.

Acme moved from the starter plan to growth on Mar 10. Brain only recorded the switch on Mar 12. Drag both clocks — history gets replayed, never rewritten.

valid time — when it was trueJun 22
JanFebMarAprMayJun
plan switch
transaction time — when Brain knewJun 22
JanFebMarAprMayJun
Brain records it
GET /v1/entities/acme?asOf=Jun 22&asOfTxn=Jun 22
Brain answers
plan
growth

Both clocks are current — the switch happened and Brain knows it. Growth is the live answer.

scenario · acme plan change · starter → growth
[02]Retrieval engine

Seven stages — and only the first two are about vectors.

The unit of retrieval is a typed fact on the knowledge graph, never a text chunk. Vector + BM25 are just the doors in — they map free text onto candidate facts. Everything after is graph-native: ontology router, per-entity buckets, edge walks, PPR, rerank. Each stage is a feature flag with its own per-tenant metrics.

query + tenant scope
  1. S01Entry legs: vector + BM25
  2. S02HyPE alt-embeddings
  3. S03Predicate + type router
  4. S04Edge expansion
  5. S05Tier-aware PPR
  6. S06Cross-encoder rerank
  7. S07Listwise LLM rerank
ranked facts + per-leg score breakdown
Each stage toggles and is measured independently; the CI eval reports recall per leg. Queries that already name their anchors skip the doors entirely — graph_retrieve and the multi-hop planner enter straight from entities.
[03]Beyond embeddings

What a vector store can't tell you.

Embeddings find text that looks similar. A memory layer has to do more than that.

Plain vector store
INITE Brain
Chunks of text, ranked by cosine similarity
Typed subject–predicate–object facts on a graph
Only what looks true now
Two clocks — query now, or as of any past moment
Re-embedding silently overwrites the old vector
Conflicts get scored; close calls land as COMPETING
Delete a row and hope it's gone
Forget cascades facts, edges, embeddings — HMAC tombstone left
No notion of relationships
Typed edges plus a multi-hop planner across them
PII sits in the same index as everything else
DB-level PII fence, gated by caller scope
[04]The rest of the stack

More than a retriever.

Everything between an ingest and an answer you can trust.

Ingest

Conflict resolution

Two ingests for one fact go through a scored ladder — confidence × source-trust × recency × authority. Close calls land as COMPETING, never a silent overwrite.

Trust

Source-aware trust

A fact is claimed, not true. Every source earns a learned, domain-scoped agreement rate; declared authority and cross-document corroboration feed ranking. Inspect it all via GET /v1/sources.

Graph

Identity resolution

Cross-vertical merges collapse duplicates into one entity via identity_of edges; re-attribution follows mergedInto. The nightly Dreams pass proposes merges for near-duplicates on its own.

Retrieval

Multi-hop

A planner LLM splits a question into up to four anchored sub-queries. Supporting facts carry through for HotpotQA-style joint-F1 scoring.

Synthesis

Faithful answers

/v1/synthesize runs corrective-RAG with strict / lenient / off guardrails and a claim-level faithfulness scorer. Pass-rate gates at 1.0.

Platform

Domain Packs

Versioned ontology plugins: typed predicates, extraction tuning, seed documents, MCP tools. Ed25519-signed manifests, a global registry with verified publishers — and a marketplace with featured and paid packs.

Documents

Document pipeline

Source → Indexer → Candidates → Brain. Extraction proposes, one resolver disposes. Stored documents re-index when a new pack lands; external indexers join over a pull work API.

MCP

Pack MCP tools

Installed packs extend the MCP surface — declarative query tools over their own predicates, HMAC-signed proxies to publisher endpoints. Operator consent required; no third-party code in-process.

Access

ABAC policies

Named policy sets per API key: allow / deny over REST + MCP actions, row-level read filters by PII class, trust thresholds, and provenance. Report-only mode makes the rollout safe.

Safety

PII fence

PII is gated at the database layer with PERMISSIONS and caller scopes. Every predicate declares its PII class up front.

Lifecycle

GDPR forget

A forget is a synchronous hard delete — facts, edges, and embeddings gone. Only an HMAC tombstone stays, so you can prove it happened.

Tenancy

Per-tenant isolation

Each company gets its own database (co_<id>). One REMOVE DATABASE forgets a whole tenant. Nothing leaks across the wall.

[05]Self-host or hosted

Two ways to run it. Same graph.

Open source

Self-host

Clone the repo, bring up SurrealDB, point it at your keys. AGPL-3.0 — every line is yours to read, fork, and ship back.

  • Docker Compose — SurrealDB + service in minutes
  • Nothing leaves your network
  • BGE-M3 embeds locally — no calls out to OpenAI
  • Admin cockpit and the eval suite ship in the repo
$ docker compose up -d
Managed

brain.inite.ai

The same build, none of the babysitting. A hosted endpoint that redeploys on every push to main.

  • No servers, no database to keep alive
  • Per-tenant isolation, scoped API keys
  • Health and Prometheus metrics built in
  • Identical REST + MCP surface
https://brain.inite.ai
[06]Eval results

How well it actually retrieves.

Brain ships with its own eval suite. These are the latest scores on the retrieval and memory-lifecycle benchmarks — measured, not asserted.

recall@1
0.962
95% CI 0.94–0.98gate ≥ 0.6
recall@3
0.989
95% CI 0.97–1.00gate ≥ 0.8
MRR
0.976
95% CI 0.96–0.99gate ≥ 0.5
NDCG@10
0.973
95% CI 0.96–0.99gate ≥ 0.7
recall@1 by vertical
cross
..990n=192
rent
..939n=33
shop
..833n=12
estate
..800n=10
events
..778n=9
health
1.000n=6
correctness · all gated at 1.0
faithfulness1.000
identity-F11.000
memory-lifecycle1.000
PII-gating1.000

From the eval report, n=262 (multi-vertical suite + wikidata). Temporal queries hit recall@1 1.000 (n=21), current 0.959 (n=241). Every push re-runs it; the build fails below the gate.

[07]Quickstart

Three ways to talk to brain.

Pick the one that matches your runtime.

# Ingest a fact
curl -X POST https://brain.inite.ai/v1/ingest/fact \
  -H "Authorization: Bearer $BRAIN_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "entityRef": { "vertical": "rent", "id": "cust_42" },
    "predicate": "complained_about",
    "object": "late maintenance",
    "validFrom": "2026-05-05T10:00:00Z",
    "source": { "vertical": "rent", "messageId": "msg_1" }
  }'

# Search
curl -X POST https://brain.inite.ai/v1/search \
  -H "Authorization: Bearer $BRAIN_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "query": "maintenance issues", "limit": 5 }'
[08]Model Context Protocol

One config block. The full tool surface. Any client.

A per-tenant MCP URL, scope-aware. Drop it into Claude Desktop, Cursor, Goose, or n8n — the agent gets 28 built-in tools, and installed Domain Packs can add more.

claude_desktop_config.json
{
  "mcpServers": {
    "brain": {
      "url": "https://brain.inite.ai/mcp/<companyId>",
      "transport": "http",
      "headers": { "Authorization": "Bearer <api-key>" }
    }
  }
}
28 scope-aware tools · highlights
search_knowledge
synthesize
get_entity_profile
detect_contradiction
record_fact
retract_fact

Same URL, same auth header, no glue code — whatever speaks MCP.

MCP setup guide
[09]Agent skills

Skills that teach the agent to use Brain.

Six Anthropic-format skills — search, recall, bitemporal queries, writes, conflict adjudication, and the setup walkthrough. One curl installs them into ~/.claude/skills.

shell · ~/.claude/skills/
$ curl -fsSL https://brain.inite.ai/install.sh | sh
[10]Open source

Built in the open, licensed AGPL-3.0.

Read the code, run your own, send a PR. Everything that runs brain.inite.ai lives in the repo.

AGPL-3.0Network copyleft — self-host freely; changes you serve over a network stay open.
Built with
NestJS 11TypeScriptSurrealDB 3.xBGE-M3 · 1024dOpenAICohere RerankOpenTelemetryDockerNode 22

Star the repo

Watch releases, open issues, send patches. The roadmap is public.

Star on GitHub