Skip to main content
browser-use is an MIT-licensed Python library. You give it a task, and the agent completes it in a real browser by writing Python: browser-harness helpers and raw Chrome DevTools Protocol (CDP) calls in a persistent REPL. It runs on Pydantic AI. Your code calls Agent(task).run(). Each step, the model writes one Python cell, the REPL runs it with browser-harness helpers and raw CDP against the browser, and the output goes back to the model. When the model calls finish, run() returns the result to your code. Your code calls Agent(task).run(). Each step, the model writes one Python cell, the REPL runs it with browser-harness helpers and raw CDP against the browser, and the output goes back to the model. When the model calls finish, run() returns the result to your code. Defaults:
  • Model: bu-4.0 (BU 4.0) on the Browser Use gateway.
  • Browser: a Browser Use Cloud browser, stopped when the run ends.
  • Key: one Browser Use key runs both. An interactive desktop run without a key opens login and continues after approval. Or create one at cloud.browser-use.com/new-api-key and set BROWSER_USE_API_KEY, or run browser-use login.
Every default can be swapped. Use Browser('chromium') for a local browser, and ChatOpenAI, ChatAnthropic, ChatGoogle or any Pydantic AI model string for your own model.

Quickstart

Install and run your first agent.

Agent

Every Agent option, run() and how to write tasks.

Browsers

Cloud, local Chromium, your Chrome, or any CDP endpoint.

Migrating from 0.x

What changed in 1.0 and what replaced each removed option.
Not sure which Browser Use you need? See Which product. Coding agents can drive a browser directly with the Browser Use CLI.