Browser Use: The 100K-Star Project That Teaches AI Agents to Click Around the Web
The GitHub repo browser-use/browser-use sits at 109k stars, making it one of the breakout open-source AI agent projects of 2024–2025. The problem it tackles is straightforward: letting an LLM click around the web the way a human would.
What problem it solves
LLMs can chat and write code, but ask one to click through a website and it falls apart. Tools like Selenium and Playwright are built for programmers writing scripts, not for agents driven by natural language. You're stuck telling the script "click the button with id='submit'" instead of "submit my expense report for me."
Browser Use bridges the two. It extracts web page structure into text an agent can understand, then translates the agent's decisions into browser actions. The LLM no longer receives raw HTML; it gets a structured "page summary plus list of interactive elements," and instead of emitting Python code, it outputs a JSON blob describing the next action to take.
How to use it
One-line install:
pip install browser-use
And three lines to run:
from browser_use import Agent
import asyncio
from langchain_openai import ChatOpenAI
async def main():
agent = Agent(
task="在 Hacker News 找关于 AI Agent 的最高赞文章,告诉我标题和链接",
llm=ChatOpenAI(model="gpt-4o"),
)
result = await agent.run()
print(result)
asyncio.run(main())
Under the hood it leans on Playwright for browser control. You need an LLM that supports tool calling; GPT-4o, Claude, DeepSeek, and Gemini all work. Just plug in any LangChain chat model per the docs.
How it works
The core loop has four steps:
- Observe — grab the page's DOM tree plus accessibility tree, serialize it into text.
- Decide — feed that text plus historical memory to the LLM, get back JSON describing the next action, something like
{"action": "click", "index": 12}. - Execute — Playwright receives the JSON, finds element #12 on the page, clicks it.
- Re-observe — page changed, re-capture the DOM, go back to step 1.
The key design choice: no screenshots for the LLM. Screenshots play nicely with vision models but eat tokens — a single page screenshot can run several thousand tokens. Browser Use instead uses DOM + accessibility tree, assigns every interactive element a number, and lets the LLM say "click 12."
Two supporting pieces round it out:
- Memory system: previous steps live in context, so the agent knows "I already searched, now I need to click the third result."
- Self-correction: when an action fails (element not found, page didn't load), it retries or replans with a different strategy.
The runtime is Chromium, runnable locally. If you'd rather not maintain your own browser fleet, there's a hosted option at cloud.browser-use.com — convenient but not free.
Where it shines
- Dead simple to get started. The code above is the complete example — copy, paste, run.
- Active community. 100k stars is real, not botted. Fast issue triage on GitHub, lively Discord.
- Stealable examples. The
examplesdirectory includes working use cases:apply_to_job(auto-apply to jobs), Amazon price scraping, Twitter data export. - Model-agnostic. Claude, GPT, DeepSeek, Gemini — swap freely, no vendor lock-in.
Where it falls short
- Hit rate wobbles on complex pages. Heavy JS, SPAs, nested iframes — DOM serialization drops signal and the agent loses the plot.
- Token burn is real. A medium task easily hits 10k+ tokens; complex flows start at 30k. Roughly an order of magnitude more expensive than a plain API call.
- Login flows and CAPTCHAs are a swamp. Authenticated scenarios need you to inject cookies yourself, or you skip the tool entirely. Every browser agent has this disease.
- Slow. Tens of seconds to several minutes per task is normal. Not built for real-time.
I tried it
I ran the Amazon price-scraping example from examples with GPT-4o. 8 out of 10 runs succeeded. Both failures had the same cause: a cookie consent banner popped up, the agent didn't realize it needed to dismiss the overlay first, and went straight for "Add to Cart" — which was hidden behind the modal.
This is the universal browser-agent failure mode. Cookie banners, regional pop-ups, ad-blocker warnings — humans treat these as background noise, but for an agent they're unexpected obstacles with no instruction manual.
Token measurements from real runs: simple tasks (search something, grab a title) run 8k–15k tokens; more involved flows (multi-page navigation, form filling) start at 30k. At GPT-4o's blended input/output pricing, that's anywhere from a few cents to a few dollars per task — economics that don't work at scale.
Bottom line: great for quick wins, terrible as a production scraper.
How it compares
- Selenium / Playwright: the underlying infrastructure, but no agent layer. You write code and tell it which selector to click.
- Skyvern: more vision-heavy — screenshots into a multimodal model. Even pricier on tokens, but more robust on weirdly structured pages.
- Stagehand: another contender in the same space, smaller community.
Browser Use's positioning is "friendly middle layer": not the write-your-own-code grind of Selenium, not the budget-busting all-vision approach.
Who should use it
Good fit:
- Rapidly validating "can an agent handle this web flow?" — ten minutes and a few lines of code give you an answer.
- Internal team tooling: auto-filling expense reports, scraping competitor pricing, demo automation.
- Researching agent behavior itself — reproducing ReAct or planning experiments for a paper.
Bad fit:
- Large-scale data collection — too expensive, too slow, and IPs get burned fast.
- Production scenarios demanding stable SLAs — success rates fluctuate too much to bet on.
- Anti-bot adversaries — browser fingerprints are obvious, Cloudflare catches them cold.
A project that earned 100k stars handles about 80% of "I just want AI to click this webpage for me." The remaining 20% either involves a genuinely terrible page or means you need a different tool.
Reference: browser-use/browser-use GitHub repo