Browserbase icon

Browserbase

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

Fetch → Run an Agent

AI-generated

Summary

Runs a Browserbase browser session and directs an AI agent to complete an instruction from a starting URL. The agent can use computer vision and coordinates (CUA), DOM selectors, or experimental hybrid interaction; the operation returns the agent result and session details.

Inputs

  • Starting URL (required) — Page to open first; if no scheme is supplied, the node prepends https://.
  • Instruction (required) — Task for the agent, such as navigating to a page and extracting information.
  • Model — Driver model for the browser session and, by default, agent reasoning. Defaults to Gemini 3 Flash.
  • Model Options — Choose CUA, DOM, or Hybrid mode; optionally select a mode-specific Agent Model, model source, maximum steps (default 40), cursor highlighting, and a custom system prompt. With a user-provided API key, the driver and agent models must use the same provider; CUA and Hybrid also validate model capability.
  • Variables — In DOM and Hybrid modes, pass named values for use as %name% placeholders in the instruction, with optional descriptions. The UI marks values as passwords; CUA mode does not pass these variables to the agent.
  • Browser Options — Configure ad blocking, session logging and recording, CAPTCHA solving, verified identity, and viewport dimensions.
  • Session Options — Configure context reuse and persistence, keep-alive, region, timeout, proxy routing, and user metadata. Defaults include the US West 2 region, a 300-second timeout, and proxies enabled.

Output shape

One n8n item per input item, each containing a JSON object with the agent result and session details.

The object includes success, message, actions, completed, usage, and sessionId; fields from the agent result have defaults when absent. contextId is included when provided. The node ends the session after execution and also attempts cleanup on errors. Errors are thrown unless Continue On Fail is enabled, in which case that input item returns an error field.

Examples

Example 1: Run an agent to inspect a website

Set the Starting URL and provide an Instruction describing the task. Choose an interaction mode and models if the defaults do not fit; optionally configure browser and session behavior.

Links

Discussion