Skip to main content
Browser-Use is an open-source solution optimized for fast, efficient browser automation. It enables AI to interact with websites naturally—clicking, typing, scrolling, and navigating just like a human would. Perfect for automating repetitive web tasks, extracting data from complex sites, or testing web applications at scale. Hyperbrowser hosts the browser-use framework so you can run agent tasks with a single API call. You can view your Browser-Use tasks in the dashboard.
Browser-Use agents run asynchronously by default. Start a task, then poll for results. Our SDKs include a startAndWait() helper that handles polling automatically and returns when the task completes.

How It Works

You can use Browser-Use in two ways:
  1. Start and Wait: SDKs provide a startAndWait() method that blocks until the task completes and returns the result
  2. Async Pattern: Start a task, get a job ID, then poll for status and results—useful for long-running tasks or when you want more control

Installation

Quick Start

The simplest way to run a Browser-Use task is with startAndWait(), which handles the entire lifecycle for you:

Async Pattern

When you need more control, use the async pattern to start a task and poll for results:

Stop a Running Task

Stop a task before it completes:

Parameters

string
required
Natural language description of what the agent should accomplish.
string
default:"0.1.40"
Version of browser-use to use. Options: 0.1.40, 0.7.10, latest
Be cautious when using the latest version. We periodically update the latest version to match the latest version of browser-use and this may introduce changes to how the agent works or other breaking changes.
string
default:"gemini-2.0-flash"
Language model to use. Options: gpt-4o, gpt-4o-mini, gpt-4.1, gpt-4.1-mini, claude-sonnet-5, claude-sonnet-4-6, claude-sonnet-4-5, claude-sonnet-4-20250514, gemini-2.0-flash, gemini-2.5-flash
number
default:"20"
Maximum number of steps the agent can take. Increase if tasks aren’t able to complete within the given number of steps.
string
ID of an existing browser session to reuse. Useful for multi-step workflows that need to maintain the same browser session.
boolean
default:"true"
Enable screenshot analysis for better context understanding.
boolean
default:"false"
Validate agent output against a schema.
boolean
default:"false"
Provide screenshots to the planning component.
number
default:"10"
Maximum actions per step before reassessing.
number
default:"128000"
Maximum tokens for LLM input.
string
default:"gemini-2.0-flash"
Separate language model for planning (can be different from main LLM).
string
default:"gemini-2.0-flash"
Separate language model for extracting structured data from pages.
number
default:"10"
How often (in steps) the planner reassesses strategy.
number
default:"3"
Maximum consecutive failures before aborting the task.
array
List of actions to execute before starting the main task.
object
Key-value pairs to mask the data sent to the LLM. The LLM only sees placeholders (x_user, x_pass), browser-use filters your sensitive data from the input text. Real values are injected directly into form fields after the LLM call.
object
Valid JSON schema for structured output.
boolean
default:"false"
Keep session alive after task completes.
object
Session configuration (proxy, stealth, captcha solving, etc.). Only applies when creating a new session. If you provide an existing sessionId, these options are ignored.
boolean
default:"false"
Use your own LLM API keys instead of Hyperbrowser’s. You will only be charged for browser usage.
object
API keys for openai, anthropic, and google. Required when useCustomApiKeys is true. Must provide keys based on the LLMs you are using.
The agent may not complete the task within the specified maxSteps. If that happens, try increasing the maxSteps parameter.Additionally, the browser session used by the AI Agent will time out based on your team’s default Session Timeout settings or the session’s timeoutMinutes parameter if provided. You can adjust the default Session Timeout in the Settings page.

Reuse Browser Sessions

You can pass in an existing sessionId to the Browser Use task so that it can execute the task on an existing session. Also, if you want to keep the session open after executing the task, you can supply the keepBrowserOpen parameter.
Always set keepBrowserOpen: true on tasks that you want to reuse the session from. Otherwise, the session will be automatically closed when the task completes.

Use Your Own API Keys

You can provide your own API Keys to the Browser Use task so that it doesn’t charge credits to your Hyperbrowser account for the steps it takes during execution. Only the credits for the usage of the browser itself will be charged. Depending on which model you select for the llm, plannerLlm, and pageExtractionLlm parameters, the API keys from those providers will need to be provided when useCustomApiKeys is set to true.
You can provide keys for multiple providers:

Session Configuration

Configure the browser environment with proxies, stealth mode, CAPTCHA solving, and more:
sessionOptions only apply when creating a new session. If you provide an existing sessionId, these options are ignored.
Proxies and CAPTCHA solving add latency. Only enable them when necessary for your use case.