browser-use
by browser-use
Python library that lets AI agents operate a real web browser.
- Stars
- 122,128 stars
- Forks
- 14k forks
- Last push
- today
- Activity
- Active
# Create a project and install$ uv init --python 3.12 my-agent && cd my-agent
uv add 'browser-use==1.0.8'# Sign in once to save your key$ uv run browser-use loginCommands from the project's README. Run them after installing (see below).
Overview
Understand browser-use in 60 seconds
- What it does
- Browser Use is an open-source browser agent. You give it a task in plain English, and an AI model completes it in a real browser by writing Python that controls Chrome, such as finding information, filling forms or booking appointments.
- The problem it solves
- Automating websites with scripts breaks whenever pages change, and many tasks need judgement. Browser Use lets a model look at the page and decide what to do, so you can automate web tasks by describing them.
- Why choose it
- Choose it for a popular, Python-first browser agent that works with cloud browsers or your local Chrome, and with Browser Use's own model or your own LLM.
- Who should use it
- Developers automating web tasks with AI
- Coding agent users who want browser control
- Teams running browser automation at scale
- Researchers building web agents
- Setup difficulty
You'll need:
- Python 3.11+
- A Browser Use Cloud API key for the default setup, or your own model's API key
- Chrome or Chromium for local browsers
How browser-use works
In version 1.0, the agent is a model plus a persistent Python REPL plus the Chrome DevTools Protocol: the model writes code cells that run against the browser and sees the output. It's built on Pydantic AI.
There are three ways to use it: the fully hosted cloud agent, a CLI you can hand to coding agents like Claude Code or Codex, or the Python library. By default the library uses the bu-4.0 model and a Browser Use Cloud browser with one key; you can instead drive a fresh local Chromium, your open Chrome with your logins, or a copy of a Chrome profile, with models such as ChatOpenAI, ChatAnthropic or ChatGoogle.
The README stresses pinning an exact version, because the project moves fast. It supports typed structured output and file uploads. Note that anyone with a cloud browser's live-view link can control it.
Features
Key features
Natural-language tasks
Describe the task; the agent does it.
Real browser control
Python against Chrome DevTools Protocol.
Cloud or local browsers
Cloud browsers, fresh Chromium or your own Chrome.
Any model
Browser Use models, OpenAI, Anthropic, Google and more.
CLI for coding agents
Register a skill for Claude Code or Codex.
Structured output
Return typed results with a schema.
Strengths
- Very popular open-source browser agent
- Works with your logged-in Chrome
- Flexible model choice
- MIT licensed
Limitations
- Default setup needs a Browser Use Cloud key
- Fast-moving releases; pin exact versions
- Cloud live-view links grant control to anyone who has them
Practical use cases
Research tasks
Find and summarise information across sites.
Form filling
Complete repetitive web forms.
Booking
Find slots and book appointments.
Installation
Install browser-use
Commands come from Browser Use's README. AIRepoHub hasn't run them yet. Steps are as of Nov 25, 2026; projects change often, so if a command doesn't work, check the project's latest README. View source
Prerequisites
- Python 3.11+
- uv or pip
Supported systems
- Windows
- macOS
- Linux
- 1
Create a project and add Browser Use
Pin the exact version, as the README advises.
Shelluv init --python 3.12 my-agent && cd my-agentuv add 'browser-use==1.0.8' - 2
Sign in
Saves your Browser Use Cloud key. Over SSH use --device-code.
Shelluv run browser-use login
- 1
Install
Shellpython3 -m venv .venv && source .venv/bin/activatepip install 'browser-use==1.0.8'browser-use login
- 1
Give this to your agent
Paste the README's prompt into Claude Code, Codex or another agent; it installs the CLI and registers the skill.
Shelluv tool install browser-use==1.0.8browser-use skill install - 2
If setup fails
Shellbrowser-use --doctor
Configuration and API keys
| Setting | What it's for |
|---|---|
BROWSER_USE_API_KEYOptional | Your Browser Use Cloud key, instead of running browser-use login. |
BROWSER_USE_AUTO_LOGINOptional | Set to false to disable automatic login. |
OPENAI_API_KEYOptional | Needed when you use ChatOpenAI as the model. |
First run
- 1
Run your first task
Textfrom browser_use import Agentresult = Agent('Find the number of stars of the browser-use repo').run_sync()print(result.final_result())
browser-use's documentation doesn't include sample output, so we don't show any. Expect the results in your terminal.
Your first project
Run an agent on your own Chrome with your own model
Drive a local Chromium with an OpenAI model instead of the cloud defaults.
Before you start
- browser-use installed
- OPENAI_API_KEY set
- Chrome or Chromium installed
- 1
Write the script
Textfrom browser_use import Agent, Browser, ChatOpenAIagent = Agent( 'Find the number of stars of the browser-use repo', llm=ChatOpenAI('gpt-6-luna'), browser=Browser('chromium'),)print(agent.run_sync().final_result()) - 2
Run it
Save it as agent.py.
Shelluv run python agent.py
What to expect
A fresh Chromium with a temporary profile opens, the agent browses to the repository and prints the star count.
Next steps
- Use Browser('chrome') to work with your logged-in Chrome
- Return typed results with output_model_schema
- Try the hosted cloud agent to scale up
Costs and requirements
What it costs to run
- License
- MIT.Free
- Library
- Free and open source.Free
- Browser Use Cloud
- Paid model and browser usage; new Google, GitHub or Microsoft signups get $1 credit.Depends
- Your own model
- Billed by your model provider.Depends
Troubleshooting
Common setup issues
Missing API key error
Run browser-use login or set BROWSER_USE_API_KEY.
CLI setup or connection fails
Run browser-use --doctor and follow its output.
Code broke after an upgrade
Pin the exact version with ==, and read MIGRATING.md when coming from 0.x.
Logging in over SSH
Use browser-use login --device-code.
Alternatives
Similar AI repositories
hermes-agent
NousResearch
Personal AI agent from Nous Research that learns and improves the more you use it.
AutoGPT
Significant-Gravitas
Platform for building, deploying and running autonomous AI agents.
langflow
langflow-ai
Visual builder for creating and deploying AI agents and workflows by connecting blocks instead of writing code.
langchain
langchain-ai
Framework for building LLM-powered applications and agents.