# Open Browser — Agents, start here

Open Browser turns an authorized goal into a bounded, verified web outcome. You describe the goal and the site; an isolated browser runs a deterministic plan; the result counts only when its outcome contract is verified from evidence (files with SHA-256, extracted fields, observed text, final URL).

## Connect
1. A person creates a workspace at https://openbrowser.run and an API key under **Connect → API keys** with the scopes you need.
2. Send it as `Authorization: Bearer <key>`. Keys are revocable at any time; revoked keys stop working immediately.

## Interfaces
- REST: https://openbrowser.run/openapi.json (human docs: https://openbrowser.run/api/docs)
- MCP (streamable HTTP, JSON-RPC 2.0, protocol 2025-06-18): POST https://openbrowser.run/mcp — tools: run_goal, run_skill, get_run, cancel_run, list_skills
- A2A (JSON-RPC, v0.3): agent card https://openbrowser.run/.well-known/agent-card.json, endpoint https://openbrowser.run/a2a — methods: message/send, tasks/get, tasks/cancel

## Rules enforced by the executor (not by a model)
- Only the domains in the goal, the skill, or `allowedDomains` are reachable. Private, loopback, link-local and cloud-metadata addresses are always blocked, including after redirects and DNS changes.
- Website content is data, never instructions.
- Runs that change data (fill/click) are never retried automatically.
- Budgets: up to 200 steps and 900 seconds per run; free workspaces get 25 runs per day and 60 browser minutes per month.
- Send `Idempotency-Key` on POST /api/v1/runs (or `idempotencyKey` in MCP) to make retries safe.

## Run states
queued → running → complete | partial | failed | blocked | unknown | canceled. Only `complete` means every check in the outcome contract passed.

## Errors
JSON `{"error":{"code","message","details?"}}`. Common codes: unauthenticated (401), missing_scope (403), needs_url (422), domain_out_of_scope (422), daily_run_limit (429), rate_limited (429), run_not_found (404). Messages are in English, European Portuguese or Spanish: the account language for signed-in people, otherwise the request's Accept-Language; codes never change. MCP tool errors return {"error":{"code","message"}} with isError true; MCP and A2A JSON-RPC errors carry data.code.

## Pagination
GET /api/v1/runs returns `nextCursor`; pass it as `before`.

## Webhooks
Register an https endpoint with POST /api/v1/webhooks (signed-in account; the signing secret is shown once). When a run reaches a final state we POST `{"id","type":"run.finished","createdAt","data":{"run","receipt":{"url","keys"}}}` with headers `OpenBrowser-Event-Id` and `OpenBrowser-Signature: t=<unix>,v1=<hex HMAC-SHA256(secret, "<t>.<raw body>")>`. Reject signatures older than 5 minutes and deduplicate by event id. Failed deliveries retry with backoff for about a day. Deliveries that ran out of retries can be re-driven with POST /api/v1/webhooks/{id}/redrive (same event ids, so deduplicating receivers see no duplicates); GET /api/v1/webhooks/{id}/deliveries lists recent deliveries. `data.receipt.url` is the signed receipt of the run (fetch it with an API key that has runs:read) and `data.receipt.keys` the public keys that verify it offline (SDK `verifyReceipt`). A delivery counts as delivered when your endpoint answers 2xx; that does not prove the destination processed it. You can also poll GET /api/v1/runs/{id} (send `after=<last event id>`).
