Open Source · Self-Hosted

The operating system
for autonomous organizations

Your agents have amnesia. They can't talk to each other. You spend 80% of your time as a high-paid secretary, copy-pasting context between them. Brain is the self-correcting knowledge graph that gives your agents shared memory, governed autonomy, and verifiable intent.

Request Early Access See how it works
Architecture
Human
Web Chat
Feed
Graph View
Terminal
Agents
Architect
Strategist
Management
Coding · MCP
Observer
Graph
Projects
Decisions
Tasks
Observations
Features
Questions
Suggestions
Conversations
Commits
Intents
Learnings
Traces
Policies
Auth
OAuth 2.1
RAR (RFC 9396)
DPoP (RFC 9449)
Better Auth IdP
Integrations
GitHub
Slack
Git Hooks
MCP Protocol
ERC-8004

The problem

You are the integration layer
between your AI agents

You already use AI agents. Your coding agent writes your code. Your chat assistant helps you think through architecture. Your editor agent autocompletes. But none of them share context.

Every agent you add makes it worse. Brain fixes this — not by replacing your agents, but by giving them shared memory.


The architecture

Why a graph, not a message bus

Most platforms try "agent swarms" — agents messaging agents. That creates a game of telephone where instructions get distorted. The graph is the single source of truth.

ApproachAgent swarms / message busesKnowledge graph (Brain)
LogicScripted workflows (if A, do B)State-based graph (emergent logic)
MemoryEphemeral, session-basedPersistent, pruned, versioned
CoordinationAgents message agents (telephone game)Agents read/write to shared truth
VerificationAssumes API calls workContinuous telemetry (reality grounding)
Autonomy"Let it rip" (high risk of loops)Authority scopes (risk-managed)
Over timePerformance degradesSystem gets smarter via learnings
SecuritySandbox isolation (the "box")Governance graph + sandbox (the "brain")
AuditingLog-based (text dumps)Graph-based (hierarchical traces, machine-readable)

Specialized agents

A coordinated workforce, not a chatbot

Each agent has a role, a domain, and authority scopes. They coordinate through the knowledge graph — not through you.

Architect

CTO / CPO

Technical decisions, system design, architecture constraints. Checks implementations against what was decided. Resolves conflicts between competing approaches.

Strategist

CEO / CSO

Market positioning, pricing, GTM, competitive response. Challenges product decisions against business viability. Catches positioning drift before it compounds.

Management

COO

Task tracking, priority management, execution velocity. Flags blocked work, stale decisions, and resource conflicts. Keeps the machine running.

Coding Agents

Via MCP · Cursor, Aider, Codex, and others

Your existing tools connected to the graph. Context injected on session start. Decisions, observations, and questions flow back automatically.

Design Partner

Early-stage co-designer

Brainstorms product ideas, asks probing questions, identifies gaps. Shapes vague ideas into structured projects, features, and decisions in the graph.

Observer

Background intelligence

Scans the graph for patterns nobody asked about. Stale decisions, cross-project conflicts, missing coverage, priority drift. Surfaces observations that compound into suggestions.


How it works

Agents coordinate through the graph

No agent messages another agent. They write structured signals to the knowledge graph. The graph makes it visible to the right agent at the right time.

1

Coding agent notices a contradiction

While implementing rate limiting, a coding agent detects that src/billing/api.ts uses REST — but the graph has a confirmed decision to standardize on tRPC. It logs an observation.

2

Architect agent sees it on next context load

The Architect checks the observation against constraints. Confirms the contradiction is real. Generates a suggestion: "Migrate billing API to tRPC, or revisit the standardization decision."

3

Suggestion surfaces in your feed

You see the suggestion with full provenance — the observation, the contradicted decision, the Architect's reasoning. You accept it. A migration task is created with one click.

4

Next coding session picks up the task

The migration task appears in the coding agent's context. It decomposes into subtasks, works through them, and status rolls up automatically. No human copied anything between tabs.


Connect in 60 seconds

Your coding agent, with context

One-time setup. Context injection is automatic on every session after that.

