Agent Browser Runtimev0.1.1 · docs

Notes for coding agents and LLM tool builders

This file is written for AI agents (Cursor, Claude Code, Codex, custom MCP tools) that integrate or extend agent-browser-runtime.

What this package is, in one sentence

A runtime that lets software act inside a user's authenticated browser session, unattended, on infrastructure the operator controls, with explicit verification and re-auth signalling.

When to reach for it

When not to

Integration recipe

  1. Implement a WebPostStrategy for the target site: declare a narrow policy.session, permitted execution modes, validate(content), isAuthenticated(ctx), and post(ctx, content). Verify inside post (read back the UI or find the permalink); return uncertain: true if you submitted but could not confirm.
  2. Run the service: startRunner({ strategies }) or agent-browser-runtime serve --strategies ./strategies.js with AGENT_RUNNER_TOKEN.
  3. Capture once: captureStart with workspaceId + accountId → embed the short-lived liveViewUrl → user signs in → captureFinish with the same binding → encrypt and store state.
  4. Act unattended: post / probe with the decrypted session; persist refreshedSession; honour needsReauth and uncertain.

Public API surface (stable)

Wire protocol routes and request/response shapes live in src/protocol.ts; treat them as the contract when generating client code in other languages.

Extending

Testing conventions