Skip to main content
Agent.run() starts the browser and stops it when the run ends, unless keep_alive=True. Every Browser(...) parameter with its default: All parameters. 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. 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.

Cloud browser

Browser() creates a Browser Use Cloud browser through API v4, with a 1440x900 screen. It needs your Browser Use key (see Quickstart).
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 and Cloud browser features. 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

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.

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.
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

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:

Parallel agents

Give each agent its own browser. Two agents running on one Browser at once raise RuntimeError.
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:
The full list is in Migrating.