AI Agent News/stories/github-details-the-agent-host-protocol-for-sessions-that-continue-across-devices.md

Infrastructure

GitHub details the Agent Host Protocol for sessions that continue across devices

GitHub has described the Agent Host Protocol (AHP), an open standard first built in VS Code and now used across GitHub to keep agent sessions running across devices and clients. The protocol lets clients such as VS Code, the Copilot app and mobile apps share the same agents, history and state without a separate integration for each one.

Source: github.blog/engineering/engineering-principles/building-the-agent-host-protocol-for-sessions-that-continue-across-devices

AHP is organized around URI-identified channels, and every server must implement the root, session and chat channels. Each channel holds a reducer-based state object. The server is the arbiter of that state, while clients send queued actions that the server reconciles and acknowledges, which makes reconnection and replay easier on poor networks.

The protocol deliberately avoids defining how agents behave, so it can keep up with fast changes in agent design. VS Code's agent host is written in TypeScript and GitHub's is written in Rust. GitHub says running two independent implementations helped reveal gaps in the protocol, such as output from shell tools that is not backed by a PTY.

Client libraries are available in Rust, TypeScript, Kotlin, Swift, .NET and Go. In the Copilot app, developers can enable Experimental > Direct Connections to connect to a host, and VS Code supports Add Remote Agent Host in the Agents window. Running code agent host in a terminal starts a standalone version of VS Code's agent host.

Why it matters if you build agents

Developers building agent clients or servers can target one open protocol instead of writing a bespoke integration for each product. Implementing the root, session and chat channels is the baseline for interoperability.

Because the protocol leaves agent behavior to implementations, custom behavior is best carried in custom methods or _meta fields, as GitHub did for its project board links. Those extensions may not work with other hosts.

Get stories like this every weekday

One short email with the day's agent tooling news.

Subscribe