← Blog

BLOG

Browser Use Usage: How to Run AI Agents on Hosted Chromium

Browser use usage explained: run browser-use agents on hosted Chromium with CDP, persistent profiles, and live debugging. Compare local vs remote setups.

August 3, 20268 min readRemote Browser

# Browser Use Usage: How to Run AI Agents on Hosted Chromium

Browser use usage has exploded since the open-source browser-use library crossed 78,000 GitHub stars. The pattern is simple: an LLM decides what to click, type, or read, and a browser automation layer executes those actions. But the execution layer is where most teams hit a wall. Running browser-use locally works for demos. Running it in production—with persistent sessions, proxies, and live debugging—requires a different runtime.

This guide covers browser use usage in a production context: what the library does, why hosted Chromium beats local setup, and how to connect a browser-use agent to a remote browser session via CDP.

What Browser-Use Actually Does

The browser-use library is a Python framework that bridges LLMs and browser automation. It takes a natural language task, converts it into a sequence of browser actions, and executes them through Playwright or CDP. The library handles DOM extraction, element selection, and action planning.

The core loop looks like this:

  1. Task input: "Log into the dashboard and export the CSV."
  2. State extraction: The library serializes the current page into a text representation the LLM can understand.
  3. Action prediction: The LLM outputs a structured action (e.g., click_element, type_text, navigate_to).
  4. Execution: The action runs against the browser.
  5. Observation: The new page state feeds back into the loop.

This works well in a local Chrome instance. But browser use usage in production introduces constraints: uptime, concurrency, IP reputation, and session persistence.

The Local Setup Problem

When you run browser-use locally, you are responsible for the entire browser lifecycle. That means:

  • Chrome installation: You need a compatible Chromium binary on the machine.
  • Dependency management: Playwright downloads, system libraries, and version pinning.
  • Session state: Cookies and local storage vanish when the process dies.
  • IP reputation: Your home or office IP gets flagged by anti-bot systems after repeated automated access.
  • Resource contention: Each browser instance consumes 300–500 MB of RAM. Running ten agents means managing ten browser processes.

For a demo, this is fine. For a scheduled job that runs every hour, it becomes a maintenance burden.

Hosted Chromium as the Runtime

Remote Browser provides hosted Chromium sessions exposed via CDP (Chrome DevTools Protocol). Instead of launching a local browser, your browser-use agent connects to a remote session over WebSocket. The browser runs in a data center, with its own IP, its own profile, and its own lifecycle.

This shifts browser use usage from "manage a browser" to "call an API." The session is already running. You attach to it, execute actions, and detach. The browser stays alive between runs, preserving cookies and login states.

Key Differences: Local vs. Hosted

AspectLocal Browser-UseRemote Browser (Hosted)
Browser lifecycleYou launch and kill ChromeSession persists; attach/detach on demand
Session stateLost on process exitPersistent profiles retain cookies, storage
IP addressYour machine's IPData center IP per session
ScalingOne browser per processMultiple sessions via API
DebuggingLocal DevTools onlyLive viewer + CDP access
DependenciesPlaywright, Chrome, system libsNone; just a WebSocket URL
ConcurrencyLimited by local RAM/CPUManaged by the runtime

The tradeoff is network latency. Every action round-trips to the remote browser. In practice, this is negligible for LLM-driven automation because the model's reasoning time dominates the action execution time.

Connecting Browser-Use to a Remote Session

The browser-use library supports connecting to an existing browser via CDP. You pass a CDP endpoint URL instead of launching a new browser instance.

Here is a TypeScript example using Playwright directly against a Remote Browser session. The same pattern applies to browser-use's Python API via the cdp_url parameter.

import { chromium } from 'playwright';

// Connect to a Remote Browser session via CDP
const browser = await chromium.connectOverCDP(
  'wss://remote-browser.dev/session/your-session-id'
);

// The default context contains the persistent profile
const context = browser.contexts()[0];
const page = await context.newPage();

// Navigate and interact
await page.goto('https://example.com');
await page.fill('#email', 'agent@example.com');
await page.click('button[type="submit"]');

// Wait for navigation and extract data
await page.waitForSelector('.dashboard');
const data = await page.textContent('.dashboard');

console.log(data);

// Detach — the session stays alive for the next run
await browser.close();

In Python with browser-use, the equivalent is:

from browser_use import Agent
from browser_use.browser.browser import Browser, BrowserConfig

browser = Browser(
    config=BrowserConfig(
        cdp_url="wss://remote-browser.dev/session/your-session-id"
    )
)

agent = Agent(
    task="Navigate to the admin panel and export user data",
    browser=browser,
)

await agent.run()

