---
site: steel.dev
collection: docs
canonical_url: https://steel.dev/docs/integrations/browser-use
markdown_url: https://steel.dev/docs/integrations/browser-use.md
content_signal: ai-input=yes, ai-train=yes, search=yes
title: Run Browser Use on Steel
description: Run a Browser Use agent in a Steel cloud browser, watch it work live, replay the run, and add proxies and CAPTCHA solving.
summary: Run a Browser Use agent in a Steel cloud browser, watch it work live, replay the run, and add proxies and CAPTCHA solving.
type: integration-guide
reviewed: 2026-11-17
prerequisites: []
related:
  - https://steel.dev/docs/integrations/stagehand.md
  - https://steel.dev/docs/integrations/ai-sdk.md
  - https://steel.dev/docs/integrations/openai-agents-sdk.md
  - https://steel.dev/docs/integrations/claude-agent-sdk.md
  - https://steel.dev/docs/integrations/langgraph.md
agent_setup: https://setup.steel.dev/install.md
docs_index: https://steel.dev/docs/sitemap.md
---

# Run Browser Use on Steel

Browser Use is a Python agent framework. You give it a model, a browser and a task in plain language, and the model decides each step. With Steel, the browser is a Steel session. Browser Use connects to it over the Chrome DevTools Protocol (CDP) through `Browser(cdp_url=...)`. Your task, your model and the rest of your agent stay the same. Proxies, CAPTCHA solving and the live view come from the session, not from Browser Use.

In this guide, you run a first Browser Use agent on Steel and watch it work in the dashboard. After the run, you replay what it did. Then you add Steel features for real sites.

## Before you begin

- Python 3.11 or later.
- A Steel API key in the `STEEL_API_KEY` environment variable. See [API keys](https://steel.dev/docs/account/api-keys).
- A key for your model provider. The program on this page uses OpenAI, with the key in `OPENAI_API_KEY`.

Make a folder for the project, and install Browser Use and the Steel SDK in it. The program uses the Browser Use 1.0 API. Version 1.0 removed `BrowserSession`, which earlier versions used for the connection. The browser runs in Steel, so you do not need Chrome or Playwright's browsers on your machine.

```sh
mkdir steel-browser-use
cd steel-browser-use
python3 -m venv .venv
source .venv/bin/activate
pip install "browser-use>=1.0" steel-sdk
```

## 1. Write the agent

This program creates a session and prints its session viewer URL. It waits for you to press Enter, so that you can open the URL before the agent starts. Then it gives the session's CDP URL to a Browser Use agent, runs one task and releases the session in `finally`. [CDP](https://steel.dev/docs/control/cdp) explains the URL.

```python file=main.py
import asyncio
import os
import sys

from browser_use import Agent, Browser
from browser_use.llm import ChatOpenAI
from steel import Steel


async def main():
    client = Steel()
    session = client.sessions.create()
    print("Session viewer:", session.session_viewer_url)

    try:
        if sys.stdin.isatty():
            input("Open the session viewer, then press Enter.")
        agent = Agent(
            task="Open https://example.com and report the page title.",
            llm=ChatOpenAI(model="gpt-6.1-sol", api_key=os.environ["OPENAI_API_KEY"]),
            browser=Browser(
                cdp_url=session.websocket_url
            ),
        )
        result = await agent.run()
        print(result.final_result())
    finally:
        client.sessions.release(session.id)


asyncio.run(main())
```

## 2. Run it and watch it live

Run the program:

```sh
python main.py
```

First, the program prints a link to the [session viewer](https://steel.dev/docs/observability/live-view#open-the-live-view), the session's page in the Steel dashboard. Then it waits:

```text nocopy
Session viewer: https://app.steel.dev/sessions/ca56be8f-6d19-42dd-9047-d09bf3c9a981
Open the session viewer, then press Enter.
```

Open the URL in a browser where you are signed in to Steel. The viewer shows the session's browser, live. Press Enter in the terminal, and watch the agent open `example.com` in the viewer. Browser Use logs each step of the agent in the terminal. At the end, the program prints the agent's answer, which names the title **Example Domain**. The wording changes from run to run.

## 3. Replay the run

When the agent is done, the program releases the session. Open the session viewer URL again: it now plays the recording of what the agent did. Next to the video, the [agent traces](https://steel.dev/docs/observability/agent-traces) list each page that the agent loaded and each click and input, and selecting one moves the video to that moment. Use them to find the step where an agent went wrong.

## 4. Add Steel features for real sites

Pass session options to `client.sessions.create()`. Browser Use does not see them. For example, this session uses a [Steel proxy](https://steel.dev/docs/stealth/proxies) and [solves CAPTCHAs](https://steel.dev/docs/stealth/captcha-solving):

```python
session = client.sessions.create(use_proxy=True, solve_captcha=True)
```

An agent can run for many minutes. If a task takes longer than the session's timeout, set a longer one when you create the session. See [Set timeouts](https://steel.dev/docs/sessions/timeouts) and [Session configuration](https://steel.dev/docs/sessions/configuration).

The model's tokens and the session's browser time are billed separately. While the model plans a step, the session keeps running and keeps costing browser time. Limit a task's steps and retries, and release the session in `finally`.

## Next steps

- [Stay signed in across sessions](https://steel.dev/docs/logins/stay-signed-in): Keep the agent signed in to a site from one session to the next.
- [Credentials](https://steel.dev/docs/logins/credentials): Let Steel fill the sign-in form, so that the agent and the model never see the password.
- [Get past bot detection](https://steel.dev/docs/stealth/get-past-bot-detection): Find out what blocked the agent, and what to turn on.
- [Browser Use open-source documentation](https://docs.browser-use.com/open-source/introduction): The agent, its models and its settings.
- Cookbook starters: [Browser Use](https://github.com/steel-dev/steel-cookbook/tree/main/examples/browser-use), [solve CAPTCHAs automatically](https://github.com/steel-dev/steel-cookbook/tree/main/examples/browser-use-captcha-auto) and [solve CAPTCHAs by hand](https://github.com/steel-dev/steel-cookbook/tree/main/examples/browser-use-captcha-manual).
