Skip to main content
browser-use is a Python-based browser agent that provides programmable browser automation capabilities. It supports local Chrome, Lexmount cloud browsers, and AgentBay cloud browsers.

Installation

# Create and activate the project virtual environment
uv venv
source .venv/bin/activate

# Install browseruse-bench
uv pip install -e .
bubench run will create the agent venv defined in config.yaml (default .venvs/browser_use) and install the browser-use extra on first use. Activate .venv (or use uv run bubench ...) before running bubench commands.

Configuration

First copy the example configuration, then edit:
cp configs/agents/browser-use/config.yaml.example configs/agents/browser-use/config.yaml
Edit configs/agents/browser-use/config.yaml:
# browser-use Agent Configuration
# Copy this file to config.yaml and fill in your credentials.

# Model Type: OPENAI, GEMINI, BROWSER_USE
MODEL_TYPE: BROWSER_USE

# Model ID
MODEL_ID: BU-1.0

# Browser Use API Key
BROWSER_USE_API_KEY: your_api_key_here

# OpenAI Config (Optional)
# MODEL_TYPE: OPENAI
# MODEL_ID: gpt-4.1
# OPENAI_API_KEY: your_api_key_here
# OPENAI_BASE_URL: https://api.example.com/v1

# Gemini Config (Optional)
# MODEL_TYPE: GEMINI
# MODEL_ID: gemini-3-flash-preview
# GEMINI_API_KEY: your_api_key_here
# GEMINI_BASE_URL: https://api.example.com/v1
# GEMINI3_THINKING_LEVEL: high # Options: low, medium, high (Only for Gemini 3 series models)

# Browser Configuration
# Options: Chrome-Local, lexmount, browser-use-cloud, agentbay
BROWSER_ID: Chrome-Local

# Lexmount Browser Mode Config
LEXMOUNT_BROWSER_MODE: normal

# AgentBay Cloud Browser Config (only for agentbay)
# Set AGENTBAY_API_KEY in .env (do not put API key in config.yaml)
# AGENTBAY_IMAGE_ID: browser_latest
# AGENTBAY_ENABLE_BROWSER_REPLAY: true
# AGENTBAY_BROWSER_USE_STEALTH: false

# Agent Parameters
USE_VISION: false  # Enable/disable vision capabilities (default: false)
MAX_STEPS: 40      # Maximum number of steps per task (default: 40)

# Task Timeout (seconds)
TIMEOUT: 600

Supported Model Types

MODEL_TYPEDescriptionConfiguration Items
OPENAIOpenAI ModelsOPENAI_API_KEY, OPENAI_BASE_URL
GEMINIGemini ModelsGEMINI_API_KEY, GEMINI_BASE_URL
BROWSER_USEBrowser Use Official APIBROWSER_USE_API_KEY

Configuration Description

ParameterDescriptionOptions/Examples
MODEL_TYPEModel Provider TypeOPENAI, GEMINI, BROWSER_USE
MODEL_IDModel IDBU-1.0, gpt-4o, gemini-3-flash-preview
BROWSER_USE_API_KEYBrowser Use Official API KeyUsed mainly for BROWSER_USE mode
BROWSER_IDBrowser TypeChrome-Local, lexmount, browser-use-cloud, agentbay
USE_VISIONEnable Vision Capabilitiestrue, false (default)
MAX_STEPSMaximum Task StepsInteger (default 40)
TIMEOUTTask Timeout (seconds)Default 600, CLI --timeout overrides
GEMINI3_THINKING_LEVELGemini 3 Thinking Levellow, medium, high
LEXMOUNT_BROWSER_MODELexmount Browser Modenormal (default), uc
AGENTBAY_API_KEYAgentBay API KeySet in .env as AGENTBAY_API_KEY (env only)
AGENTBAY_IMAGE_IDAgentBay Session Image IDDefault browser_latest
AGENTBAY_ENABLE_BROWSER_REPLAYEnable AgentBay Browser Replaytrue (default), false
AGENTBAY_BROWSER_USE_STEALTHEnable AgentBay Stealth Browser Optionfalse (default), true

AgentBay Runtime Notes

  • AgentBay SDK is treated as an optional dependency. Missing packages or incompatible exports fail only when BROWSER_ID=agentbay; other browser modes continue to work.
  • Session cleanup failures in AgentBay backend are logged and do not mask task execution errors.

Browser Modes

Local Browser

Use local Chrome browser, suitable for development and debugging.
BROWSER_ID: "Chrome-Local"

Cloud Browser

Use Lexmount cloud browser, suitable for large-scale evaluation.
BROWSER_ID: "lexmount"
For detailed cloud browser configuration, please refer to Lexmount Cloud Browser.

Usage Examples

Basic Run

# Run top 3 tasks of LexBench-Browser
bubench run \
  --agent browser-use \
  --benchmark LexBench-Browser \
  --mode first_n \
  --count 3

# Run all tasks (skip completed)
bubench run \
  --agent browser-use \
  --benchmark LexBench-Browser \
  --mode all \
  --skip-completed

Run Specific Tasks

# Run tasks by ID
bubench run \
  --agent browser-use \
  --benchmark LexBench-Browser \
  --mode specific \
  --task-ids task_id_1 task_id_2

Evaluation

# Evaluate results
bubench eval --agent browser-use --benchmark LexBench-Browser

# Use stepwise strategy (step-by-step evaluation)
bubench eval --agent browser-use --benchmark LexBench-Browser --eval_strategy stepwise

# Use final strategy (result only)
bubench eval --agent browser-use --benchmark LexBench-Browser --eval_strategy final

Supported Benchmarks

  • ✅ LexBench-Browser
  • ✅ Online-Mind2Web
  • ✅ BrowseComp