Skip to content

Agent browser view ​

GET /v1/agents/:id/worker/view accepts a human JWT from any member of the agent's team. Unknown agents and agents in another team both return 404. GET /v1/orgs/:orgId/agents/:id/worker/view accepts the organization's credential with worker:logs:read, with the same environment and ownership checks as worker logs. No new human role is required.

The generated SDK exposes WorkerView.getAgentWorkerView({ path: { id } }) and WorkerView.getPartnerWorkerView({ path: { orgId, id } }). Read result.data directly: these routes return the following body without the ordinary success wrapper. Swagger defines the two alternatives.

json
{"live":false}
json
{"live":true,"page":null}
json
{"live":true,"page":{"url":"https://example.com/account","title":"Account","capturedAt":"2026-11-03T12:00:00.000Z","contentType":"image/jpeg","data":"<base64 JPEG>"}}

200 with live:false means no running/idle session exists, including after a session stops during capture. It lets a polling client stop using the same JSON path instead of special-casing a bodyless 204. A live worker with no tabs has page:null. A missing channel, Redis failure, unsupported older image, refused capability or capture failure is 503, never a misleading live:false. The route never creates a session or launches Chromium.

The screenshot is a JPEG viewport, quality 60, width at most 1280, height bounded by the captured viewport (at most 2000 CSS pixels before scaling). Selection is the most recently used remaining browser_play tab; if there are none, the last opened browser tab. Observation itself does not change this order.

An atomic per-agent Redis gate permits at most one capture request per two seconds across API replicas. More frequent requests get 429 and Retry-After: 2. The broker also refuses concurrent observation and spaces actual captures by at least two seconds. No screenshot cache is retained; this avoids keeping authenticated page content after a viewer leaves. All view responses use Cache-Control: no-store. A client should retry 429/503 at its normal polling interval; it must not label a transport failure as a closed tab.

The Agentfy chat and worker screen show a collapsible “Браузер агента” window. It requests a frame every five seconds only while expanded, the document is visible, and the worker session is alive. A new JPEG replaces the old one only after decoding. A stopped session clears the image and shows “Браузер закрыт”. A later session can activate the window again via the existing worker status feed.

Frames are transient: no storage object, transcript, tool result, worker event or log entry is created. Screenshots can contain private signed-in page content, so access checks run before capture and again before returning a successful frame.

Transport and rollout ​

See worker protocol for the encrypted broker relay. Build and publish the new browser worker image, configure its immutable tag, then deploy API/SDK/app. Existing sessions on an old image return 503 until they end naturally; observation never restarts them. Bootstrap revision stays 2 because the extension adds no bootstrap variable. The shell image has no browser observer. A rollback may remove the UI/API first; worker tools remain compatible.

Video recording, history, human clicks and streaming are out of scope. CDP screencast may be a later option if measured traffic justifies it; polling avoids continuous production when the panel is hidden and needs no stream backpressure protocol today.