Audit AI-written code by linking prompts to git commits
brain0, from Brain0 Ai, is an MCP server and security observability tool that records AI-assisted coding interactions to produce tamper-evident provenance for commits. The app links natural-language prompts to resulting git changes, detects unintended modifications, and assigns risk levels to commits to support audit workflows. It runs as a local-first Rust daemon with on-device embeddings and secret redaction, aimed at developers, security auditors, and DevSecOps teams.
It maps prompts to commits so teams can audit agent decisions
brain0 builds a Passive Decision Graph that links each AI prompt to the exact git commit it triggered, creating a navigable record for post-hoc review. Signed provenance attestations and content-addressed storage add tamper evidence for supply chain audits. Outputs are recorded as structured artifacts, allowing auditors to traverse prompt → agent transcript → diff without changing existing commit history.
Drift detection and risk scoring flag mismatches between intent and change
The tool compares an agent's declared intent against the actual git diff and highlights unmentioned or unexpected edits with its Drift Detection feature. A separate Evidence-Driven Risk Scoring mechanism assigns risk levels to commits, and DLP Audit scans transcripts for exposed secrets or PII. These outputs are diagnostic, intended to surface items for human reviewers rather than to auto-remediate code.
Deployment depends on MCP support and TypeScript workspace components
brain0 runs as a local Rust daemon but requires Node.js v20+ and pnpm for its TypeScript workspace, and it integrates only with MCP-compliant agents and IDEs such as Claude Code, Cursor, and Windsurf. Optional local models are supported via Ollama. These environment requirements determine where the tool can be installed and which coding agents will be visible to its decision graph.
Passive, local-first operation fits audit workflows without changing developer habits
The app monitors agent activity passively and does not require git hooks or workflow rewrites, so teams can adopt it without altering everyday commits. Secret Redaction runs at ingestion to mask credentials and PII before storage, and the system is designed to operate offline by default, keeping embeddings and decision graphs on-device to align with privacy-sensitive environments.
Best matched to teams prepared to operate open-source observability tooling
As an open-source project led by Nicola Alessi with visible traction in AI development circles, brain0 suits engineering and security teams that can deploy and maintain integrations and act on evidence it produces. Organizations should plan governance and review processes so audit artifacts translate into enforcement steps, because the project provides forensic records rather than automated policy enforcement.





