Agent Host Protocol

gokhan1 pts0 comments

Agent Host Protocol

Skip to content

Appearance

Agent Host ProtocolSynchronized multi-client state for AI agent sessions<br>A portable, standalone server protocol that gives multiple clients a synchronized view of AI agent sessions through immutable state, pure reducers, and write-ahead reconciliation.<br>Get Started<br>View Specification<br>GitHub

01 The problem An agent session is stuck wherever it started.<br>The conversation, the turns, the pending tool approvals — they're tied to a single app or harness. Switch to another client, device, or automation and you can't pick up the same live session. AHP makes a session a shared resource , so it can live once and be driven from anywhere.

agent session

Stuck in one app

One live session, shared across clients

02 The shape One host sits between many clients and many agents.<br>In the lineage of LSP and DAP, the host owns the authoritative session state. Clients speak AHP; agent backends integrate directly. Any client can drive any agent — and every client stays in sync.

IDE<br>Web<br>CLI<br>Mobile<br>AGENT HOSTauthoritative state · sequencing · reconciliation<br>Copilot<br>Claude<br>Codex<br>ACP

03 On the wire Every change is one envelope, totally ordered.<br>The host stamps each mutation with a monotonic sequence and broadcasts it to every subscribed client. That single ordered stream is what keeps every window in sync.

Host broadcast to every client<br>41chat/turnStarted"Add retry logic to the API client"<br>42chat/delta"Sure — I'll wrap the fetch call…"<br>43chat/toolCallStartEdit file · src/api.ts<br>46chat/toolCallCompleteok · 1 file changed<br>47chat/turnCompleteturn t_8c1 done

04 Reconciliation Apply optimistically. Reconcile when the echo returns.<br>A client applies its own action locally right away, then matches the server's echo — stamped with origin — back to its optimistic copy. Concurrent edits from other clients fold into the same ordered stream.

Clientoptimisticdispatch(turnStarted)clientSeq 7 · applied locally

HostconfirmedserverSeq 41origin { ide, 7 } · reconciled

Read the guide View the specification

agent client host session clients state

Related Articles