Documentation Menu
Developer Access Overview
Control your BrainRoad agent programmatically with API keys, REST endpoints, MCP integration, and real-time event streaming.
On this page
Programmatic Access to Your Agent
BrainRoad gives you four ways to interact with your agent beyond the dashboard:
- Public REST API — Start, stop, check status, and query billing with API key authentication
- MCP Integration — Connect Claude Code, Cursor, or any MCP client to your agent’s 90+ methods
- Event Streaming (SSE) — Subscribe to real-time events as your agent works
- WebSocket RPC — Direct access to the full OpenClaw protocol with all methods and events
All of these are available from the Developer Access page in your dashboard (sidebar → API).
Two Types of Credentials
Your agent uses two separate authentication tokens:
| Credential | What it controls | Where to find it |
|---|---|---|
| Gateway Token | Your agent itself — send messages, manage channels, run tools, access all 90+ OpenClaw methods via WebSocket RPC or MCP | Dashboard → API → Gateway Connection |
API Key (brk_ prefix) | BrainRoad infrastructure — start/stop agent, check status, query billing, subscribe to events | Dashboard → API → API Keys section |
Gateway Token is generated when your agent is provisioned. It gives full access to your agent’s capabilities.
API Keys are created by you in the dashboard. You can have up to 10 active keys, name them for tracking, and revoke any key instantly.
Quick Start
- Go to your dashboard and click API in the sidebar
- Copy your Gateway Token to connect via WebSocket or MCP
- Create an API Key to use the REST API and event streaming
- Use the ready-to-copy code examples on the page