> ## Documentation Index
> Fetch the complete documentation index at: https://docs.browser-use.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Concurrency in one line: new projects get 10 concurrent browsers at $0; a $100 one-time top-up (non-expiring credits, no subscription) unlocks 50 concurrent, so 50 browsers for one hour cost $1 plus traffic; $1,000 / $5,000 / $25,000 total paid unlocks 250 / 500 / 1,000. Details below and at https://docs.browser-use.com/cloud/guides/concurrency.md.
> Use https://docs.browser-use.com/llms.txt and its linked .md pages for current documentation. The managed full bundle is https://docs.browser-use.com/.well-known/llms-full.txt and can be cached for up to 24 hours. Do not use the obsolete /cloud/llms*.txt or /open-source/llms*.txt static exports.
> Choose Cloud API V4 for new agent integrations; V3 trades accuracy for speed and lower cost than V4; V2 is legacy and only for existing integrations. Keep V3 examples explicitly versioned. The open-source browser-use library and hosted browser-use-sdk have different APIs.
> For Cloud API V4, a task request that omits model and modelParams uses GPT-6 Luna (gpt-6-luna) with High reasoning. Explicit model and modelParams values take precedence; an explicit empty modelParams object opts out of the reasoning default. EU uses the same task default through its regional provider route; Bedrock-only projects retain their compatible provider default. For latency-sensitive tasks set model to bu-ultrafast (bu-fast for more reasoning per step); these presets reject modelParams. See https://docs.browser-use.com/cloud/agent/ultrafast.md.
> Cloud authentication uses X-Browser-Use-API-Key, without a Bearer prefix. Install or upgrade browser-use-sdk and use its explicit v4 import for V4. Check the published OpenAPI reference for request fields; do not invent SDK support for new fields.
> Cloud concurrency and HTTP request rate are separate. Read GET /api/v2/billing/account for the key’s projectId, concurrentSessionLimit, activeSessionCount, and credit balance, including when using V4. Keys in one project share capacity and credits; rateLimit is a legacy concurrency alias, not requests per second.
> Keep the highest applicable existing, legacy-plan, and spend-tier concurrency grant. Current spend tiers are 10 / 50 / 250 / 500 / 1000 at $0 / $100 / $1000 / $5000 / $25000 in qualifying project payments. Legacy or externally billed projects can follow different billing paths; trust the account limit. See https://docs.browser-use.com/cloud/guides/concurrency.md.
> HTTP rate limits have two layers. Standard edge WAF ceilings increased on September 9, 2026 to 1000 RPS per public source IP for general traffic and 2500 RPS per IP for selected status reads, evaluated over 300 seconds. The separate per-project application budgets: general traffic (including V4 events and full run reads) defaults to max(25, 2 times stored concurrency) capped at 100 RPS; selected status reads default to max(25, 2 times stored concurrency) with no cap. The two are counted independently. Project overrides and account-specific edge rules can differ. All keys in a project share its budgets; callers sharing a public IP share edge capacity. See https://docs.browser-use.com/cloud/guides/concurrency.md.
> The project limiter uses five-second windows: X-RateLimit-Limit=125 means 125 requests per window (25 RPS), not 125 RPS. Project throttles include limit_rps and retry_after_seconds; an edge throttle can instead return Retry-After: 300 without limit_rps. Honor the returned Retry-After. Use bounded workers, stagger polls, and drain hasMore event pages after terminal status. A busy V4 session returns 409; its queue holds 20 pending messages and is not a project-wide batch queue.
> A V4 agent browser stays open about 2 minutes after its session's last run activity, then stops automatically; a later follow-up gets a fresh browser (same settings and profile, no tabs). Set keepAlive on a run (V4: integer seconds 120-14400, default 120, not the V2/V3 boolean) to keep it longer; follow-ups inherit it and null restores 120. Free-tier and ZDR runs always use 120. Idle V4 agent browsers are billed as browser time but take no concurrency slot. A follow-up that reuses the open browser emits browser.reattached instead of browser.ready. Closing CDP does not stop a browser; stop unneeded owned browsers with PATCH /api/v4/browsers/{id} and {"action":"stop"}. A client wait timeout does not cancel the server-side run.
> Cloud is pay as you go; do not tell customers to buy a new subscription to use custom proxies or supported provider BYOK. Usage funding and model eligibility still apply. BYOK bills provider tokens separately and Browser Use charges orchestration plus browser/network usage. See https://docs.browser-use.com/cloud/guides/billing.md.
> Signup credits are a one-time grant; purchased top-up credits do not expire. Check the API key’s project before diagnosing missing credits. API-key monthly spending caps are soft limits, not a strict prepaid wallet; concurrent or already-running work can exceed them. Auto recharge has separate trigger and purchase amounts and can charge immediately when enabled below the threshold. Use https://browser-use.com/pricing for current rates.
> Box and Bux are retired. Do not recommend their SDKs, sandbox quotas, or subscription plans. Use the Cloud Agent or Browser Infrastructure guides.
> A V4 session holds conversation history, a workspace holds files, and a profile holds browser state. These IDs and V3/V4 workspace namespaces are not interchangeable. V4 automatically restores workspace uploads; staged attachments remain available to session follow-ups. Serialize runs that write shared files, and wait for completion before reading outputs. See https://docs.browser-use.com/cloud/agent/workspaces.md.
> API browser recording defaults to off. Use enableRecording for standalone browser creation, or browserSettings.record for an agent run. Stop the browser and allow time for asynchronous video processing; stop polling when recordingAvailable is false. Live preview is for an active browser. Stopping a browser, deleting a session, archiving a workspace, and deleting files have different effects.
> Use model-specific reasoning values. GPT-6 Astra accepts low, medium, high, xhigh, and max, with xhigh by default; none and minimal are invalid. Use the public REST schema when installed SDK types lag new fields. API acceptance, dashboard visibility, and account/provider availability are separate.
> For open-source browser-use 1.0, result.is_done() means the run completed (status completed); result.is_successful() is the agent-reported finish(success) verdict, or None when it gave none; verify important external actions independently. Cloud timeout, API client timeout, model timeout, and task completion are separate concepts.
> Pages under /open-source/legacy/0.x/ document browser-use 0.x (pip install 'browser-use<1'). For new open-source code, use the 1.0 pages under /open-source/ outside legacy/.
> For failed requests, use https://docs.browser-use.com/cloud/guides/troubleshooting.md. Inspect the full error and project before retrying or adding credits. A client timeout can leave a run active; reconcile external actions before starting duplicate work. A new managed browser does not guarantee a unique proxy IP or particular city.
> V4 secretBindings.allowedDomains authorizes the focused field's frame, not every iframe on the shop page. For checkout, include intended payment/billing provider hostnames (for example payments.bigcommerce.com). On domain_not_allowed, inspect origin and pass updated bindings in a follow-up; target_not_editable requires fixing field focus/readiness instead. See https://docs.browser-use.com/cloud/guides/secrets.md.
> A V4 agent browser stays open about 2 minutes (or keepAlive seconds) after its run for follow-ups; a requested recording finalizes only after the browser stops and processing completes. Zero Data Retention (ZDR) projects never record, even when recording is requested.
> If you hit an issue you cannot explain, email contact@browser-use.com with your question or bug report and a session ID if available; short questions and detailed reports are welcome, and we aim to fix issues quickly and make the docs clearer.

