As artificial intelligence models evolve from simple autocomplete tools into autonomous agents capable of performing complex tasks over hours or even days, the way developers interact with these systems must fundamentally shift. We have moved past the era where AI was a reactive assistant confined to a single IDE window. Today, an agent’s work is continuous, often persisting across environments, devices, and network boundaries. To address this, GitHub has introduced the Agent Host Protocol (AHP), an open standard designed to decouple agent sessions from specific applications, allowing developers to move their work seamlessly between VS Code, mobile devices, the cloud, and custom-built tooling.
The Obsolescence of Client-Specific Integrations
The development of the Agent Host Protocol was born out of necessity. When GitHub Copilot first emerged, it was architected as a VS Code extension, a common approach that bundled its own harness to manage agent life cycles. While this provided a smooth, integrated experience for developers working within the editor, it created a rigid dependency. Because the agent’s existence was tethered to the lifecycle of a specific VS Code window, any disruption—such as closing the application, updating the software, or switching to a remote machine—would result in the termination of the agent session.
This model proved insufficient as the ecosystem expanded. As the Copilot mobile app for iOS and Android and various cloud-based integrations matured, each product required its own distinct, bespoke implementation to communicate with AI models. This created a fragmented landscape. If a developer wanted to build a custom workflow, a terminal-based interface, or a specialized mobile tool, they were forced to create one-off integrations. This approach was not only unsustainable for the engineering teams maintaining these products but also limiting for the end user, who was essentially trapped within the specific boundaries defined by each individual application.

To resolve this, developers required a universal, independently versioned language—a protocol that could communicate across various versions of VS Code, the GitHub Copilot app, and third-party clients. A shared protocol ensures that every client sees the same agents, maintains the same history, and understands the same state, effectively liberating the user from being tied to a single application’s definition of an agent session.
Designing for Ubiquity and Resilience
The primary design goal for the Agent Host Protocol was to facilitate a seamless transition of work. A developer might initiate a task in the cloud via their phone during a commute, pause, and then resume that exact same session on their laptop in the office. To achieve this, the protocol had to be exceptionally resilient, capable of handling network interruptions, sudden disconnections, and concurrent mutations from multiple clients without losing state.
Crucially, the architects of AHP decided to stay out of the business of defining agent behavior. Unlike the Language Server Protocol (LSP) or the Debug Adapter Protocol (DAP), which focus on specific domains, AHP is domain-agnostic. It avoids prescribing how an agent should think or act, focusing instead on the logistics of interaction. This was a deliberate choice to ensure the protocol remains future-proof as the field of AI agents evolves at a rapid pace.

The resulting structure of AHP is centered on "channels," identified by URIs. These channels represent the coarsest unit of functionality. While every server is required to implement the root, session, and chat channels, the protocol is extensible, allowing for the addition of channels that handle terminal support, Model Context Protocol (MCP) integrations, or OpenTelemetry (OTel) reporting.
Within these channels, the protocol employs a reducer-based state object. In this model, the server acts as the central arbiter of state. Each client sends a sequence of actions—such as a request to send a chat message—which either triggers a side effect or mutates the state. This architecture offers significant advantages: it makes reconciliation after a network drop trivial, as a client can simply re-queue actions and wait for the server to confirm the updated state. Furthermore, this reducer-based approach is highly compatible with modern UI frameworks like React, simplifying the development of responsive, state-aware client interfaces.
Scaling the Protocol: Lessons from Implementation
Adopting the Agent Host Protocol within VS Code was a massive undertaking that required replacing the legacy Copilot Chat extension—a codebase that had grown to over 400,000 lines of TypeScript over three years. Because the legacy system was built on the assumption that it would operate within the lifecycle of a VS Code window, it was incompatible with the standalone, process-agnostic architecture required for AHP.

The transition leveraged the Copilot SDK as the foundation for the new agentic stack. While building a basic harness that could perform simple file edits was relatively straightforward, replicating the full suite of features that developers had come to expect from Copilot Chat—the "long tail" of functionality—presented a significant engineering challenge.
Simultaneously, the GitHub team was working on expanding cloud-based agent capabilities. Because the requirements for GitHub’s cloud infrastructure differed from those of a local editor, the two teams opted for separate implementations: VS Code’s host was written in TypeScript, while the GitHub Agent Host was developed in Rust. This divergence served as a rigorous "acid test" for the protocol itself. By having two entirely different teams implementing the same standard, the engineers were able to identify gaps in the protocol, such as early limitations in handling shell-type tool outputs that were not backed by a PTY.
This process of "unification through implementation" proved that the protocol was not just a theoretical construct, but a functional, portable standard. Over several months, the teams inventoried their respective extensions. Some were kept as specific to their platform, such as metadata links to GitHub project boards, while others were folded back into the core protocol to ensure that different implementations could communicate without friction. Today, this protocol powers a unified experience where local apps, cloud sandboxes, and VS Code all interact with the same agentic state.

The Future of Open Agent Interactions
The Agent Host Protocol is designed to be accessible, with libraries already available in a variety of languages including Rust, TypeScript, Kotlin, Swift, .NET, and Go. This accessibility has already spurred creative use cases beyond standard editors, ranging from physical macropads that reflect real-time agent status to specialized smart watch applications and Kanban-style project management tools.
For developers looking to integrate these capabilities, the barrier to entry is intentionally low. One can connect to an agent host directly through the Copilot app by enabling "Direct Connections," or via the "Add Remote Agent Host" function in the VS Code agents window. For those who prefer the command line, spawning a standalone agent host is as simple as running code agent host in a terminal.
By making the Agent Host Protocol an open standard, the goal is to foster an ecosystem where agents are not siloed within proprietary applications. Whether a developer is building a companion app for their own custom agents, integrating agent sessions into a team’s internal dashboard, or adding AHP support to a new editor, the infrastructure is now available to ensure those tools remain connected and consistent.
As the industry continues to push the boundaries of what autonomous agents can accomplish, the importance of a standardized, client-agnostic communication layer becomes increasingly clear. By moving away from brittle, one-off integrations and toward a shared protocol, the community is building a foundation for a more flexible, reliable, and deeply integrated AI development experience. The Agent Host Protocol is currently available on GitHub for those interested in contributing to the standard, building their own clients, or simply exploring the future of connected agentic workflows.

