Skip to main content
GET
/
v1
/
agent-browser
/
connect
Connect the browser extension
curl --request GET \
  --url https://api.hq.zone/v1/agent-browser/connect \
  --header 'Authorization: Bearer <token>'

WebSocket endpoint

This is not a plain HTTP GET — it’s a WebSocket upgrade. It’s the channel the HQ browser extension dials out on so a remote agent can drive the user’s local browser; you don’t normally call it yourself.
  • Subprotocol: hq-agent-browser.v1.
  • Auth: a browser can’t set an Authorization header on a WebSocket, so the PAT rides in Sec-WebSocket-Protocol as hq-pat.<token>, alongside the subprotocol.
  • Heartbeat: ~20 s application-level ping (also keeps idle proxies open).
  • Presence: one live connection per user. The server relays computer.* commands down this socket and awaits each result.
GET /v1/agent-browser/connect
Upgrade: websocket
Sec-WebSocket-Protocol: hq-agent-browser.v1, hq-pat.hq_pat_xxx
Once connected, the agent reaches this browser via Ask using the user’s browser.

Authorizations

Authorization
string
header
required

Personal Access Token. Send as Authorization: Bearer hq_pat_....

Response

101

WebSocket upgrade. The HQ extension dials out here (PAT in Sec-WebSocket-Protocol as hq-pat.<token>) to receive computer.* commands. Frames are the WebDriver-BiDi-shaped local_browser_protocol (see docs/local-browser-control.md); OpenAPI cannot describe the per-frame protocol.