browser-use/browser-use

Open-source Python library for AI browser agents, plus Browser Use Cloud: stealth browsers and a hosted agent API.

Browser Use – an open‑source AI browser agent

What it is – Browser Use is a Python (and TypeScript) library that lets a large‑language‑model‑based agent control a real web browser. It can run against a local Chrome instance or a managed “cloud browser” (a cheap, stealthy, proxy‑enabled browser you rent by the hour). The library ships with a CLI and a full‑featured Agent class that handles prompting, tool integration, and result extraction.

Key capabilities

  • 31 browser actions (click, type, scroll, read DOM, etc.) exposed as tools for any LLM that supports tool use (Claude, GPT, Gemini, etc.).
  • CAPTCHA mitigation & residential proxies via the optional Browser Use Cloud service.
  • Pluggable LLM back‑ends – use OpenAI, Anthropic, Google models directly, or the proprietary ChatBrowserUse (BU2) model optimized for browsing.
  • Custom tool support – register arbitrary Python functions (e.g., get UTC time) that the agent can call during a task.
  • Three usage paths:
    1. Fully hosted cloud API (you send a task, Browser Use runs the agent and browser for you).
    2. CLI that gives an existing agent browser access.
    3. Python library you embed in your own code.
  • Benchmark suite (Browser Use Benchmark v2) that evaluates model performance on hard web‑automation tasks.

Typical workflow (Python library)

# Install (requires Python ≥3.11 and uv, but pip works too)
uv add browser-use
# Put your OpenAI key (or Browser Use API key) in .env
echo "OPENAI_API_KEY=sk‑…" >> .env
import asyncio, os
from browser_use import Agent, Browser, ChatOpenAI, ChatBrowserUse
from dotenv import load_dotenv
load_dotenv()

async def main():
    llm = ChatOpenAI(model='gpt-4o-mini')          # or ChatBrowserUse('bu-2-0')
    agent = Agent(task='Find the number of stars of the browser-use repo', llm=llm)
    history = await agent.run()
    print(history.final_result())

asyncio.run(main())

The agent launches a browser, navigates to GitHub, extracts the star count, and prints it.

When to use it

  • Automating repetitive web tasks (form filling, booking appointments, data extraction).
  • Building AI assistants that need up‑to‑date web information.
  • Research on LLM‑driven web navigation or benchmarking browser‑automation models.
  • Prototyping RAG pipelines where the LLM fetches data by browsing instead of static indexes.

Getting started

  • Path 1 – Cloud API: Sign up at cloud.browser-use.com, claim $15 credit, and follow the quick‑start guide to call the hosted agent endpoint.
  • Path 2 – CLI: Install the browser-use CLI, run browser-use skill install, then paste the provided prompt into your favourite LLM‑code‑assistant (Claude Code, Codex, etc.).
  • Path 3 – Library: Follow the snippet above; you can also switch Browser(use_cloud=True) to run on a managed cloud browser.

Documentation & community

  • Docs: https://docs.browser-use.com (installation, custom tools, integration with Claude, benchmark results).
  • Blog & demos: https://browser-use.com/showcase.
  • Support: Discord, Twitter, and a public GitHub repo with examples, benchmarks, and related projects (Browser Harness, Video Use, macOS Harness).

License – MIT (the library itself is free; cloud browsers and model inference are billed separately).


Browser Use lets you tell an LLM to “open a page, click a button, read the result” and get a structured answer, turning the web into an interactive knowledge source.

Related

  • Project
  • Project
  • Project
  • Project
  • Project