Skip to content- Sources: primary
- Summary: GitHub built the Agent Host Protocol first in VS Code because an extension-hosted harness tied an agent's lifetime to one editor window, and each Copilot client had its own cloud-agent integration. AHP is organized into URI-identified channels, where every server must implement root, session and chat channels and may add terminal, MCP or OpenTelemetry channels. Each channel holds reducer-based state that the server arbitrates, and clients send actions that the server reconciles and acknowledges, which makes reconnection and replay simple.
- Why it matters: Builders of agent frontends can attach to Copilot sessions through one open protocol instead of a bespoke integration per client.
- Background: The Language Server Protocol and Debug Adapter Protocol standardized how editors talk to language tools and debuggers, so one server works with many clients. AHP applies the same idea to agent sessions but stays out of agent behavior, because agent designs still change quickly. The reducer pattern, where state changes only through ordered actions applied by one authority, is common in UI frameworks and collaborative apps.