Open-source Python library for AI browser agents, plus Browser Use Cloud: stealth browsers and a hosted agent API.
Python ai-agentsai-toolsbrowser-agentbrowser-automationbrowser-usecdpcloud-browsercomputer-useheadless-browserllmmcpplaywrightpythonremote-browserstealth-browserweb-automationweb-scraping
changes to docs
Gregor Žunič744d00282f41
diff --git a/README.md b/README.mdindex ac58b245f..4407ed19d 100644--- a/README.md+++ b/README.md@@ -97,26 +97,25 @@ Check out the [library docs](https://docs.browser-use.com) and the [cloud docs](<br/>-# 🔥 Production with Sandboxes+# 🔥 Deploy on 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.+We handle agents, browsers, persistence, auth, cookies, and LLMs. The agent runs right next to the browser for minimal latency.```pythonfrom browser_use import Browser, sandbox, ChatBrowserUsefrom browser_use.agent.service import Agent+import asyncio-@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())+@sandbox()+async def my_task(browser: Browser):+ agent = Agent(task="Find the top HN post", browser=browser, llm=ChatBrowserUse())await agent.run()-await production_task()+# Just call it like any async function+asyncio.run(my_task())```-See [Going to Production](https://docs.browser-use.com/production) to sync your cookies to the cloud.+See [Going to Production](https://docs.browser-use.com/production) for more details.<br/>diff --git a/docs/production.mdx b/docs/production.mdxindex 3ab035784..61f93de9f 100644--- a/docs/production.mdx+++ b/docs/production.mdx@@ -1,42 +1,66 @@---title: "Going to Production"-description: "Deploy with authentication"+description: "Deploy your local Browser-Use code to production with `@sandbox` wrapper, and scale to millions of agents"icon: "rocket-launch"----Deploy with saved authentication: test locally → sync cookies → use cloud profile.+## 1. Basic Deployment-## 1. Test Locally+Wrap your existing local code with `@sandbox()`:```python-browser = Browser(- executable_path='/Applications/Google Chrome.app/Contents/MacOS/Google Chrome',- user_data_dir='~/Library/Application Support/Google/Chrome',- profile_directory='Default',-)-agent = Agent(task="your task", browser=browser, llm=ChatBrowserUse())-await agent.run()+from browser_use import Browser, sandbox, ChatBrowserUse+from browser_use.agent.service import Agent+import asyncio++@sandbox()+async def my_task(browser: Browser):+ agent = Agent(task="Find the top HN post", browser=browser, llm=ChatBrowserUse())+ await agent.run()++# Just call it like any async function+asyncio.run(my_task())```-<Warning>Close Chrome completely before running.</Warning>-## 2. Sync to Cloud+That's it - your code now runs in production at scale. We handle agents, browsers, persistence, and LLMs.++## 2. Add Proxies for Stealth-Create profile at [cloud.browser-use.com/dashboard/settings?tab=profiles](https://cloud.browser-use.com/dashboard/settings?tab=profiles)+Use country-specific proxies to bypass captchas, Cloudflare, and geo-restrictions:++```python+@sandbox(cloud_proxy_country_code='us') # Route through US proxy+async def stealth_task(browser: Browser):+ agent = Agent(task="Your task", browser=browser, llm=ChatBrowserUse())+ await agent.run()+```++## 3. Sync Local Cookies to Cloud++To use your local authentication in production:++**First**, create an API key at [cloud.browser-use.com/new-api-key](https://cloud.browser-use.com/new-api-key) or follow the instruction on [Cloud - Profiles](https://cloud.browser-use.com/dashboard/settings?tab=profiles)++**Then**, sync your local cookies:```bashexport BROWSER_USE_API_KEY=your_key && curl -fsSL https://browser-use.com/profile.sh | sh```-Log into your accounts in the browser that opens. You'll get a `profile_id`.+This opens a browser where you log into your accounts. You'll get a `profile_id`.-## 3. Use in Production+**Finally**, use it in production:```python@sandbox(cloud_profile_id='your-profile-id')-async def task(browser: Browser):- agent = Agent(task="authenticated task", browser=browser, llm=ChatBrowserUse())+async def authenticated_task(browser: Browser):+ agent = Agent(task="Your authenticated task", browser=browser, llm=ChatBrowserUse())await agent.run()```-Done - your cloud browser is already logged in.+Your cloud browser is already logged in!++---++For more sandbox parameters and events, see [Sandbox Quickstart](/customize/sandbox/quickstart).diff --git a/docs/quickstart.mdx b/docs/quickstart.mdxindex 3e867e567..9d8e59a3b 100644--- a/docs/quickstart.mdx+++ b/docs/quickstart.mdx@@ -140,10 +140,6 @@ if __name__ == "__main__":Sandboxes are the **easiest way to run Browser-Use in production**. We handle agents, browsers, persistence, auth, cookies, and LLMs. It's also the **fastest way to deploy** - the agent runs right next to the browser, so latency is minimal.-<Warning>-Sandboxes are in **beta**.-</Warning>-To run in production with authentication, just add `@sandbox` to your function:```python