← Back to all agents
Browsing Open Source
Browser Use
Open-source library that lets any LLM drive a real browser.
Our take
The de-facto open standard for browser automation with LLMs.
What it is
Browser Use is an open-source Python library that lets any LLM (Claude, GPT-4, Gemini, local models) control a real Chromium browser via Playwright. It is the underlying engine behind many "AI agent" demos and is popular with developers who want to build their own web agents without paying for hosted services.
Best for
- Build custom web-scraping or web-automation agents
- Drive any browser-based workflow with an LLM
- Self-host a private Operator-style agent
Pros
- Open-source, BYOK — full control over model and data
- Plays well with the Python agent ecosystem (LangChain, etc.)
- Huge GitHub star count — battle-tested by the community
Cons
- Python-only; you write the orchestration code
- You manage browsers, sessions, and errors yourself
Quick start
- Python ≥ 3.11. `pip install browser-use` then `playwright install` (downloads Chromium).
- Set one LLM key in `.env` (e.g. `OPENAI_API_KEY=...`).
- Create an agent: `from browser_use import Agent; from langchain_openai import ChatOpenAI; agent = Agent(task="...", llm=ChatOpenAI(model="gpt-4o"))`; then `await agent.run()`.
- For persistent sessions, pass your own Playwright `BrowserContext` so cookies / localStorage survive between runs.
- Add a Gradio UI for visual debugging: `python examples/ui/gradio_demo.py`.
Sample input / output
Input
```python
from browser_use import Agent
from langchain_openai import ChatOpenAI
import asyncio
async def main():
agent = Agent(
task="Find all h2 headings and all anchor links on https://example.com/docs",
llm=ChatOpenAI(model="gpt-4o"),
)
print(await agent.run())
asyncio.run(main())
``` Output
Returns a dict like:
{"headings": ["Getting Started", "API Reference", "Pricing"],
"links": [{"text": "Docs", "href": "/docs"}, {"text": "Sign up", "href": "/signup"}]}
~30 sec runtime. Browser screenshots + DOM dumps cached in the run log for replay. Benchmarks
GitHub stars 55,000+ — github.com/browser-use/browser-use
Underlying engine Playwright + LangChain
Vision Optional screenshot capture for vision-capable LLMs
Modes Sync + async; can attach persistent browser context for logged-in flows
Pricing
Free library; cloud option available
Underlying models
Self-hosting
Yes — Browser Use can be self-hosted under the MIT license. This gives you full control over data and deployment.
Should you pick this?
Pick it if You want to build a custom web agent in Python with full control over the model, data, and orchestration — Browser Use is the canonical OSS layer for this.
Skip it if You want an out-of-the-box experience with no code — Operator is simpler. For reading/scraping pages rather than interacting with them, Firecrawl is the better fit.