terminal
# One-time workspace setup
$ brain init
  Opens browser → authenticate → approve scopes
  ✓ Connected to workspace

# Start a task-scoped session
$ brain start task:implement-rate-limiting
  Context: 3 decisions, 2 constraints, 1 open question
  Task status: todo → in_progress

# Or just open your MCP-compatible coding agent
$ codex
  SessionStart → project context loaded
  4 decisions · 2 tasks · 1 recent observation

Key concepts

Built different

The primitives that make coordination possible.

⬡ Decisions

Every decision is tracked — who made it, why, and what alternatives were considered. Agents propose. Humans confirm. Nothing falls through the cracks.

◉ Observations

"I noticed X." Agents surface contradictions, gaps, patterns, and risks as they work. Observations accumulate and compound into actionable suggestions.

⊞ Projects, Features & Tasks

Work breaks down hierarchically. Agents decompose tasks at runtime. Status rolls up automatically. You see progress without tracking it.

✦ Suggestions

Agents tell you what you should be thinking about. Accept a suggestion and it becomes a task, decision, or feature — with full trace back to the evidence.

? Questions

When an agent doesn't know, it asks instead of guessing. You answer. The answer becomes a decision in the graph. No stalling, no silent assumptions.

💬 Conversations

Every chat produces structured knowledge. Conversations group by project automatically. Branch when topics diverge. Find anything by following the graph, not scrolling history.

⟠ Commits

Code is linked to the decisions and tasks it implements. Contradictions are caught before they land. Every change has a trail back to the intent behind it.

△ Authority Scopes

Control what each agent can do without asking. Start restrictive. Expand trust over time. You set the boundary — agents stay within it.

⬢ Intents

Every agent action starts as an intent — a structured request in the graph. Intents carry the full authorization context: what, why, and with what constraints. They're evaluated against authority scopes before execution.

🧠 Learnings

Agents that repeat mistakes are useless. Learnings are behavioral rules injected into agent prompts at runtime — created by humans directly or suggested by other agents. The system gets smarter as it works, not dumber.

◇ Living Descriptions

Descriptions update themselves. Ship a feature — the project summary reflects it. Confirm a decision — related entities incorporate it. No one writes status updates.

⟡ Cross-Project Intelligence

Conflicts between projects surface automatically. Duplicate work gets flagged. A decision in one project that breaks another is caught before anyone notices manually.

⊕ Agent Sessions

Every session is remembered. The next agent knows what the last one did — what was decided, what questions came up, what got built. Context carries forward.

⟐ Identity

One person across all tools. Your Slack, GitHub, and terminal sessions all resolve to the same identity. Agents act on your behalf with scoped permissions.

⟁ Traces

Every agent execution is a graph-native call tree — not a log file. Subagent spawns, tool calls, and decisions form a hierarchical trace you can traverse, query, and audit. Forensic debugging is a graph query, not grep.

⛊ Policies

Deterministic governance rules stored as graph nodes, not prompt text. Agents evaluate intents against policy constraints before acting. Update one node to change what every agent is allowed to do — no prompt rewriting.


Reliability layer

Solving the three drifts

Autonomous systems don't fail from lack of intelligence. They fail from drift — slow divergence between what the system believes and what's actually true.

Context Drift

The graph becomes a junkyard of stale decisions

Decisions made in v1.0 become poison for v2.0. Brain uses temporal decay — nodes that aren't referenced lose weight over time. The Observer agent runs conflict resolution loops, flagging stale decisions that contradict recent commits. Context is filtered for relevance and recency, not dumped wholesale.

Authority Drift

Too autonomous = dangerous. Too locked down = a dashboard

Autonomy isn't binary. Brain uses tiered authority scopes — from zero-human atomic actions to multi-model consensus for high-stakes moves. Agents operate within risk budgets, not permission checkboxes. You manage thresholds, not individual approvals.

Reality Drift

The graph says 90% done, but the code is broken

If the Brain only reads its own graph, it's a delusion engine. Observer agents perform truth audits — checking claims against actual state via webhooks and integrations. When reality diverges from the graph, the system triggers a desync alert before any agent acts on stale data.


Beyond coding