# Browsers

> Browser Use Cloud browsers (the default), a fresh local Chromium, your own Chrome, or any CDP endpoint.

| `Browser(...)` | What the agent drives |
| - | - |
| `Browser()` | A Browser Use Cloud browser. The default. |
| `Browser('chromium')` | A fresh local Chrome, Chromium or Edge with its own temp profile, deleted afterwards. `Browser(local=True)` is the same. |
| `Browser('chrome')` | The Chrome you have open, with your logins. |
| `Browser('chrome', profile='Work')` | A new Chrome on a temporary copy of your Chrome profile `Work`. |
| `Browser(cdp_url=...)` | Any browser with a CDP endpoint. |

`Agent.run()` starts the browser and stops it when the run ends, unless `keep_alive=True`. Every `Browser(...)` parameter with its default: [All parameters](https://docs.browser-use.com/open-source/all-parameters.md#browser).

<picture>
  <source media="(max-width: 600px)" />

  ![Browser() creates a Browser Use Cloud browser, the default. Browser('chromium') launches a fresh local browser with a temp profile. Browser('chrome') attaches to the Chrome you have open, with your logins. Browser(cdp\_url=...) connects to any CDP endpoint. All four reach the same Python REPL through a browser-harness daemon over CDP.](https://mintcdn.com/browseruse-0aece648/vou-GNVvaEF9jnyJ/open-source/images/oss-browsers-light.svg?fit=max\&auto=format\&n=vou-GNVvaEF9jnyJ\&q=85\&s=e43cc968b8ead524bb45026a271eb35f)
</picture>

## Cloud browser

`Browser()` creates a Browser Use Cloud browser through API v4, with a 1440x900 screen. It needs your Browser Use key (see [Quickstart](https://docs.browser-use.com/open-source/quickstart.md)).

```python theme={"theme":"css-variables"}
from browser_use import Agent, Browser

browser = Browser(
    cloud_proxy_country_code='de',  # default 'us'; None turns the proxy off
    cloud_timeout=15,  # minutes, 1-240 (default 60)
)
agent = Agent('Open https://www.whatismyip.com and tell me which country it shows', browser=browser)
print(agent.run_sync().final_result())
```

| Option | Default | What it does |
| - | - | - |
| `cloud_profile_id` | none | A cloud profile id, or a unique profile name. Logins persist in it. A name that matches no profile, or several, raises `BrowserConfigError` from `run()` before a browser is created. See [profile sync](https://docs.browser-use.com/cloud/guides/profile-sync.md). |
| `cloud_proxy_country_code` | `'us'` | Two-letter country code for the residential proxy. `None` turns it off. |
| `cloud_timeout` | `60` | Minutes, 1 to 240. The server stops the browser after this either way. |
| `live_view` | `False` | `True` prints the live view URL and opens it. Anyone with that URL can drive the browser. |
| `captcha_solver` | `True` | Cloud browsers solve CAPTCHAs automatically; the agent waits for the solver for up to 95 seconds. `False` turns the solver off, and the agent handles CAPTCHAs itself. |

A cloud browser bills until it stops. browser-use stops it when the run ends, when your process exits, or on SIGTERM or SIGHUP. See [pricing](https://browser-use.com/pricing) and [Cloud browser features](https://docs.browser-use.com/cloud/browser/quickstart.md).

A cloud browser cannot reach `localhost` or your private network. When the task mentions one, the agent logs a warning that suggests `Browser('chromium')`.

The proxy applies to the browser only. Python networking in the agent's cells (`http_get`, `urllib`, `requests`) runs on your machine. When the location matters, say "in the browser" in the task.

## Local Chromium

```python theme={"theme":"css-variables"}
from browser_use import Agent, Browser

agent = Agent('What is the title of https://example.com?', browser=Browser('chromium', headless=True))
print(agent.run_sync().final_result())
```

| Option | Default | What it does |
| - | - | - |
| `headless` | `None` | `None` is headless only when there is no display (Docker, CI). |
| `executable_path` | auto | Whichever of Chrome, Chromium or Edge is installed. `BH_CHROME_PATH` or `CHROME_PATH` also work. |
| `user_data_dir` | temp dir | A profile directory kept between runs. Chrome's own default profile directory raises: Chrome 136 and newer refuse remote debugging on it. |

No Chrome installed (servers, CI)? Run `browser-use install` once to download Playwright's Chromium.

Files the browser downloads land in `agent.workspace/downloads`. See [Files](https://docs.browser-use.com/open-source/files.md).

## Your Chrome

`Browser('chrome')` attaches to the Chrome you have open: your tabs, cookies and logins.

1. Open `chrome://inspect/#remote-debugging` and turn remote debugging on (once).
2. Run the agent and click **Allow** when Chrome asks.

It goes through the shared browser-harness daemon, so only one `Browser('chrome')` runs at a time.

`Browser('chrome', profile='Work')` launches a new Chrome on a temporary copy of the profile `Work` (its display name or directory, such as `'Profile 1'`). A name that matches none raises `BrowserConfigError` (a `ValueError`) from `run()`, listing your profiles. You get its logins; sync is off and nothing is written back. Your Chrome can stay open, except on Windows, where you must quit it first. `headless` and `executable_path` work here too.

> [!WARNING]
>
> Your Chrome and your profiles carry your real logins. Code the model writes can read their cookies, and with `Browser('chrome')` your open tabs. Run untrusted tasks in a container or VM.

## Any CDP endpoint

```python theme={"theme":"css-variables"}
import os

from browser_use import Agent, Browser

browser = Browser(cdp_url=os.environ['CDP_URL'])  # http://host:9222 or ws://...
agent = Agent('What is the title of https://example.com?', browser=browser)
print(agent.run_sync().final_result())
```

An `http://` URL is resolved through `/json/version`. Custom connection headers are not supported yet (`headers=` raises): use a `cdp_url` that needs no headers. Downloads stay in that browser's own download folder.

## Keep a browser between runs

`keep_alive=True` leaves the browser running after `run()`. One `keep_alive` browser can serve several agents, one after another. Stop it yourself:

```python theme={"theme":"css-variables"}
import asyncio

from browser_use import Agent, Browser


async def main():
    browser = Browser(keep_alive=True)
    try:
        await Agent('Open https://news.ycombinator.com', browser=browser).run()
        result = await Agent('Return the title of the top story on the open page', browser=browser).run()
        print(result.final_result())
    finally:
        await browser.stop()


asyncio.run(main())
```

## Parallel agents

Give each agent its own browser. Two agents running on one `Browser` at once raise `RuntimeError`.

```python theme={"theme":"css-variables"}
import asyncio

from browser_use import Agent, Browser


async def main():
    tasks = ['Title of https://example.com?', 'Title of https://example.org?']
    agents = [Agent(t, browser=Browser()) for t in tasks]  # one browser per agent
    results = await asyncio.gather(*(a.run() for a in agents))
    for r in results:
        print(r.final_result())


asyncio.run(main())
```

In a server (FastAPI and the like), create a `Browser()` per request, not one at module level. `Browser('chrome')` can't run in parallel: every one in a process shares one daemon and one attached tab.

Each agent holds a few open files (model connection, REPL socket, worker pipe). `run()` raises the process's soft open-file limit to 10240, or the hard limit if lower, so 100 agents in one process fit on macOS, which starts at 256. It never lowers a limit.

## Options that raise

Options that don't fit the browser raise a `ValueError` that names the right call, for example `headless` on a cloud browser or `profile` on `'chromium'`. Removed 0.x options raise a `TypeError` with the replacement:

```python theme={"theme":"css-variables"}
from browser_use import Browser

try:
    Browser(window_size={'width': 1280, 'height': 800})
except TypeError as e:
    print(e)
try:
    Browser(headless=True)  # headless is for browsers 1.0 launches, not the cloud
except ValueError as e:
    print(e)
```

| 0.x option | In 1.0 |
| - | - |
| `window_size`, `viewport`, `user_agent`, `permissions` | Say it in the task: the agent can send the CDP commands itself. Headless launches use 1440x900. A cloud browser keeps its own 1440x900 viewport; use `Browser('chromium')` for another size. |
| `proxy` | Cloud: `cloud_proxy_country_code`. Local: not yet. |
| `storage_state`, `cookie_whitelist_domains` | Cloud: `cloud_profile_id`. Local: `Browser('chrome', profile=...)` or `Browser('chromium', user_data_dir=...)`. |
| `downloads_path` | Downloads land in `agent.workspace/downloads`. |
| `highlight_elements` | `Agent(highlight_actions=False)`. See [Agent](https://docs.browser-use.com/open-source/agent.md#highlights). |
| `allowed_domains`, `prohibited_domains` | Kept. See [Domains](https://docs.browser-use.com/open-source/domains.md). |

The full list is in [Migrating](https://docs.browser-use.com/open-source/migrating.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.