Registry / llm-agents / browser-use

browser-use

JSON →
library0.13.8pypypi✓ verified 25d ago

Browser Use is a Python library designed to empower AI agents with the ability to navigate and interact with web browsers programmatically. It facilitates tasks such as clicking buttons, filling forms, and scraping data, effectively allowing AI to perform web-based actions autonomously. The library is actively maintained with frequent updates.

pip install browser-use
INSTALL
IMPORT
SIG · BROWSER-USE
B
browser-use
llm-agentspythonv0.13.8
Install
19.3s avg
Import
3275ms
Disk
299MB
Pass rate
6/ 10
Env Coverage6 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.13.8 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
glibc
py 3.10
✕ build_error
✕ build_error
py 3.11
✓ —
✓ 22.4s
py 3.12
✓ —
✓ 17.7s
py 3.13
✓ —
✓ 17.7s
py 3.9
✕ build_error
✕ build_error
299MB installed
● package 299MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Agent
from browser_use import Agent
The core class for defining and running AI browser automation tasks.
Browser
from browser_use import Browser
For configuring browser settings like headless mode or cloud usage.
ChatBrowserUse
from browser_use import ChatBrowserUse
One of the recommended LLM wrappers optimized for browser automation tasks.

This quickstart demonstrates how to initialize an `Agent` with a natural language task and an LLM, then run it to automate web browsing. It includes setting up environment variables for API keys and basic browser configuration.

import asyncio import os from dotenv import load_dotenv from browser_use import Agent, Browser, ChatBrowserUse load_dotenv() async def main(): # Set API keys as environment variables (e.g., in a .env file) # BROWSER_USE_API_KEY=your_browser_use_key # OPENAI_API_KEY=your_openai_key (or other LLM provider) # Optionally configure the browser (headless by default) browser = Browser( # use_cloud=False, # Set to True to use Browser Use Cloud # headless=False, # Set to False to see the browser window # window_size={'width': 1920, 'height': 1080} ) agent = Agent( task="Go to example.com and extract the main heading text", llm=ChatBrowserUse(api_key=os.environ.get('BROWSER_USE_API_KEY', '')), # Or ChatOpenAI, ChatGoogle, etc. browser=browser, ) result = await agent.run() print("Task completed.") print(f"Final result: {result.final_result()}") print(f"Visited URLs: {result.urls()}") if __name__ == "__main__": asyncio.run(main())
Debug
Known issues
breakingStarting with version `0.12.5`, `litellm` was removed as a core dependency due to a supply chain attack. If you rely on `ChatLiteLLM` or other `litellm` features, you must install `litellm` separately (`pip install litellm`).
fix
If `litellm` functionality is required, install it explicitly: `pip install litellm`. Ensure your `litellm` version is not `1.82.7` or `1.82.8`.
affects: >=0.12.5
breakingVersion `0.12.3` introduced Browser Use CLI 2.0, which switched from Playwright to direct Chrome DevTools Protocol (CDP). This change provides faster performance but might alter underlying browser interaction behavior or require adjustments if previous Playwright-specific assumptions were made. SDK 3.0 also brought breaking changes to the client.run() API.
fix
Review your automation logic, especially if it relied on Playwright internals. Consult the latest documentation for `0.12.3` and SDK 3.0 for API changes and new best practices.
affects: >=0.12.3
gotchaBrowser Use primarily leverages Chrome DevTools Protocol (CDP), meaning it only supports Chrome/Chromium-based browsers. Safari and Firefox are not supported.
fix
Ensure you are targeting Chrome or Chromium for your browser automation tasks.
affects: All versions
gotchaThe library requires Python 3.11 or higher. Using older Python versions will lead to installation or runtime errors.
fix
Upgrade your Python environment to version 3.11 or newer.
affects: <3.11
gotchaAPI keys (e.g., `BROWSER_USE_API_KEY`, `OPENAI_API_KEY`, `BROWSERLESS_TOKEN`) are essential for most functionalities. These should be set as environment variables, often loaded from a `.env` file using `python-dotenv` and `load_dotenv()`. Failure to set them correctly will result in authentication errors.
fix
Create a `.env` file in your project root with your API keys and call `load_dotenv()` at the start of your script. Alternatively, set them directly in your environment.
affects: All versions
Errors
Common errors & fixes
ERROR: Could not find a version that satisfies the requirement browser-use (from versions: none) ERROR: No matching distribution found for browser-use
This error typically occurs when the installed Python version does not meet the minimum requirements for 'browser-use', or there's an issue with pip's cache preventing it from finding available distributions.
fix
Ensure you are using Python 3.11 or higher, upgrade pip with `python -m pip install --upgrade pip`, and then try `pip install browser-use` again.
ModuleNotFoundError: No module named 'browser_use'
The 'browser-use' library is not installed in the current Python environment, or the virtual environment where it is installed is not active.
fix
Install the library using `pip install browser-use` or activate the correct virtual environment if it's already installed there.
ERROR [browser] Failed to initialize Playwright browser: BrowserType.launch: Executable doesn't exist
The underlying Playwright browser binaries (e.g., Chromium, Firefox, WebKit) that 'browser-use' depends on have not been installed or are not found in the expected location.
fix
After installing 'browser-use', run `playwright install --with-deps` in your terminal to download and set up the necessary browser executables.
Error executing action click_element: Element with index ... does not exist
The AI agent failed to locate or interact with an element at a specified index on the web page. This can happen if the page content changed dynamically, the element was not yet loaded, or the provided index was incorrect.
fix
Verify the web page's state and ensure the element is present and visible. Implement explicit waits for elements to appear or become interactable, and review the logic for identifying elements (e.g., their indices or selectors).
TypeError: BrowserConfig.__init__() got an unexpected keyword argument 'chrome_path'
The API for the `BrowserConfig` class in 'browser-use' has likely changed, and the `chrome_path` argument is no longer supported or has been replaced by a different configuration method.
fix
Consult the official 'browser-use' documentation for the version you are using to determine the correct way to configure browser paths or other browser-specific settings. You may need to remove or update how you specify the Chrome executable path.
Upgrade
Version history
0.13.8latest on PyPI · released Aug 16, 2026
Audit
Dependencies
python-dotenvoptionalRecommended for loading environment variables for API keys.
litellmoptionalWas a core dependency but removed due to a supply chain attack in v0.12.5; install separately if `ChatLiteLLM` wrapper is needed.
Agent activity
60 hits · last 30 days
node
58
OpenAI (training)
1
Resources