Introduction
An open-source managed agent platform.
Brain is an open-source alternative to Claude Managed Agents. Run agent sessions on infrastructure you control. Your application sends messages and connects tools; Brain keeps the session history and runs Pi in an isolated environment for each session.
Four services
| Service | Responsibility |
|---|---|
| Brain | Accept messages, order turns and stream events. |
| Storage | Keep transcripts, attachments and session state across restarts. |
| Tools | Call uploaded code, remote services and connected client functions. |
| Sandbox | Create and clean up isolated environments for Pi and uploaded tools. |
Your platform decides where sessions run. Each service can be deployed and allocated resources independently. Read Architecture for how they cooperate.
Work with sessions
A session is an agent conversation with its own model, instructions and tools. A turn is the work for one user message. Brain runs one turn at a time in each session and can run different sessions concurrently.
An event records a message, tool call, result or status change. Clients can stream events live and reconnect from the last event they processed. A checkpoint saves the agent’s own state with its matching history position for recovery.
The runtime, also called a harness in the API, drives the agent loop. Pi calls the model and manages its context. Tools execute through implementations that your application authorizes.
Start building
- Quickstart: start Docker Compose and run a session from the CLI or TypeScript.
- Session lifecycle: stream, interrupt, resume and close.
- Tools: connect hosted, remote and browser functions.
- Operations: deploy and observe the services.
- Roadmap: implementation status and qualification evidence.
The embedded application package starts a server from Node.js. The Docker composition runs each service independently.
Docs for coding agents
/llms.txt indexes the documentation. /llms-full.txt contains every page as plain text.