Skip to content

About

Synchronized multi-client state for AI agent sessions

Resources

Code of conduct

Contributing

Security policy

Stars

392 stars

Watchers

17 watching

Forks

Latest commit

 

History

913 Commits

Folders and files

Repository files navigation

Agent Host Protocol

A synchronized, multi-client state protocol for AI agent sessions.

Read the documentation →

Overview

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.

Client libraries

Language Package Version Source
Rust ahp · ahp-types · ahp-ws crates.io clients/rust/ · CHANGELOG
TypeScript @microsoft/agent-host-protocol npm clients/typescript/ · CHANGELOG
Kotlin com.microsoft.agenthostprotocol:agent-host-protocol Maven Central clients/kotlin/ · CHANGELOG
Go github.com/microsoft/agent-host-protocol/clients/go Go Reference clients/go/ · CHANGELOG
Swift SwiftPM: microsoft/agent-host-protocol Tag package README · CHANGELOG
.NET Microsoft.VisualStudioCode.AgentHostProtocol · Microsoft.VisualStudioCode.AgentHostProtocol.Abstractions NuGet clients/dotnet/ · CHANGELOG

Other clients: AHPX (CLI + Node.js client), VS Code (built-in Agent Sessions client), ahpc (terminal client) and WeChat AHP (VS Code extension connecting WeChat to an existing local Agent Host chat).

The Rust, Swift, Go, and .NET SDKs ship a MultiHostClient for talking to two or more hosts at once (single-host consumers use the same API via MultiHostClient::single / .single(...) / hosts.Single(...) / MultiHostClient.SingleAsync(...)). See Connecting to Multiple Hosts.

Servers

  • VS Code agent host — The reference AHP server implementation (src/vs/platform/agentHost/node/).
  • pi-ahp — An open-source AHP host for the pi coding agent, exposing pi sessions to AHP clients over WebSocket.
  • ahpd — An open-source AHP host over WebSocket, that runs plugins: the agent, the ports and the server tools are all installed rather than built in, and @ahpd/sdk is the library to build a host of your own.

Versioning and releases

Each language client and the spec itself release independently on their own SemVer tracks. See docs/specification/versioning.md for the protocol-level rules and RELEASING.md for the release mechanics (tag conventions, CHANGELOG / metadata enforcement, required CI environments).

Development

# 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:preview

License

MIT

About

Synchronized multi-client state for AI agent sessions

Resources

Code of conduct

Contributing

Security policy

Stars

392 stars

Watchers

17 watching

Forks

Releases

Used by

Contributors

Languages