agent-client-protocol-tokio
Tokio-based utilities for working with ACP agents.
What's in this crate?
This crate provides helpers for spawning and connecting to ACP agents using the Tokio async runtime:
AcpAgent— Configuration for spawning agent processes, parseable from command strings or JSONStdio— A transport that connects over stdin/stdout with optional debug logging
Usage
The main use case is spawning an agent process and connecting to it:
use ;
use AcpAgent;
use FromStr;
let agent = from_str?;
// The agent process is spawned automatically when connected
Client.builder
.name
.connect_to
.await?;
You can also add debug logging to inspect the wire protocol:
use ;
let agent = from_str?
.with_debug;
When to use this crate
Use agent-client-protocol-tokio when you need to:
- Spawn agent processes from your code
- Test agents by programmatically launching them
- Build tools that orchestrate multiple agents
If you're implementing an agent that listens on stdin/stdout, you only need the core
agent-client-protocol crate.
Related Crates
- agent-client-protocol — Core ACP protocol types and traits
- agent-client-protocol-derive — Derive macros for JSON-RPC traits
- agent-client-protocol-trace-viewer — Interactive trace visualization
License
Apache-2.0