A synchronized, multi-client state protocol for AI agent sessions.
The Agent Host Protocol (AHP) defines how a portable, standalone sessions server communicates with its clients. Multiple clients can connect to the server and see a synchronized view of AI agent sessions through immutable state, pure reducers, and write-ahead reconciliation.
- Swift — Add
https://github.com/microsoft/agent-host-protocolas a Swift Package Manager dependency to use theAgentHostProtocoltypes/reducers library or theAgentHostProtocolClientsingle-host and multi-host client library. See the Swift package README andclients/swift/for the example iOS client. ThePackage.swiftmanifest lives at the repository root because SwiftPM only resolves manifests at the root of a remote git repo; the actual Swift sources live underclients/swift/AgentHostProtocol/. - Rust — See
clients/rust/for theahp,ahp-types, andahp-wscrates. - AHPX — A command-line and Node.js client for connecting to AHP servers, managing sessions, and sending prompts.
- VS Code — VS Code includes Agent Sessions client code for working with AHP hosts.
- VS Code agent host — The reference AHP server implementation. Start in
src/vs/platform/agentHost/node/when browsing the repository.
For consumers that need to talk to two or more hosts at once, the Rust SDK ships a MultiHostClient abstraction in ahp::hosts and the Swift SDK ships MultiHostClient in AgentHostProtocolClient. Single-host consumers use the same API via MultiHostClient::single in Rust or MultiHostClient.single(...) in Swift. See Connecting to Multiple Hosts for the design and surface.
# Install dependencies
npm install
# Start local dev server
npm run docs:dev
# Build for production
npm run docs:build
# Preview production build
npm run docs:previewMIT