Rust reference SDK for the Agent Runtime Control Protocol (ARCP) v1.1.
The protocol is defined in the ARCP v1.1 specification. This crate turns that wire contract into typed Rust APIs for clients, runtimes, transports, persistence, permissions, and testable in-process workflows.
[dependencies]
arcp = "1.1"Default features include WebSocket and stdio transports:
arcp = { version = "1.1", default-features = false, features = ["transport-ws"] }Run a local runtime over WebSocket:
cargo run -- serve --bearer secret-token --principal alice@example.comIn another process, run one of the end-to-end examples:
cargo run --example submit_and_stream
cargo run --example resumability
cargo run --example delegationUse the CLI to confirm the crate and wire versions:
cargo run -- versionarcp::client- typed client session APIs.arcp::runtime- server-side runtime, tool dispatch, jobs, leases, artifacts, subscriptions, and credentials.arcp::messages- ARCP v1.1 message payloads and capability structures.arcp::envelope- wire envelope, raw envelope, priority, and metadata.arcp::transport- in-memory, WebSocket, and stdio transport implementations.arcp::auth- bearer, signed JWT, and anonymous authenticators.arcp::store- SQLite-backed event and credential ledgers.arcp::extensions- core vs. vendor-extension namespace validation.
- Getting started - install, run, and wire a minimal client/runtime pair.
- Architecture - how the crate modules fit together.
- Transports - WebSocket, stdio, and in-memory selection guide.
- CLI -
arcp version,arcp serve, and current CLI limits. - Guides - spec-aligned guides for sessions, jobs, leases, delegation, errors, and extensions.
- Conformance - section-by-section ARCP v1.1 coverage.
Runnable examples live in examples/:
submit_and_stream- submit a job and consume lifecycle events.resumability- replay events after reconnecting.job_subscribe- subscribe to a job from another session.cost_budget- enforce v1.1 lease budgets.provisioned_credentials- issue and revoke lease-bound credentials.delegationandhandoff- spawn or transfer work across agents.stdioandaxum_server- host the runtime over different integration paths.
| Feature | Default | Purpose |
|---|---|---|
transport-ws |
yes | WebSocket transport via tokio-tungstenite. |
transport-stdio |
yes | Newline-delimited JSON over tokio::io. |
The SDK implements the core ARCP v1.1 surfaces for envelopes, sessions,
authentication, jobs, event replay, subscriptions, cancellation, artifacts,
leases, budgets, provisioned credentials, vendor extensions, and WebSocket /
stdio / in-memory transports. Deferred surfaces are tracked in
CONFORMANCE.md.
cargo fmt --all -- --check
cargo check --all-targets --all-features
cargo test --all-features
cargo clippy --all-targets --all-features -- -D warnings
cargo publish --dry-runCoverage uses cargo-llvm-cov:
cargo install cargo-llvm-cov
rustup component add llvm-tools-preview
scripts/coverage.shMIT OR Apache-2.0