{"slug": "browser-use-an-open-source-python-library-for-ai-browser-agents", "title": "Browser-use: An Open-Source Python Library for AI Browser Agents", "summary": "Browser-use is an open-source, MIT-licensed Python library that lets an LLM drive a real Chrome browser by writing Python code into a persistent REPL, executed over raw Chrome DevTools Protocol. The agent loops between model-written cells and browser output until a task completes, and the project offers three deployment paths: a hosted cloud with stealth browsers at $0.06 per browser-hour, a CLI skill install, and local use of the Python library on Python 3.11+ via Pydantic AI. The library has drawn 122k GitHub stars and ships with telemetry enabled by default, recording anonymous library_auth events without API keys or account identifiers.", "body_md": "Browser-use is an open-source Python library for AI browser agents. It gives a task to a model, and the model performs it in a real browser by writing Python code. The core mechanism is a persistent REPL, browser-harness helpers, and raw Chrome DevTools Protocol (CDP). The library runs on any LLM, either locally or through Browser Use Cloud. It is MIT licensed, written in Python, and has 122k stars on GitHub at the time of writing.\n\nThe official description: \"Open-source Python library for AI browser agents, plus Browser Use Cloud: stealth browsers and a hosted agent API.\"\n\nThe agent works by having the model write a cell (e.g., `new_tab(url); bu.click(41); js(...)`), the REPL runs it on Chrome via CDP, and output is sent back to the model. This loop continues until the task is finished.\n\nBrowser-use can navigate the web like a human: find an available slot, pick a date and time, handle CAPTCHAs, and book a driving test. Demos are available on the showcase page.\n\nThere are three paths to use it:\n\n**Path 1: Fully Hosted Cloud** Scale up with a hosted agent and stealth browsers. Infrastructure includes profiles, recordings, and data policies. Cloud browsers cost $0.06 per browser-hour and include stealth, CAPTCHA solving, and residential proxies. A hosted agent API is also available. New signups with Google, GitHub, or Microsoft get $1 cloud credit.\n\n**Path 2: CLI** Automate your own browser tasks. Install with `uv tool install browser-use==1.0.8`, then run `browser-use skill install` to register the skill.\n\n**Path 3: Python Library** Run the open-source agent locally from your own code. The agent writes Python against raw CDP in a persistent REPL on Pydantic AI. Requires Python 3.11 or newer.\n\nThe library uses a default model `bu-4.0` on the Browser Use gateway. One API key pays for both the model and the cloud browser. Cloud browsers print an interactive live-view link to stderr by default; you can open it automatically with `Browser(live_view=True)` or hide it with `False`.\n\nTelemetry is enabled by default. Anonymous `library_auth` events record missing keys, login outcomes, available keys, and browser starts. These events contain no API keys, login URLs, or account identifiers.\n\n**Path 1: Fully Hosted Cloud** Get an API key at cloud.browser-use.com and follow the API quickstart docs.\n\n**Path 2: CLI** Paste this prompt into Claude Code, Codex, Hermes, OpenClaw, or your favorite agent:\n\n```\nInstall browser-use with `uv tool install browser-use==1.0.8`, run `browser-use skill install` to register the skill, and connect it to my browser. If setup or connection fails, run `browser-use --doctor` and follow its output and the error message.\n```\n\n**Path 3: Python Library** Install with uv or pip in a venv:\n\n```\nuv init --python 3.12 my-agent && cd my-agent\nuv add 'browser-use==1.0.8'\nuv run browser-use login\n```\n\nOr with pip:\n\n```\npython3 -m venv .venv && source .venv/bin/activate\npip install 'browser-use==1.0.8'\nbrowser-use login\n```\n\nAlternatively, set the `BROWSER_USE_API_KEY` environment variable. In a notebook, use `browser_use.login()`.\n\n**Important:** Pin the exact version (`==`, never `>=`). Releases move fast and can break APIs. An exact pin keeps your code working and prevents a bad release from reaching you.\n\nAfter login, use the Agent class:\n\n``` python\nfrom browser_use import Agent\n\nresult = Agent('Find the number of stars of the browser-use repo').run_sync()\nprint(result.final_result())\n```\n\nWithout a key, an interactive desktop run opens Browser Use login and continues after approval. Over SSH or on Linux without a desktop, it prints a link and a device code to approve on any device.\n\nFor developers building AI agents that need to interact with real browsers. For those who want an open-source, flexible browser automation library that works with any LLM. For builders who need stealth browsers, CAPTCHA handling, and scalable cloud infrastructure. For anyone who wants to give a model a task and let it control a browser via Python code.\n\nBrowser-use is an MIT-licensed Python library with 122k stars on GitHub. It provides a simple but powerful mechanism: a model writes Python, a REPL executes it on Chrome via CDP. Whether you use the fully hosted cloud, the CLI, or the Python library, you get a battle-tested foundation for AI browser agents.", "url": "https://wpnews.pro/news/browser-use-an-open-source-python-library-for-ai-browser-agents", "canonical_source": "https://dev.to/hudapugar/browser-use-an-open-source-python-library-for-ai-browser-agents-25mp", "published_at": "2026-11-24 12:30:00+00:00", "updated_at": "2026-11-24 12:43:21.433435+00:00", "lang": "en", "topics": ["ai-agents", "ai-tools", "developer-tools", "large-language-models", "artificial-intelligence"], "entities": ["Browser Use", "Browser Use Cloud", "Chrome DevTools Protocol", "Pydantic AI", "GitHub", "Claude Code", "Codex"], "also_reported_by": [], "takeaway": "Browser-use 1.0.8 lets a model drive Chrome by writing Python cells against raw CDP in a persistent REPL, so pin the exact version with == because fast releases can break APIs.", "recommendation": null, "alternates": {"html": "https://wpnews.pro/news/browser-use-an-open-source-python-library-for-ai-browser-agents", "markdown": "https://wpnews.pro/news/browser-use-an-open-source-python-library-for-ai-browser-agents.md", "text": "https://wpnews.pro/news/browser-use-an-open-source-python-library-for-ai-browser-agents.txt", "jsonld": "https://wpnews.pro/news/browser-use-an-open-source-python-library-for-ai-browser-agents.jsonld"}}