browser-use0.9.5
Published
Make websites accessible for AI agents
pip install browser-use
Package Downloads
Authors
Project URLs
Requires Python
<4.0,>=3.11
Dependencies
- aiohttp
==3.12.15 - anthropic
<1.0.0,>=0.68.1 - anyio
>=4.9.0 - authlib
>=1.6.0 - bubus
>=1.5.6 - cdp-use
>=1.4.0 - click
>=8.1.8 - cloudpickle
>=3.1.1 - google-api-core
>=2.25.0 - google-api-python-client
>=2.174.0 - google-auth-oauthlib
>=1.2.2 - google-auth
>=2.40.3 - google-genai
<2.0.0,>=1.29.0 - groq
>=0.30.0 - httpx
>=0.28.1 - inquirerpy
>=0.3.4 - markdownify
>=1.2.0 - mcp
>=1.10.1 - ollama
>=0.5.1 - openai
<2.0.0,>=1.99.2 - pillow
>=11.2.1 - portalocker
<3.0.0,>=2.7.0 - posthog
>=3.7.0 - psutil
>=7.0.0 - pydantic
>=2.11.5 - pyobjc
>=11.0; platform_system == "darwin" - pyotp
>=2.9.0 - pypdf
>=5.7.0 - python-dotenv
>=1.0.1 - reportlab
>=4.0.0 - requests
>=2.32.3 - rich
>=14.0.0 - screeninfo
>=0.8.1; platform_system != "darwin" - typing-extensions
>=4.12.2 - uuid7
>=0.1.0 - agentmail
==0.0.59; extra == "all" - boto3
>=1.38.45; extra == "all" - botocore
>=1.37.23; extra == "all" - imgcat
>=0.6.0; extra == "all" - langchain-openai
>=0.3.26; extra == "all" - oci
>=2.126.4; extra == "all" - textual
>=3.2.0; extra == "all" - boto3
>=1.38.45; extra == "aws" - textual
>=3.2.0; extra == "cli" - oci
>=2.126.4; extra == "cli-oci" - textual
>=3.2.0; extra == "cli-oci" - matplotlib
>=3.9.0; extra == "code" - numpy
>=2.3.2; extra == "code" - pandas
>=2.2.0; extra == "code" - tabulate
>=0.9.0; extra == "code" - anyio
>=4.9.0; extra == "eval" - datamodel-code-generator
>=0.26.0; extra == "eval" - lmnr
[all]==0.7.17; extra == "eval" - psutil
>=7.0.0; extra == "eval" - agentmail
==0.0.59; extra == "examples" - botocore
>=1.37.23; extra == "examples" - imgcat
>=0.6.0; extra == "examples" - langchain-openai
>=0.3.26; extra == "examples" - oci
>=2.126.4; extra == "oci" - imageio
[ffmpeg]>=2.37.0; extra == "video" - numpy
>=2.3.2; extra == "video"
🤖 LLM Quickstart
- Direct your favorite coding agent (Cursor, ClaudeS, etc) to Agents.md
- Prompt away!
👋 Human Quickstart
1. Create environment with uv (Python>=3.11):
uv init
2. Install Browser-Use package:
# We ship every day - use the latest version!
uv add browser-use
uv sync
3. Get your API key from Browser Use Cloud and add it to your .env file (new signups get $10 free credits):
# .env
BROWSER_USE_API_KEY=your-key
4. Install Chromium browser:
uvx browser-use install
5. Run your first agent:
from browser_use import Agent, Browser, ChatBrowserUse
import asyncio
async def example():
browser = Browser(
# use_cloud=True, # Uncomment to use a stealth browser on Browser Use Cloud
)
llm = ChatBrowserUse()
agent = Agent(
task="Find the number of stars of the browser-use repo",
llm=llm,
browser=browser,
)
history = await agent.run()
return history
if __name__ == "__main__":
history = asyncio.run(example())
Check out the library docs and the cloud docs for more!
🔥 Production with Sandboxes
The easiest way to run Browser-Use in production. We handle agents, browsers, persistence, auth, cookies, and LLMs. The agent runs right next to the browser for minimal latency.
from browser_use import Browser, sandbox, ChatBrowserUse
from browser_use.agent.service import Agent
@sandbox(
cloud_profile_id='your-profile-id', # Your saved cookies/auth
cloud_proxy_country_code='us', # Bypass captchas, cloudflare, geo-restrictions
)
async def production_task(browser: Browser):
agent = Agent(task="Your task", browser=browser, llm=ChatBrowserUse())
await agent.run()
await production_task()
See Going to Production to sync your cookies to the cloud.
🚀 Template Quickstart
Want to get started even faster? Generate a ready-to-run template:
uvx browser-use init --template default
This creates a browser_use_default.py file with a working example. Available templates:
default- Minimal setup to get started quicklyadvanced- All configuration options with detailed commentstools- Examples of custom tools and extending the agent
You can also specify a custom output path:
uvx browser-use init --template default --output my_agent.py
Demos
📋 Form-Filling
Task = "Fill in this job application with my resume and information."
🍎 Grocery-Shopping
Task = "Put this list of items into my instacart."
https://github.com/user-attachments/assets/a6813fa7-4a7c-40a6-b4aa-382bf88b1850
💻 Personal-Assistant.
Task = "Help me find parts for a custom PC."
https://github.com/user-attachments/assets/ac34f75c-057a-43ef-ad06-5b2c9d42bf06
💡See more examples here ↗ and give us a star!
Integrations, hosting, custom tools, MCP, and more on our Docs ↗
FAQ
What's the best model to use?
We optimized ChatBrowserUse() specifically for browser automation tasks. On avg it completes tasks 3-5x faster than other models with SOTA accuracy.
Pricing (per 1M tokens):
- Input tokens: $0.50
- Output tokens: $3.00
- Cached tokens: $0.10
For other LLM providers, see our supported models documentation.
Can I use custom tools with the agent?
Yes! You can add custom tools to extend the agent's capabilities:
from browser_use.tools import Tool
@Tool()
def custom_tool(param: str) -> str:
"""Description of what this tool does."""
return f"Result: {param}"
agent = Agent(
task="Your task",
llm=llm,
browser=browser,
use_custom_tools=[custom_tool],
)
Can I use this for free?
Yes! Browser-Use is open source and free to use. You only need to choose an LLM provider (like OpenAI, Google, ChatBrowserUse, or run local models with Ollama).
How do I handle authentication?
Check out our authentication examples:
- Using real browser profiles - Reuse your existing Chrome profile with saved logins
- If you want to use temporary accounts with inbox, choose AgentMail
- To sync your auth profile with the remote browser, run
curl -fsSL https://browser-use.com/profile.sh | BROWSER_USE_API_KEY=XXXX sh(replace XXXX with your API key)
These examples show how to maintain sessions and handle authentication seamlessly.
How do I solve CAPTCHAs?
For CAPTCHA handling, you need better browser fingerprinting and proxies. Use Browser Use Cloud which provides stealth browsers designed to avoid detection and CAPTCHA challenges.
How do I go into production?
Chrome can consume a lot of memory, and running many agents in parallel can be tricky to manage.
For production use cases, use our Browser Use Cloud API which handles:
- Scalable browser infrastructure
- Memory management
- Proxy rotation
- Stealth browser fingerprinting
- High-performance parallel execution