Skip to content

About

Synchronized multi-client state for AI agent sessions

Resources

Code of conduct

Contributing

Security policy

Stars

416 stars

Watchers

17 watching

Forks

Latest commit

 

History

972 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

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.

Clients

  • VS Code — The built-in Agent Sessions client.
  • AHPX — A CLI and Node.js client.
  • ahpc — A terminal client: CLI, interactive TUI, and an MCP server for agents and humans.
  • WeChat AHP — A VS Code extension that connects WeChat to an existing local Agent Host chat.
  • ahpw — A web client for any AHP server, run as an ahpd plugin or on its own.

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, plugin-driven AHP server with users, permissions, and usage tracking. Plugins provide native Claude and pi agents, ACP agents, tools and MCP servers, sandboxed computers, a web UI (ahpw), and more. Includes @ahpd/sdk for building your own host and plugins.
  • hydra-ahp — An open-source AHP host for Hydra, a multi-client ACP session daemon, exposing Hydra sessions to AHP clients such as VS Code's agent UI.
  • AHP-ACP Gateway — A universal AHP WebSocket host that runs configured ACP agents, with persistent sessions, replay and reconnect, permissions, and cancellation.

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

The guide, specification, and reference are versioned. npm run docs:versions (run automatically by docs:dev and docs:build) materializes the released versions listed in docs/.vitepress/versions.ts from their git tags into docs/versions/ (gitignored). The first listed version is served at the root URLs; main is served under /draft/.

License

MIT

About

Synchronized multi-client state for AI agent sessions

Resources

Code of conduct

Contributing

Security policy

Stars

416 stars

Watchers

17 watching

Forks

Releases

Used by

Contributors

Languages