Keyboard shortcuts

Press ← or β†’ to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Brain OS 🧠

Stop giving your AI amnesia.

Brain OS is a biologically-inspired, central cognitive engine written in pure Rust. Instead of every script, coding assistant, and chat UI keeping its own isolated, fragmented context, Brain OS acts as your single source of truth.

It routes intents through a Thalamus, scores importance via an Amygdala, and stores everything in a unified Hippocampus (FTS5 + HNSW Vector Search). Whether you connect via HTTP, WebSocket, gRPC, or MCP, your AI tools now share one localized, ever-growing memory that runs 24/7 on your machine.

Your data never leaves your hardware. Your AI never forgets.


How It Works

Every input β€” regardless of protocol β€” flows through the same pipeline:

Input β†’ Intent Classification β†’ Importance Scoring β†’ Memory Store/Recall β†’ LLM Response

The memory engine combines vector search (HNSW) with full-text search (BM25 FTS5), fuses results via Reciprocal Rank Fusion, and reranks by importance and recency. A forgetting curve runs every 24 hours to prune low-value memories and promote reinforced episodes to permanent semantic facts.

Beyond memory: the kernel it grew into

Memory is the hook β€” but the same daemon also mediates what your AI tools can do. Every capability it exposes β€” search the web, run a sandboxed command, send a notification, probe a host, audit its own config β€” is a typed entry in one capability manifest, each tagged with a safety tier and routed through the same consent, audit, and budget gates. Whether a request comes from your terminal, an MCP client, or Brain’s own resident reasoner, it sees the same manifest and is held to the same rules.


Design Principles

PrincipleDescription
Local-firstRuns on your machine. No cloud, no telemetry, no account.
Protocol-agnosticHTTP, WebSocket, gRPC, MCP β€” one memory behind every surface.
Memory that earns its placeImportance scoring + forgetting curve keep the signal sharp.
Open to any LLMOllama, OpenAI, OpenRouter, or any OpenAI-compatible endpoint.
Fail safe, never silentlyDegraded-but-functional is the target state.