browser-use /
browser-use
Python library and CLI that lets an LLM drive a web browser to finish tasks
- 118.9k stars
- 1.9k stars since 3 Oct
- Python
- Updated today
- Some experience
- Browser & computer use
Many tasks only exist behind a website: filling forms, searching, signing in, booking. Browser Use gives a language model the ability to open a browser, look at pages, click and type, and keep going until the task is done. You describe the task in plain text and the agent works out the steps.
You can use it three ways. The Python library runs the open-source agent in your own code, with your choice of model. The CLI adds browser access to an existing agent such as Claude Code or Codex. The hosted cloud runs the agent and the browser for you. The library and CLI can use a local browser or a cloud one.
The README also describes BU2, a Browser Use model tuned for browser work, and an Anthropic SDK integration that exposes Browser Use as Claude's browser tools. The library is MIT-licensed and free, but model calls and cloud browsers cost money unless you run a local model through Ollama.
What it does
Task-in-plain-English agent
Create an Agent with a task and a model, call run(), and read the result. A default system prompt is included, and you can extend or replace it.
Choice of models
Works with OpenAI, Anthropic and Google wrappers, the Browser Use BU2 model or gateway, and local models through Ollama.
Local or cloud browsers
Run a local browser, reuse your Chrome profile for logins, or switch to a cloud browser with stealth, proxies and CAPTCHA handling.
Custom tools
Register your own Python functions with Tools so the agent can call them alongside the browser actions.
CLI skill for other agents
A browser-use skill install command registers browser access with agents such as Claude Code or Codex.
What you could build
- Automate a multi-step web task, such as finding an available slot and booking it.
- Look up facts on live websites and return the answer to your Python program.
- Give Claude Code or Codex the ability to browse and interact with pages.
- Write custom tools so an agent can mix browser actions with your own functions.
- Run browser tasks against a logged-in Chrome profile or a hosted cloud browser.
Get started
Install the package with uv (Python 3.11 or newer), put your model API key such as OPENAI_API_KEY in a .env file, and save the README's short agent.py example. Run it and the agent opens a browser, completes the task and prints the answer.
uv add browser-useuv run agent.pyCommands are copied from the project's README. Read it on GitHub for the full setup.
Anything better than browser-use?
browser-use is the strongest pick for letting an LLM autonomously drive a real browser from Python. Look elsewhere if you want your own coding agent to issue browser commands (agent-browser, playwright-mcp) or need in-page control without Python (page-agent).
-
playwright-mcpAlternative You already use an MCP client like Claude, Cursor or VS Code and want it to drive the browser directly, with no separate agent loop. Trade-off: It exposes browser tools only; your client's model does the planning, so you get no standalone Python agent or task runner.
-
agent-browserAlternative You want a fast Rust CLI that a coding agent calls through shell commands, using accessibility snapshots and element references. Trade-off: It has no built-in planning loop or Python API; the calling agent must decide every step.
-
page-agentAlternative You want to embed a natural-language agent inside your own web app's pages, with no Python, extension or headless browser. Trade-off: It controls only the page it is embedded in, so it cannot browse across sites or open arbitrary browsers.
-
ScraplingUse alongside Pair them when a task needs bulk, repeatable data extraction: browser-use handles the interactive steps and Scrapling does large crawls and parsing. Trade-off: It is a scraper, not an agent, so you write the extraction logic yourself and maintain two tools.