Skip to main content
Use web agent when you want to create and run an agentic workflow from the terminal. The command gives the agent a managed browser, applies your model profile and boundaries, and returns an inspectable result. The CLI agent is a one-shot workflow: it creates a managed browser for the run and closes browsers it created when the command finishes. Use SDK web.agent() when the workflow needs to live inside an application, backend process, recurring automation, or custom browser creation path such as proxy.

Configure model access

Save a reusable profile:
Or pass model access for one command:

Write a bounded task

A good CLI agent task names the site, starts from a URL, constrains the domain, and asks for a concrete result.
The model chooses browser steps. Webcompute runs those steps in a managed browser and returns observations/status after browser tool calls so the agent can decide what to do next.

Choose an approval mode

Return data to another program

Use --json for machine-readable run output.
Use --schema when the final answer must match a JSON schema.
Reference: structured output.

Pass secrets safely

--secret name=ENV_VAR reads the value from your environment and exposes it as a sensitive variable. When --allow-domain is present, the CLI scopes the secret to those domains. When no domain is present, the CLI scopes the secret to the start URL hostname when it can. Do not paste secret values into the goal text.

Inspect while the run is active

Use --debug-url only when you intentionally want the signed live-browser URL in output.
The Debug UI URL is useful while the CLI run is active. For persistent recordings, stored artifacts, or post-run browser inspection, use SDK web.agent() with browser.create.recording: true or direct browser control.
Debug UI URLs are bearer capabilities. Do not log or share them with untrusted users.

Common failure modes

Reference: SDK quickstart, policies and approvals, secrets and user input, and production blockers.