Skip to main content
Choose the next surface based on how the agentic workflow should run: directly from the CLI, inside software with the SDK, from a coding-agent host, or through an HTTP or protocol integration.

Default recommendation

Use the CLI when a workflow should run directly. Use SDK web.agent() when the workflow needs to integrate with software. Use REST, CDP, or exact browser-code execution when the integration boundary requires them.

CLI and SDK workflow surfaces

Use web agent when you want an agentic workflow from the terminal.
When the same workflow belongs in software, move the goal into SDK web.agent().
Use web.agent() when the model should handle browser work inside an application, backend process, or recurring automation. Use SDK resources around it for boundaries, resources, validation, and persistence.

Add SDK runtime controls

Integrated workflows usually look like this:
The SDK makes lifecycle, policy, files, downloads, status, recordings, validation, retries, and recovery explicit around the agent run. When application code creates the browser, put policy on web.browser.create(...), not on the agent config.

Use MCP for coding agents

Use MCP when Codex, Claude Code, Cursor, OpenCode, Devin, OpenClaw, Hermes, or another MCP host should operate a browser.
Agent mode exposes one browser-subagent tool: Use runtime mode when the host should plan each exact browser-code step:
Runtime mode exposes manage_browsers and execute_playwright_code. It remains the technical default for web mcp run.

Use REST, CDP, quick actions, or exact control

Use REST when TypeScript is not the application boundary. The OpenAPI reference covers browser lifecycle, exact browser-code execution, resources, recordings, events, dialogs, permissions, and quick actions. Use CDP when an existing framework must attach directly to the browser. Direct CDP clients do not automatically receive Webcompute post-step observations; use Webcompute browser calls when agent-readable observations matter. Use quick actions when you need one scrape, screenshot, or PDF and do not need a persistent browser session. Use advanced exact browser control when a specific browser step must be deterministic: validating a known page, clicking a known export button, recovering from a known state, or integrating an external browser framework. Keep it bounded and return to agent.run(...) or SDK resource APIs afterward.
Debug UI and CDP URLs are signed bearer capabilities. Treat them like credentials.

Move between paths

Read results and evidence when the output shape is the deciding factor.

Next steps

Run the CLI quickstart

Install Webcompute, configure model access, run a public browser task, and inspect the result.

Build with the SDK

Build agentic workflows into applications, backend services, and recurring automations.

Mix agent and code

Combine agent-driven browser work with explicit SDK resources and product logic.

Connect MCP

Give a coding-agent host a managed browser runtime.

Use exact browser control

Run bounded browser-code steps when a workflow requires exact control.