How to let AI handle web bookings and data collection by operating the browser directly
Imagine an AI navigating a complex web task like booking a driving test, finding elements, clicking, and entering data to complete the job. This open-source library helps AI operate a browser like a human. You can run it locally or use a cloud browser to address security and captcha issues while scaling automation tasks.
Three usage paths
Users can choose one of three methods based on their needs. The first is a fully hosted cloud API that provides both the agent and browser infrastructure to ensure scalability. The second is a CLI that grants browser access to existing agents like Claude Code or Codex. The third is a Python library that allows you to run the open-source agent directly in your code and add custom tools. Both the CLI and the Python library can connect to either a local or a cloud browser.
Installation and execution
Using the Python library requires Python 3.11 or higher. Install it with the uv add browser-use command, then enter your OpenAI API key in the .env file. Write your agent code in the agent.py file and run it with uv run agent.py; the agent will then open a browser and perform the specified task. To use a cloud browser, set BROWSER_USE_API_KEY and enable the Browser(use_cloud=True) option. In this case, it works identically in Docker or CI environments without installing Chrome.
Cloud browser features and costs
The cloud browser offers stealth mode, residential proxies, and captcha solving for $0.02 per hour. It is designed to reduce bot detection and mitigate captcha issues. You can also monitor progress in real time via a live view URL. Unlike local browsers, the cloud browser supports profile synchronization; cookies are transferred, but local storage and extensions are not. Consequently, you may need to log in again on some sites.
Model selection and integration
You can use the BU2 model, which is optimized for browser automation, or call models from other providers through a gateway using ChatBrowserUse. It is also possible to connect models from OpenAI, Anthropic, Google, and others directly via wrappers. When integrated with Claude, Browser Use implements 31 browser actions to drive Claude's browser toolset. This integration requires Bash on a Linux or macOS host, while Windows users must use WSL.
License and cost structure
The open-source Python library is free under the MIT license. However, model inference and hosted browsers are billed separately. API providers and Browser Use Cloud charge based on usage. You can also use local models and a local browser via Ollama, provided you meet the hardware specifications and model requirements. Captcha solving success rates vary by site and challenge type, and there is no guarantee that all captchas can be avoided or solved. Before use, you should compare options that fit your task type, latency, and budget.