From developer tool to company brain

The same graph that coordinates coding agents can coordinate entire departments. When Support logs an observation, Sales knows not to pitch an angry customer. No human relayed the message.

Engineering

Architecture, CI/CD, code quality

Coding agents, architecture decisions, commit-linked tasks. The foundation that's already working.

Growth

Marketing, content, SEO

Ad spend observations, conversion tracking, copy drafts. Features shipped by Engineering auto-surface for marketing.

Sales

Pipeline, outreach, contracts

CRM activity flows into the graph. Agents check customer sentiment before outreach. Deal claims verified against payment webhooks.

Support

Tickets, sentiment, escalation

Bug reports become observations. Repeated issues compound into feature suggestions. Support context flows to Engineering automatically.

Operations

Budget, vendors, compliance

Procurement tracked as intents with authority scopes. Budget decisions verified against Stripe. No shadow spending.

Strategy

Market intelligence, positioning

Competitive observations, pricing decisions, GTM plans. The Strategist challenges product decisions against business viability.

The competitive advantage isn't automating tasks — it's automating the context-sharing between human silos. When every department writes to the same graph, cross-departmental intelligence emerges for free.


Verifiable autonomy

Auditable by design,
not by afterthought

Most autonomous platforms are black boxes. Brain is a signed logic trace. Every decision, every dollar, every line of code has a provenance chain back to the intent that authorized it.

Governance telemetry

Every decision is a node with a UUID, author, timestamp, and reasoning. Researchers and auditors can query the graph directly — no digging through chat logs or stdout dumps.

Signed intent chains

When an agent spends money or merges code, the graph records which intent authorized it, which authority scope permitted it, and which human (or consensus) approved it. The full chain is machine-readable.

Hierarchical traces

Agent executions are graph-native call trees. A subagent spawn becomes a root trace; each tool call, message, and decision is a child node. Traverse the full execution path with a graph query — from intent to final action.

Policy-as-graph

Governance rules are structured nodes, not prompt instructions. Each policy carries typed rules, scopes, and approval requirements. The Authorizer evaluates intents against the policy graph before minting tokens — deterministic, auditable, and updateable without touching a single prompt.

Eval-ready metrics

Context retention, conflict resolution rate, authority distribution, decision velocity — all computable directly from the graph. No custom instrumentation required.

The "Judge" pattern

High-stakes actions go through an Authorizer Agent — a separate, privileged instance that validates intents against policy constraints before minting scoped tokens. The worker never sees master keys.


Open source

Your coordination layer,
your code

The knowledge graph that coordinates your agents shouldn't be a black box you rent. It should be infrastructure you own, inspect, and extend.

Full source accessGraph engine, MCP server, agent prompts, extraction pipeline. Every line.
No vendor lock-inYour data lives in your SurrealDB instance. Export anytime. Migrate anytime.
Extend everythingCustom agent types, observation categories, feed cards, MCP tools.
Community-drivenAgent prompts, authority scope templates, and integrations contributed by users.
View on GitHub MIT License
stack
# The full stack
Graph        SurrealDB
Backend      Bun (Bun.serve) · TypeScript
Frontend     React · Tiptap · Reagraph
Auth         Better Auth · OAuth 2.1 · RAR · DPoP
LLM          Provider-agnostic (OpenRouter · Ollama · BYO keys)
Agents       MCP Server · Git Hooks
Protocol     MCP · OAuth 2.1 · RAR · DPoP · OIDC

# Lines of duct tape replaced

Agentic authorization

Tokens that know
what they're for

Generic OAuth scopes like write:tasks aren't enough for autonomous agents. Brain's authorization server issues tokens that carry the full intent — what the agent wants to do, why, and with what constraints.

Rich Authorization Requests (RAR)Tokens embed structured authorization_details from the knowledge graph. Not "scope: finance" — but "move $500 from Account A to Account B, authorized by Decision #47."
DPoP Proof-of-PossessionEvery token is cryptographically bound to the agent's key. Stolen tokens are useless without the private key in the agent's isolated runtime.
Intents as Authorization ContextAgent actions start as intents in the graph. The authorization server evaluates intents against authority scopes, then mints a token scoped to exactly that action.
Better Auth as Identity ProviderHuman authentication (login, MFA, sessions) stays with Better Auth. The custom authorization server handles the agent side — token issuance, RAR scopes, DPoP binding.
authorization flow
# 1. Human authenticates via Better Auth
User  →  Better Auth (login, MFA)
        →  session cookie

