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
Useweb agent when you want an agentic workflow from the terminal.
web.agent().
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: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.
Use runtime mode when the host should plan each exact browser-code step:
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 toagent.run(...) or SDK resource APIs afterward.
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.