agentclientprotocol/rust-sdk
Rust ACP SDK for editor–agent sessions, with versioned APIs and composable proxies
Automated SPDX check for reference only — not legal advice. Disclaimer
GitHub Star History
Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.
Evidence-Backed Technical Brief
AI Deep ReviewArchitecture & Core Mechanics
ACP standardizes the connection between an editor and a coding agent. The core agent-client-protocol crate provides role APIs, connection builders, handlers, and protocol types; agent-client-protocol-derive supplies its derive macros. An editor can connect directly to an agent, or Conductor can assemble a chain of proxies between them so integrations can extend behavior without modifying the agent. Network transports in agent-client-protocol-http and MCP integration in agent-client-protocol-rmcp are separate crates.
Version selection is explicit: Client, Agent, and Proxy enter stable v1 through .v1() or draft v2 through .v2(). Both version namespaces export familiar names such as ConnectionTo, Responder, and SessionBuilder, but integrations use the types for the selected version. With unstable_protocol_v2, Proxy.protocol_router() exposes separate strict v1 and v2 implementations. Builder::new(role) is the lower-level alternative for custom routing and does not apply a protocol-version guard.
Key Capabilities & Differentiators
The HTTP transport crate supports HTTP/SSE and WebSocket. For MCP, standalone servers do not need the ACP transport feature; carrying MCP natively over ACP requires unstable_mcp_over_acp, which the rmcp integration exposes as a passthrough feature. Stable protocol v1 supports global and per-session proxy attachment when that transport feature is enabled. The polyfill offers an HTTP compatibility path for agents that cannot consume native MCP-over-ACP declarations.
Draft v2 attachment requires both unstable_protocol_v2 and unstable_mcp_over_acp. Proxy.v2().with_mcp_server(...) adds a declaration to each supported setup request, while the session builders attach a server on creation or resume. Fork-time attachment also requires unstable_session_fork. Successful v2 attachments remain active for the connection lifetime; the create, resume, and fork builders expose on_proxy_session_start so proxied setup can be forwarded without tying later session events to the setup response.
Trade-offs & Limitations
This SDK is a fit when editor and agent are separate integration boundaries or when behavior needs to be added through reusable proxies. If the requirement is only MCP tools, direct rmcp integration avoids adopting ACP session and proxy abstractions. If ACP is needed but the host application is already JVM- or TypeScript-based, the official Kotlin or TypeScript SDK is worth evaluating first to avoid adding a Rust component solely for protocol integration.
Modularity keeps a direct v1 integration small, but mixed-version routing, native MCP feature flags, and polyfill translation expand the compatibility matrix. Test attachment scope and lifetime across reconnects and session transitions, and verify that each agent accepts the MCP representation it receives. Additional proxy hops also add boundaries to diagnose and measure. Apache-2.0 permits commercial use and self-hosting, subject to applicable redistribution obligations; it does not determine the terms of downstream agents or MCP servers.
Hardware & Deployment Guide
The Cargo workspace uses Rust edition 2024 and declares Rust 1.88.0. For a new integration, start with simple_agent.rs and yolo_one_shot_client.rs under src/agent-client-protocol/examples/, then add a network transport or Conductor only if the topology needs it. The SDK is embeddable as a library, and Conductor can also run as a binary. Offline operation depends on the selected agent, model, and MCP endpoints; the ACP layer itself does not provide inference or require GPU sizing.
The v5.6.1 releases add session-based MCP request admission in Conductor, fix unintended child-session cancellation in the cookbook's v2 examples, and audit Clippy exceptions while enforcing API documentation in the HTTP crate. Test admission decisions and child-session lifecycles before rolling out those paths. Treat stable v1 as the default starting point unless a specific v2 capability warrants the draft API.
.v1() and .v2() builders select stable or draft APIs with separate types.Proxy.protocol_router() exposes strict v1 and v2 implementations in one component.agent-client-protocol-http supplies HTTP/SSE and WebSocket transports.Rust editor, coding-agent, or middleware teams that need a standard session interface, with optional proxy chains and MCP attachment.
You only need MCP tools, want a turnkey coding agent rather than an SDK, or require stable guarantees for the draft v2 API.
Comparison vs. Top Coding, Skills & MCP Alternatives
Full comparison →| Repository | Stars | 7d Trend | Stack | License | Core Positioning |
|---|---|---|---|---|---|
| rust-sdk ★ | 254 | +3 | Rust | Apache-2.0 | Rust ACP SDK for editor–agent sessions, with versioned APIs and composable proxi |
| headroom | 81.5k | +455 | Python | Apache-2.0 | Local context compression for LLMs via a Python library, proxy, and MCP server |
| cc-switch | 159.1k | +1.7k | Rust | MIT | Tauri desktop manager for AI coding providers, local routing, and MCP config |
| agent-browser | 55.4k | +1k | Rust | Apache-2.0 | Rust CLI and stdio MCP for agents that read and act on live web pages |
AI Context Briefing (for Claude / Cursor / Windsurf)
Standardized architecture summary & quickstart commands ready to paste into coding agents.
curl -sL https://repoforai.com/repo/agentclientprotocol/rust-sdk.md
Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).
Frequently Asked Questions about rust-sdk
How should I connect an editor and an agent while preserving version boundaries?
Client.v1() or Agent.v1() and the corresponding stable example. If you need an intermediary, use Proxy.v1(). To expose both versions from one proxy component, enable unstable_protocol_v2 and use Proxy.protocol_router() with separate strict implementations. The router does not turn a v1 implementation into a v2 implementation.Does the SDK need a GPU, and how should I size a deployment?
Can I ship the SDK commercially or run it on my own infrastructure?
When is ACP preferable to using `rmcp` directly or choosing another ACP SDK?
rmcp integration if your application only needs MCP servers or tools. Add ACP when an editor also needs a standard interface for coding-agent sessions or when you want proxies between the editor and agent. If ACP is already required but your application is JVM- or TypeScript-based, consider the official SDK for that stack before introducing a separate Rust component.Upstream README & Documentation
This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.
Top 10 Breakout Open-Source AI Repos, Every Thursday
Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.
Zero spam · 1-click unsubscribe · Privacy Policy