Overview
The Claude adapter connects Broker to a Claude Code CLI subprocess running inside your Devbox. It launches Claude Code with--output-format stream-json and forwards streaming JSONL messages between
Broker and the CLI.
For the full wire protocol specification, see the Protocol Spec.
Getting started
To try out fully working code examples, check out the axon-broker-agents example repo. Clone the repo and run the test commands. The example will create a Devbox with Claude and start a “hello world” conversation by publishing an Axon event.Broker mount configuration
| Field | Type | Description |
|---|---|---|
type | string | Must be broker_mount |
axon_id | string | Required. The Axon stream Broker reads from and writes to |
protocol | string | Must be claude_json |
How Broker uses Claude JSONL
- Broker launches Claude Code with
--output-format stream-jsonwhen the Devbox starts - Claude initializes and sets up the session
- Publish
queryto the Axon to start a turn - Broker translates that event into Claude’s
userJSONL input - Claude output is republished to Axon. Event
event_typerepresents the Claude message type to deserialize.
Send a simple message to Claude
Create a Devbox with a Claude Broker mount and send a ‘hello world’ message to Claude.Create Devbox with Broker
Create an Axon for communication and launch a Devbox with Claude Code mounted via Broker:
Handling control requests from Claude
During a session, Claude may ask the user a question or request permission before taking an action - these arrive as control request events on the Axon stream. When you receive one, you can either prompt your user for input or respond automatically by publishing a control response.There are many types of control responses for responding to Claude. See the Protocol Spec for complete details on all available response types and structures.
Interrupt a turn
Stop Claude’s current response by sending an interrupt control request:Building a complete integration
The examples above cover basic messaging and interrupts. To build a production-ready integration, you should become familiar with the full set of Claude control request and response types — these are the building blocks for handling every interaction Claude can initiate during a session. Claude may emit control requests for a variety of reasons, including:- Permission requests — Claude asks for approval before executing commands, writing files, or taking other actions
- User questions — Claude asks the user for input or clarification
- MCP server interactions — Claude requests access to MCP tool servers
