π€οΈ Want to skip the setup? Use our cloud for faster, scalable, stealth-enabled browser automation!
- Direct your favorite coding agent (Cursor, Claude Code, etc) to Agents.md
- Prompt away!
1. Create environment and install Browser-Use with uv (Python>=3.11):
uv init && uv add browser-use && uv sync
# uvx browser-use install # Run if you don't have Chromium installed2. [Optional] Get your API key from Browser Use Cloud (new signups get $10 free credits):
# .env
BROWSER_USE_API_KEY=your-key
# GOOGLE_API_KEY=your-key
# ANTHROPIC_API_KEY=your-key
3. Run your first agent:
from browser_use import Agent, Browser, ChatBrowserUse
# from browser_use import ChatGoogle # ChatGoogle(model='gemini-3-flash-preview')
# from browser_use import ChatAnthropic # ChatAnthropic(model='claude-sonnet-4-6')
import asyncio
async def main():
browser = Browser(
# use_cloud=True, # Use a stealth browser on Browser Use Cloud
)
agent = Agent(
task="Find the number of stars of the browser-use repo",
llm=ChatBrowserUse(),
# llm=ChatGoogle(model='gemini-3-flash-preview'),
# llm=ChatAnthropic(model='claude-sonnet-4-6'),
browser=browser,
)
await agent.run()
if __name__ == "__main__":
asyncio.run(main())Check out the library docs and the cloud docs for more!
grocery-use-large.mp4
pc-use-large.mp4
π‘See more examples here β and give us a star!
Want to get started even faster? Generate a ready-to-run template:
uvx browser-use init --template defaultThis 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.pyFast, persistent browser automation from the command line:
browser-use open https://example.com # Navigate to URL
browser-use state # See clickable elements
browser-use click 5 # Click element by index
browser-use type "Hello" # Type text
browser-use screenshot page.png # Take screenshot
browser-use close # Close browserThe CLI keeps the browser running between commands for fast iteration. See CLI docs for all commands.
For Claude Code, install the skill to enable AI-assisted browser automation:
mkdir -p ~/.claude/skills/browser-use
curl -o ~/.claude/skills/browser-use/SKILL.md \
https://raw.githubusercontent.com/browser-use/browser-use/main/skills/browser-use/SKILL.mdIntegrations, hosting, custom tools, MCP, and more on our Docs β
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.20
- Cached input tokens: $0.02
- Output tokens: $2.00
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 import Tools
tools = Tools()
@tools.action(description='Description of what this tool does.')
def custom_tool(param: str) -> str:
return f"Result: {param}"
agent = Agent(
task="Your task",
llm=llm,
browser=browser,
tools=tools,
)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

