Browserbase icon

Browserbase

Browser automation, web search, and page fetches with Browserbase.

Agent → Run an Agent

AI-generated

Summary

Run an AI agent to automate tasks by navigating a starting URL using an LLM-driven model that performs reasoning and browser interactions according to a given instruction.

Inputs

  • Model — Specifies the AI model that drives browser navigation and reasoning, supporting multiple providers and model options.
  • Starting URL (required) — The initial webpage URL for the agent to load and operate within.
  • Instruction (required) — The task or goal for the agent to complete while interacting with the browser session.
  • Model Options — Additional settings including agent-specific model selection based on interaction mode (CUA, DOM, or Hybrid), maximum steps, cursor highlighting, system prompt, and model source routing.
  • Variables — User-defined sensitive data variables passed to the agent as placeholders to be used during execution without exposing their actual values.
  • Browser Options — Configurations for browser behavior such as ad blocking, session recording, captcha solving, viewport size, and verified identity usage.
  • Session Options — Settings for session persistence, reuse of context (cookies, auth), session lifetime, proxy usage, geographic region for execution, and metadata attachments.

Output shape

a single JSON object with keys indicating task success, messages, actions taken, completion status, usage details, session identifiers, and optionally context IDs, paired per input item.

The output contains detailed execution results including whether the task was completed successfully, a message summary, the sequence of actions performed by the agent, API usage data, and session-related identifiers. Errors during execution are thrown unless 'continue on fail' is enabled, in which case error messages are output per item.

Examples

Example 1: Extract pricing information from a website

Set Starting URL to https://example.com, Instruction to 'Find the pricing page and extract all plan names and prices', and optionally configure the Model and Model Options to choose the optimal AI models and interaction mode.

Links

Discussion