# 2. Agent requests authorization with intent
Agent →  POST /authorize
        authorization_details: [{
          type: "intent",
          intent: "task:deploy-v2",
          actions: ["execute"],
          constraints: decision:d47
        }]

# 3. Token issued with DPoP binding
AS    →  Access Token (JWT)
        cnf: { jkt: "agent-key-thumbprint" }
        authorization_details: [...]

# 4. Agent proves possession on every request
Agent →  DPoP: signed-proof-jwt
        Authorization: DPoP access_token

Execution layer

Run anywhere. State lives in the graph.

The Brain is the director. Sandboxes are disposable. An agent can die every 5 seconds — the next one picks up exact context because state is external to the execution environment.

Local

Claude Code, Codex, Cursor — your existing tools on your machine, connected via MCP.

brain start task:xyz

Sandboxed

E2B, Daytona, or Docker. The graph injects a scoped token — the sandbox never sees master keys.

Provider interface

Multi-model consensus

High-stakes moves verified by multiple models before execution. The Authorizer Agent mints tokens only when consensus clears.

Authority tier 3
Stateless sandboxes Observations and decisions write to SurrealDB in real-time. No VM persistence needed. Cheaper, more scalable, fully auditable.
Zero-knowledge execution Sandboxes generate ephemeral key pairs. Tokens are DPoP-bound to that key. Even a compromised sandbox can't escalate — the token is scoped, short-lived, and useless without the VM's private key.
Provider-agnostic The orchestrator manages state in the graph. The provider handles execution. Swap runtimes without changing logic. Local for privacy, cloud for scale.

Self-hosted

Your data never leaves your machine

Your decisions, architecture, strategy, and competitive intelligence stay on your infrastructure.

Docker Compose

SurrealDB + Bun + React. Running in 2 minutes on any machine.

docker compose up

Single Binary

Embedded SurrealDB. No dependencies. Laptop, VPS, or Raspberry Pi.

brain serve

Cloud (Coming)

Managed hosting for teams. Same codebase. Your data, your region.

Waitlist open
Bring your own LLM keys Uses your provider keys (OpenRouter, Ollama, or direct). No data passes through Brain's servers.
Works offline Graph, feed, and local tools work without internet. LLM features can run offline with local models, or use networked providers when configured.
No telemetry No usage tracking. No analytics. No phone-home. Fully air-gappable.

The agent economy

From walled garden to
open agent network

Your Brain isn't just internal infrastructure. It's a gateway to the decentralized agent economy — where your agents can discover, hire, and transact with external agents on an open, verifiable network.

On-chain agent identityEvery agent gets a portable identity via ERC-8004. Move agents between platforms without losing history. Your agent's reputation travels with it.
Verifiable workAgents post cryptographic validation proofs when they complete tasks. No trust required — the proof is on-chain and machine-verifiable.
Reputation registryA global credit bureau for machines. Agents that lie, fail, or overcharge get scored down across the entire network, not just your local graph.
Escrow-based autonomyHire an external researcher agent. Payment locks in a smart contract. Work validates on-chain. Payment releases automatically. No invoices, no wire transfers, zero trust required.
internal → external governance
# Your internal governance
Identity Node   →  Local agent identity
Intent Node     →  Private action request
Observation     →  Internal state signal

# ERC-8004 external governance
AgentID         →  Global, portable identity
Validation      →  Cryptographic proof of work
Reputation      →  On-chain trust score

# The bridge
Brain mints intent → 8004 verifies identity
Agent completes work → 8004 posts proof
Contract validates → payment released

Early access

Stop being the glue
between your agents

Brain is in early development. If you're running multiple AI agents across engineering, sales, or operations and drowning in context management, we want to talk.

Request Early Access