The key point: your agent code does not change. You swap the browser launch configuration for a CDP URL, and the rest of the logic stays intact.

Persistent Profiles and Session State

One of the biggest advantages of hosted Chromium is persistent profiles. When you connect to a Remote Browser session, the profile—cookies, localStorage, IndexedDB, and site data—persists across connections.

This matters for browser use usage in real workflows:

  • Logged-in sessions: Log into a service once. Subsequent runs reuse the session without re-authentication.
  • Multi-step tasks: If an agent crashes mid-task, the next run resumes with the same state.
  • Consistent environment: Extensions, browser settings, and geolocation remain stable.

Local browser-use instances lose all of this when the process exits. You either re-authenticate every run or implement your own storage layer for cookies.

Live Debugging and Observability

Debugging an LLM-driven browser agent is painful. The model makes a decision, the browser acts, and you have no idea why it clicked the wrong button. Remote Browser includes a live viewer that streams the browser session in real time.

This gives you:

  • Visual verification: Watch the agent navigate, click, and type.
  • DOM inspection: Open DevTools against the live session to inspect elements.
  • Session replay: Review past actions to diagnose failures.

For browser use usage in CI/CD or scheduled jobs, this observability is critical. You cannot SSH into a local machine to see what happened at 3 AM. With a hosted session, you open the live viewer and see the exact state.

Proxy and IP Management

Anti-bot systems are the silent killer of browser automation. Data center IPs are heavily flagged. If your agent hits a Cloudflare-protected site, it will get challenged or blocked.

Remote Browser provides configurable browser settings for proxy and stealth-related use cases. You can route sessions through residential or mobile proxies to reduce detection. The session's IP address is stable, so you can build a reputation over time rather than rotating through fresh IPs on every request.

This is a significant advantage over local setups, where your IP is fixed and likely already flagged if you run frequent automation.

Cost and Scaling Considerations

Browser use usage at scale comes down to economics. Running a local browser costs you RAM, CPU, and electricity. Running a hosted browser costs money per hour.

The tradeoff is operational simplicity. With Remote Browser, you pay for active session time. Idle sessions can be paused or terminated. There is no infrastructure to maintain, no browser updates to apply, and no dependency conflicts to resolve.

For current pricing details, check the pricing page. The model is straightforward: you pay for the browser runtime, not for the AI tokens or the API calls.

When to Use Remote Browser vs. Local

Not every workload needs a hosted browser. Here is a practical breakdown:

WorkloadRecommended Setup
Prototyping (single script, short run)Local browser-use
Scheduled jobs (daily/hourly tasks)Remote Browser
Multi-agent systems (parallel tasks)Remote Browser
Sites with strict anti-botRemote Browser + proxy settings
Data scraping at scaleRemote Browser
CI/CD integrationRemote Browser
Offline developmentLocal browser-use

The decision hinges on persistence and reliability. If your task can tolerate a browser crash and a fresh start, local is fine. If you need state, uptime, and consistent IPs, hosted wins.

Security and Isolation

Remote Browser sessions are isolated from each other. Each session runs in its own browser instance with its own profile. This prevents cross-contamination between agents—one agent's cookies do not leak into another's session.

For teams running multiple agents, this isolation is essential. You do not want an agent that visits a malicious site to compromise the session state of another agent.

The runtime also supports usage controls, so you can set limits on session duration and activity. This prevents runaway agents from burning through resources.

Migration Path from Local to Hosted

Moving from local browser-use to Remote Browser is a small code change:

  1. Replace the browser launch with a CDP connection.
  2. Test with a single session to verify behavior.
  3. Migrate session state by logging in once in the hosted browser.
  4. Update your deployment to use the remote session URL.

The browser-use library's API is designed for this. The cdp_url parameter is a first-class option, not a hack. This means your existing agent logic—task prompts, action definitions, and error handling—remains unchanged.

The Bottom Line

Browser use usage is moving from local experimentation to production infrastructure. The open-source library solved the "how do I get an LLM to control a browser" problem. Remote Browser solves the "how do I run this reliably at scale" problem.

Hosted Chromium gives you persistent profiles, stable IPs, live debugging, and session isolation—without managing a single browser process. The CDP connection is standard, so your existing browser-use code works with minimal changes.

If you are running browser-use agents in production, or planning to, evaluate a hosted runtime. Start with a single session, connect via CDP, and see how much operational overhead disappears.

For more context on the runtime layer, read about remote browsers for AI agents or the remote web browser runtime. If you are comparing options, the browser-use benchmarks post covers how Remote Browser stacks up.

For technical details on the CDP connection, the Chrome DevTools Protocol documentation is the authoritative reference.