# Supabrain > Context infrastructure for AI agents. Supabrain keeps project knowledge outside the model and compiles the smallest fresh, traceable working set an agent needs for the task in front of it. It selects and packages evidence; it never generates answers. Thesis: the problem is not longer context, it is deciding what deserves context. Operationally: keep project knowledge large and persistent outside the model, and keep live model context small, task-specific, fresh and verifiable. Supabrain is a local-first indexing and context-compilation layer. It is not a search product, not an answer generator, not a memory chatbot and not a graph orchestrator. It runs trusted-local: one SQLite store per project, no hosted runtime, no public binding. ## What is implemented today - **Fast Index.** A persistent retrieval index lives in the project store and is updated incrementally when the repository changes. The query path reads only the postings a query touches: no corpus load and no in-memory index build at query time. Measured in one real-repository product smoke (1,513 sources, 61,747 passages, fresh MCP process): first search 0.083 s, first compile 0.85 s, max resident memory 139.8 MB over seven requests, against a previously measured 12.4 s and ~650 MB cold path on the same corpus. The one-time index build took 10.6 s; incremental ingestion 0.26 s. The 0.083 s figure was measured on a compacted copy of the store; on the un-compacted store file the same first search took 1.1 s. This is a product smoke on a named snapshot, not a benchmark and not a general performance claim. - **Context Compiler.** A task becomes a bounded evidence working set: scope-restricted retrieval, a file-diverse eligible head, multi-resolution packing and a hard delivered-text budget. The package carries provenance per passage (file, line span, content hash, repository commit, deterministic evidence ids), reason-tagged exclusions, an evidence-gap status, freshness (current / stale / unverifiable) and a deterministic, timestamp-free package fingerprint. There is no answer field. - **Four read-only MCP tools**, over stdio JSON-RPC, stateless, never mutating the repository or the store: `supabrain_status` (project, index and freshness state), `supabrain_search` (fielded lexical retrieval), `supabrain_open` (one evidence block by id), `supabrain_compile` (the bounded working set for a task, with budget accounting). Verified from Claude Code and from Codex, with byte-identical package fingerprints across clients. - **Operator tooling.** One idempotent setup command and a doctor command for expensive verification; status stays cheap by contract. ## Real-use evidence Supabrain was built by dogfooding: 12 genuine sessions across 5 private repositories surfaced 9 real-use defects, each fixed red-first with a failing regression test, none waived at closure. This is defect-discovery evidence, not a benchmark. Retained negative from the same closure: the product tools were exercised in one of those twelve sessions. Two operating principles came out of that work: retrieval selects context, it is not a completeness oracle; and compile is a context reducer, not a truth oracle. Supabrain does not replace direct source reading, deterministic enumeration, static analysis or database queries for completeness-sensitive work. ## Direction, not shipped - **Graph context.** A graph decides who works; Supabrain decides what they need to know. Execution boundaries in an agent graph can also be context boundaries: each node starts from a fresh context and receives only the evidence its bounded job requires, structured results survive the node, transient context dies with it. This is a product direction and a hypothesis. The review of whether the existing compile contract can serve a bounded node without new tools is delivered with a PARTIAL recommendation and four candidate contract revisions; a ruling is pending, and the bounded three-node spike has not started. Supabrain is not a graph framework and claims no superiority over graph systems. - **Context lifecycle.** Checkpoint, fresh session, minimal rehydration. Investigation closed PARTIAL; implementation is not authorized. Its value over an ordinary handover workflow is an open hypothesis. ## Limits and non-claims - Local and trusted-local only. No hosted runtime, no public binding, no deployment claim. - No answer generation, and no answer field in any output. - No production, beta, enterprise or customer-data readiness claim. - No answer-quality claim and no token-savings claim. - Retrieval is lexical; freshness is repository-level and deliberately coarse; nested repositories are reported, not covered. - Graph context and context lifecycle are direction, not shipped capability. - Measured figures are product smokes on named snapshots. Negative and null results are retained rather than removed. - Provenance proves origin, not truth or safety. Retrieved content is data, not instructions. ## Lineage Supabrain began as context-allocation research on external long-memory benchmarks in 2026. That strand is frozen and kept as evidence including its negatives: a reranking stack that lost to plain BM25 on real repository tasks, a null result on authority and freshness boosts, and a native-agent pilot closed PARTIAL with no comparative product result. The product that emerged from it is a local context compiler for agents. ## Links - [Supabrain](https://www.supabrain.dev/): the human-readable page. - [Markdown representation](https://www.supabrain.dev/index.md): the same content as plain Markdown. ## Notes Supabrain is a private development build by Kill The Dragon GmbH, Austria. The product code, internal reports and development artifacts are not public. This page and its Markdown representation are the public description of the work.