Expand description
§agent-client-protocol-conductor
Binary for orchestrating ACP proxy chains.
§What is the conductor?
The conductor is a tool that manages proxy chains - it spawns proxy components and the base agent, then routes messages between them. From the editor’s perspective, the conductor appears as a single ACP agent.
Editor ← stdio → Conductor → Proxy 1 → Proxy 2 → Agent§Usage
§Agent Mode
Orchestrate a chain of proxies in front of an agent:
# Chain format: proxy1 proxy2 ... agent
agent-client-protocol-conductor agent "python proxy1.py" "python proxy2.py" "python base-agent.py"The conductor:
- Spawns each component as a subprocess
- Connects them in a chain
- Presents as a single agent on stdin/stdout
- Manages the lifecycle of all processes
§How It Works
Component Communication:
- Editor talks to conductor via stdio
- Conductor uses the
proxy/successorenvelope to route messages - Conductor answers a
proxy/successorrequest from the editor or the final agent with-32600and drops such a notification: only proxies and their conductor exchange the envelope - Each proxy can intercept, transform, or forward messages
- Final agent receives standard ACP messages
Process Management:
- All components are spawned as child processes
- When conductor exits, all children are terminated
- Errors in any component bring down the entire chain
§Example Use Case
Add Sparkle embodiment + custom tools to any agent:
agent-client-protocol-conductor agent \
"sparkle-acp-proxy" \
"my-custom-tools-proxy" \
"claude-agent"This creates a stack where:
- Sparkle proxy injects MCP servers and prepends embodiment
- Custom tools proxy adds domain-specific functionality
- Base agent handles the actual AI responses
§Related Crates
- agent-client-protocol - Core ACP SDK
- agent-client-protocol-polyfill - Compatibility proxies, including the native MCP-over-ACP to HTTP adapter
- agent-client-protocol-trace-viewer - Interactive trace visualization
Modules§
- trace
- Trace event types for sequence diagram viewer Trace event types for the sequence diagram viewer.
Structs§
- Agent
Only - Wrapper to convert a single agent component (no proxies) into
InstantiateProxiesAndAgent, for every protocol version. - Command
Line Components - Wrapper for command-line component lists that can serve as either proxies-only (for proxy mode) or proxies+agent (for agent mode).
- Conductor
Args - Command-line arguments of the
agent-client-protocol-conductorbinary. - Conductor
Impl - The conductor manages the proxy chain lifecycle and message routing.
- Instantiated
Chain - The result of
InstantiateProxiesAndAgent::instantiate_proxies_and_agent: the (possibly modified)initializerequest, the proxy components, and the agent component of a conductor acting as an agent. - Instantiated
Proxies - The result of
InstantiateProxies::instantiate_proxies: the (possibly modified)initializerequest and the proxy components of a conductor acting as a proxy. - Proxies
AndAgent - Builder for creating proxies and agent components.
Enums§
- Conductor
Command - The conductor’s subcommand: the role it plays toward its client.
- Selected
Initialize Request - The
initializerequest that starts a conductor’s chain, parsed for the protocol version the conductor selected.
Traits§
- Conductor
Host Role - The role a conductor plays toward its own client:
Agentfor a conductor created withConductorImpl::new_agent, whose last proxy talks to the conductor’s agent component, orProxyfor one created withConductorImpl::new_proxy, whose last proxy talks to the conductor’s own successor. - Instantiate
Proxies - Trait for lazy proxy instantiation (proxy mode).
- Instantiate
Proxies AndAgent - Trait for lazy proxy and agent instantiation (agent mode).