Introduction
Choose your agent's behavior and connect work across your systems.
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.
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. Your application sends messages, follows progress and retrieves results from Brain.
Run your first agent
The quickstart connects a model to an order lookup function in your app. You need Docker, Node.js and a model key. Run Brain yourself, or use Aex hosting.
| Choose | What you control |
|---|---|
| Agent loop | Context management, model calls and tool sequencing |
| Model | The provider and model used by the session |
| Tools | The functions the agent may call |
| Environments | Where the loop and each tool run |
A session brings these together for one conversation. Start with a ready-made loop and application functions; connect browser or workspace extensions as needed.
Build on it
- Send messages, stream output and retrieve outcomes.
- Write a tool to connect your application.
- Write a loop to change the agent's behavior.
- Operate Brain on your infrastructure.
The application SDK supports TypeScript and JavaScript; other clients can use the HTTP API. Extension guides describe their own supported languages.
Brain is in early preview. APIs may change before 1.0. A server restart preserves saved history when storage is intact, but interrupted work fails and is not automatically resumed or retried.