Skip to main content
Wrap a browser-agent run with deterministic setup, validation, persistence, and review routing.

Product workflow shape

  • Deterministic setup around a browser-agent run.
  • web.agent() with policy, recording, approvals, and structured output.
  • Persistence and review routing based on the final agent status.

Setup

Install @webcompute/sdk, configure WEBCOMPUTE_API_KEY, and configure the model provider used by your agent profile. The example assumes a filingsSchema, db, and review queue already exist in your app.

Run it from the CLI first

Expected output

Build it into an app

Production notes

  • Deterministic setup creates the job and chooses policy.
  • web.agent() handles the browser task.
  • Structured output gives the app a validation boundary.
  • Deterministic persistence stores the result and review state.
  • Recording and steps keep evidence available.

Inspect

  • result.status for workflow routing.
  • result.output for validated data.
  • result.steps for browser evidence.
  • result.artifacts for files or downloads.

Cleanup

Keep job records, structured output, and source URLs according to your product retention policy. Browser cleanup is handled by the agent run unless you attach it to an existing managed browser.

Common failures

  • If result.status is not completed, persist the status and queue review instead of treating partial text as valid data.
  • If schema validation fails, inspect result.steps and the recording before loosening the schema.