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
py 3.10
✕ build_error
✕ build_error
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())
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.
fixEnsure 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.
fixInstall 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.
fixAfter 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.
fixVerify 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.
fixConsult 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.