Recommended shape
Create a job
Store the user request, target URLs, policy boundary, timeout, and output shape in your application.
Run browser work
Use
web.agent() for delegated browsing, browser.playwright.execute() for deterministic steps, or MCP runtime tools for coding-agent hosts.Capture evidence
Store the final result, browser ID, status, artifacts, downloads, recordings, events, and redacted errors that matter for review.
Handle retries
Retry transient infrastructure or timeout failures with a fresh browser when needed. Do not blindly retry policy denials, approval denials, or blocker states.
Delegated browser job
Deterministic browser job
saveJobResult represents your application’s persistence layer.
What your app should own
Webcompute runs browser sessions and returns evidence. Your application should own queueing, job IDs, user authorization, result persistence, retries, notifications, and any human review workflow.User-visible job states
Map browser evidence into a small set of product states your users and operators can understand.| State | Use when | User-facing language |
|---|---|---|
completed | The workflow returned valid output and required evidence. | ”Finished. Review the result and source links.” |
blocked | The site, policy, CAPTCHA, auth wall, or required user input prevented safe completion. | ”The browser reached a blocker and needs review.” |
needs_confirmation | The workflow reached a high-impact action, credential step, or ambiguous submission. | ”Review and approve the next action.” |
failed | The run hit an unrecoverable platform, validation, or workflow error. | ”The browser job failed. Review evidence and retry if appropriate.” |
cancelled | The user or system cancelled the job. | ”The job was cancelled.” |
timed_out | The job exceeded its budget. | ”The browser job timed out before completion.” |
blocked, needs_confirmation, policy denial, or CAPTCHA state into completed. Store the evidence and return the next safe action.
What to show after a blocker
When a browser job stops on a blocker, show:- The target site or final URL.
- The blocker category when available.
- The last safe status.
- Whether a recording, screenshot, artifact, or download is available for review.
- A retry or human-review option only when it is safe.