acpx
[!IMPORTANT] This is an independent project and is not an official Agent Client Protocol (ACP) project.
acpx is a thin Rust client for launching Agent Client Protocol (ACP) agent
servers as local subprocesses and talking to them through the official ACP Rust
SDK.
The crate stays close to upstream ACP types and lifecycle rules. It removes the repetitive client-side work around subprocess launch, stdio wiring, ACP I/O task ownership, and typed access to the official ACP registry snapshot.
acpx is still pre-1.0.0, so the public API may change as the transport and
installer boundaries are refined.
What acpx Covers
- Local ACP subprocesses over stdio.
- A subprocess-backed
Connectionthat forwards upstream ACP methods. - A handwritten
AgentServercontract plusCommandAgentServerfor fixed launch commands. - A generated
agent_serverscatalog that preserves official ACP registry ids and metadata. - Direct launch support for package-backed registry entries that use
npxoruvx. - Typed errors for launch, registry lookup, platform resolution, and ACP failures.
What acpx Does Not Cover Yet
- Non-stdio ACP transports.
- Automatic download, extraction, or installation of registry binaries.
- Reconnection, persistence, or higher-level chat abstractions.
- Consumer-facing alias policy for registry ids.
Binary-only registry entries remain visible in agent_servers, but
connect(...) returns a typed unsupported-launch error in v0.
Installation
[]
= "0.1.0"
Quick Start
- Provide a
RuntimeContextthat can run local!Sendtasks. - Choose either a manual
CommandAgentServeror a generatedagent_servers::Server. - Call
connect, theninitialize,new_sessionorload_session,prompt, andclose.
Start with docs/GETTING_STARTED.md for concrete examples and runtime setup.
Current Scope
Connectionforwards ACP methods such asinitialize,authenticate,new_session,load_session,set_session_mode,prompt, andset_session_config_option.subscribe()exposes the raw ACP stream receiver from the upstream SDK.subscribe_session_updates()exposes capturedsession/updatenotifications.agent_servers::{all, get, require}expose the committed registry snapshot using official ACP ids.agent_servers::{host_platform, host_binary_target}help inspect registry binary metadata without adding an installer.
Example CLI
The example CLI is a manual integration harness. It resolves raw registry ids
and a small alias table, initializes the selected agent, creates a session,
optionally applies --mode and --permission-mode, prints streamed
session/update notifications, and closes cleanly.
Further Reading
References
- ACP protocol: https://github.com/agentclientprotocol/agent-client-protocol
- ACP Rust SDK: https://github.com/agentclientprotocol/rust-sdk
- ACP registry: https://github.com/agentclientprotocol/registry