Building the Agent Host Protocol for sessions that continue across devices
GitHub introduces the open Agent Host Protocol to maintain agent sessions across devices and applications, enabling continuity for AI-driven workflows beyond single editors.
GitHub Copilot now supports agent sessions that persist across devices and applications, allowing users to start work in one place and resume elsewhere without interruption. This capability is powered by the new Agent Host Protocol (AHP), an open standard designed to standardize how agents interact with clients like editors, mobile apps, and terminals. The protocol ensures agents remain accessible even when switching between VS Code, the GitHub Copilot app, or cloud-based environments, addressing fragmentation in agent integrations.
Previously, agent sessions were tied to specific applications or editor windows, limiting flexibility and continuity. VS Code extensions, for example, tied agent lifetimes to editor sessions, while mobile apps required separate integrations for cloud-based agents. The lack of a shared protocol meant developers couldn’t easily integrate agents into their own workflows or tools without bespoke solutions, creating siloed experiences across GitHub’s products.
The Agent Host Protocol was built to solve these challenges by providing a minimal, versioned standard that avoids dictating agent behavior while enabling seamless interaction across clients. It uses URI-identified channels for core functionality like sessions and chat, with reducer-based state management to handle reconnections, network interruptions, and concurrent client actions. This design allows clients to synchronize state efficiently and supports debugging and UI frameworks like React.
Adopting AHP required significant architectural changes, including a new agentic stack in VS Code and a separate Rust-based implementation for GitHub’s cloud agent host. The protocol’s flexibility was tested by two independent teams implementing it differently, revealing gaps such as unsupported shell-type tool output and URI structure assumptions. These insights led to refinements, ensuring the protocol remains adaptable to evolving agent capabilities and diverse infrastructure needs.