Brain
Build your agent the way you want. Working across your systems
Brain is an open-source agent runtime with pluggable loops, models, tools and execution environments. Use a ready-made loop or write your own context management and tool-calling logic. Run tools in your application, browser or remote environment, and interact with the agent through one API.
For example, a support agent could use tools you provide to look up an order in your backend, check a delivery page in a browser and update a support ticket. Each tool runs where it can access the resources it needs.
Why use Brain?
- Control the agent's behavior
- Use a ready-made loop or define the context, model calls and tool sequencing yourself. Official extensions use the same public interfaces as yours.
- Connect work across your systems
- Connect application functions, HTTP services, browser actions and remote execution. Choose where the loop and each tool run when creating a session.
- Run it as a service
- Your application sends work, follows progress and retrieves results through Brain's API. Run Brain yourself, or use Aex for hosting.
Try an order lookup
The quickstart connects an agent to a function in your application. It includes the server command, compatible package versions, a complete program and the expected result.
You need Docker, Node.js 22 or newer and an OpenAI API key. Model calls use your provider account. Application functions run in your process; keep it connected while those tools are needed.
Build your application
Project status
Brain is in early preview. APIs and compatibility may change before 1.0. Committed history survives a server restart with storage intact; interrupted work is reported as failed and is not automatically resumed or retried. History does not restore lost browser or sandbox files.
MIT licensed. Read the API reference, benchmarks, or contributor guide.