Skip to main content

Browser Use Agents

Give an agent a task and get the result.

Browser Infrastructure

Launch a cloud browser and connect to it from your code.
Both Cloud paths use API V4. Choose whether Browser Use drives the browser or your Playwright or Browser Use code connects directly over CDP. For a local agent, use the open-source library. Your code sends a task to POST /api/v4/runs and the V4 agent drives a cloud browser and returns the result, or your code creates a browser with POST /api/v4/browsers and connects Playwright or Browser Use to its cdpUrl. Your code sends a task to POST /api/v4/runs and the V4 agent drives a cloud browser and returns the result, or your code creates a browser with POST /api/v4/browsers and connects Playwright or Browser Use to its cdpUrl. Get an API key and export it:

Install the SDK

Use Python 3.10 or newer for the Python SDK. Skip installation if you use curl.

Run Browser Use Agents

Use Browser Infrastructure

These examples connect to the managed browser’s existing context and stop it in finally, including when connecting or navigating fails.
Disconnecting CDP does not stop the managed browser. Use client.browsers.stop(session.id) as above, or call PATCH /api/v4/browsers/{id} with {"action":"stop"}.
For curl and additional connection options, follow the Browser Infrastructure quickstart.

Copy for an LLM

Give your coding agent the compact API V4 context.