ACP Client Adapter
ACPClientAdapter turns an external ACP agent into a Band participant. When someone mentions your Band agent, the SDK forwards the prompt to an ACP agent process, collects session_update chunks, and posts the results back to the room.
These examples use the SDK defaults for Band URLs. You only need to set custom rest_url or ws_url values if you are connecting to a non-default environment.
What It Does
- Spawns an ACP-compatible agent process over stdio
- Maps each Band room to an ACP session
- Injects Band tools into the ACP session through a local MCP server
- Posts text replies back to the room
- Posts thoughts, tool calls, tool results, and plans as room events
Installation
Basic Setup in Your Own Project
This is the normal consumer setup: install the SDK into your own project, create an ACPClientAdapter, and run it as a Band participant. You do not need the SDK repository checkout for this.
Band Tool Injection
By default, the adapter starts a local Band MCP server and passes it into each ACP session. That gives the external ACP agent access to Band platform tools such as:
band_send_messageband_send_eventband_add_participantband_lookup_peers
The MCP server is local to the adapter process and resolves tools against the active room at tool-call time.
Rich Streaming
The adapter preserves ACP chunk types and reflects them back into Band:
This makes external ACP agents much easier to watch inside a room. tool_call and tool_result events carry a structured JSON payload rather than prose, so anything reading room history gets typed fields instead of a sentence to parse.
Custom Tools
You can expose extra MCP tools to the external ACP agent with additional_tools:
These are served through the same local MCP surface as the built-in Band tools.
Agents That Need ACP Authentication
Some ACP agents require an explicit authenticate call after initialize. Use auth_method for those:
You can also pass environment variables for the subprocess with env=....
For example, a Cursor-backed bridge might look like:
Configuration Reference
Pass either command for stdio transport or both host and port for TCP.
Exactly one of the two is required; supplying neither, or both, raises
ValueError at construction.
The injected Band MCP tools resolve against the active room through the SDK runtime, so you do not wire up a separate external MCP process.
Feature keywords go in directly, not through a wrapper object. ACPClientAdapter
accepts capabilities={Capability.MEMORY} and capabilities={Capability.CONTACTS},
plus the include_tools, exclude_tools, and include_categories tool filters. It
declares no supported event kinds, because the room narration above is posted by the
adapter’s own emitter rather than the shared emit path, so passing emit raises
BandConfigError.
Repository Examples
If you are working from the SDK repository itself, there are example scripts under examples/acp/ for:
- basic ACP client setup
- rich streaming
- Cursor-backed ACP usage
Those examples are useful as references, but they are not required for a normal package consumer.
Notes
This integration runs the ACP agent as a backend for Band. If you want an editor to connect to Band directly over ACP, use ACP Server.