← Blog

BLOG

browser-use Playwright: Where Remote Browsers Fit

browser-use Playwright workflows need a hosted runtime. See how Remote Browser provides CDP access, persistent profiles, and live debugging.

August 3, 20269 min readRemote Browser

# browser-use Playwright: Where Remote Browsers Fit

If you've built an AI agent with browser-use and Playwright, you know the pattern: write a Python script, launch a local Chromium instance, and let the agent click, type, and extract data. It works—until it doesn't. The local browser becomes a bottleneck when you need concurrency, persistence, or a clean environment for every run.

browser-use Playwright workflows are powerful, but they assume a browser runtime that's always available, isolated, and debuggable. That's where a remote browser fits. Remote Browser provides hosted Chromium sessions with full CDP access, Playwright compatibility, and the operational controls that production AI agents require.

This post covers the practical gap between browser-use scripts and production-grade browser automation. We'll look at what browser-use actually needs from a runtime, how Remote Browser satisfies those needs, and where you should draw the line between local development and hosted execution.

The browser-use Runtime Problem

Browser-use is an open-source library that lets LLMs control a browser through natural language instructions. It's popular—78,000+ GitHub stars—because it abstracts away the tedious parts of browser automation. You describe a task, and the agent figures out the DOM interactions.

But browser-use doesn't ship with a browser. It uses Playwright under the hood, which means you're responsible for launching and managing Chromium. That's fine for a demo. It's a liability for anything that runs unattended.

Here's what happens when you run browser-use locally:

  1. Your machine must stay on. Any long-running agent dies when your laptop sleeps.
  2. Sessions are ephemeral. Logins, cookies, and local storage vanish between runs.
  3. Concurrency is limited. One browser instance per process, and your CPU is the ceiling.
  4. Debugging is painful. You can't watch the agent work unless you're physically at the machine.
  5. Security is your problem. The browser runs with your local privileges and network access.

These aren't hypothetical issues. They're the reason browser-use has a hosted offering, and why teams building serious agents look for alternatives.

What browser-use Playwright Actually Needs

Let's be specific about the runtime requirements for a browser-use agent in production. These aren't nice-to-haves; they're the difference between a script and a service.

1. A Browser That's Always On

Your agent might need to run a task at 3 AM, or poll a website every hour, or wait for a page to update. A local browser can't do that reliably. A remote browser runs in a data center with power and network redundancy.

2. CDP Access for Deep Control

Browser-use and Playwright both speak the Chrome DevTools Protocol (CDP). This is the low-level interface that lets you inspect the DOM, capture network traffic, emulate devices, and take screenshots. If your runtime doesn't expose CDP, you're locked out of the most powerful debugging and control features.

3. Persistent Profiles

Real-world tasks require authentication. Your agent needs to log into a dashboard, maintain a session, and come back to it later. A persistent browser profile stores cookies, localStorage, and IndexedDB. Without it, every run starts from scratch.

4. Isolation Between Runs

You don't want one agent's actions to affect another's. If Agent A changes a setting and Agent B sees it, your automation is unreliable. Session isolation ensures each run gets a clean browser context.

5. Observability

When an agent fails, you need to know why. A live viewer, session recording, and console logs are essential for debugging. You can't SSH into a browser that ran on your laptop yesterday.

Remote Browser: The Hosted Runtime for browser-use

Remote Browser is a browser API designed for AI agents and automation workloads. It provides hosted Chromium sessions that work with browser-use, Playwright, Puppeteer, and Selenium. Here's how it maps to the requirements above.

RequirementLocal PlaywrightRemote Browser
AvailabilityDepends on your machine24/7 hosted Chromium
CDP accessYes, localhost onlyYes, via WebSocket
Persistent profilesManual, fragileBuilt-in, per-session
Session isolationManual context managementAutomatic, per-session
Live debuggingScreenshots onlyLive viewer + console logs
Proxy supportManual setupConfigurable per session
ConcurrencyLimited by CPU/RAMScale with API calls

The key difference is operational. Remote Browser treats browser sessions as infrastructure, not as a process you spawn on a whim.

How to Connect browser-use to Remote Browser

If you're using browser-use, you can point it at a Remote Browser session instead of a local Chromium instance. The library uses Playwright under the hood, so you need to configure Playwright to connect to a remote browser via CDP.

Here's a TypeScript example using Playwright directly with a Remote Browser CDP endpoint:

import { chromium } from 'playwright';

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

  const context = browser.contexts()[0] || await browser.newContext();
  const page = await context.newPage();

  // Your browser-use agent logic goes here
  await page.goto('https://example.com');
  const title = await page.title();
  console.log(`Page title: ${title}`);

  // Take a screenshot for debugging
  await page.screenshot({ path: 'debug.png' });

  // Close the connection (the remote session persists)
  await browser.close();
}

runAgentWithRemoteBrowser().catch(console.error);

The connectOverCDP method is the key. It tells Playwright to use a remote browser instead of launching a local one. All your existing Playwright code works unchanged—you're just changing the connection target.

For browser-use specifically, you'd configure the Playwright browser to connect to the Remote Browser CDP endpoint instead of using the default local launch. The browser-use library handles the agent logic; Remote Browser handles the runtime.

When to Use a Remote Browser

Not every browser-use script needs a remote runtime. Here's a practical decision framework.

Use Local Playwright When:

  • You're prototyping or writing tests that run in CI.
  • The task takes under a minute and doesn't require authentication.
  • You need to debug interactively with a visible browser window.
  • You're running a single agent on a machine you control.

Use Remote Browser When:

  • The agent runs unattended or on a schedule.
  • You need persistent login sessions across runs.
  • You're running multiple agents concurrently.
  • You need to scale beyond your local machine's resources.
  • You want a live view of what the agent is doing.
  • You need to comply with security policies that restrict local browser execution.

The line is about operational requirements, not code complexity. If your agent needs to be reliable, observable, and scalable, a remote browser is the right call.

browser-use Alternatives and the Production Gap

Browser-use is the most popular open-source browser automation library, but it's not the only option. Alternatives like Playwright MCP, Skyvern, and various agent frameworks exist. The common thread is that they all need a browser runtime.

The production gap isn't about the agent logic—it's about the browser. Whether you use browser-use, Playwright, or Puppeteer, you still need:

  • A browser that's always available
  • CDP access for debugging and control
  • Persistent profiles for authenticated tasks
  • Isolation between concurrent runs

This is why browser-use itself offers a hosted cloud service. But you don't have to use their infrastructure. Remote Browser provides the same runtime capabilities with a different API surface, and it works with any library that speaks CDP.

Practical Considerations for Production

Let's get into the details that matter when you move from a script to a service.

Session Management

Remote Browser sessions are created via API and persist until you delete them. This is different from local Playwright, where a browser closes when your process exits. You need to think about session lifecycle:

  • Create a session when you start a task.
  • Reuse a session for tasks that need the same profile.
  • Delete sessions when you're done to free resources.

The Browser Session API handles this, and it's designed for exactly this workflow.

Proxy and Network Configuration

Some tasks require specific network egress. Remote Browser supports configurable browser settings, including proxy configuration. This is useful for geo-restricted content or for routing traffic through a specific IP range.

The key word is "configurable." You set the proxy at session creation, and all traffic from that session goes through it. This is much cleaner than trying to configure proxies in a local Playwright instance.

Rate Limiting and Usage Controls

When you run agents at scale, you need guardrails. Remote Browser provides usage controls that let you set limits on session duration, concurrent sessions, and data transfer. This prevents runaway agents from burning through your budget.

For current pricing and limits, check the pricing page. The model is straightforward: you pay for browser time, and you can set controls to stay within your budget.

Debugging with the Live Viewer

One of the biggest advantages of a remote browser is the live viewer. You can watch your agent work in real time, see what it's clicking, and spot errors as they happen. This is impossible with a local browser unless you're physically present.

The live viewer also records sessions, so you can review what happened after the fact. This is invaluable for debugging agent failures and for auditing what your automation did.

Security and Isolation

Running browser automation in the cloud raises security questions. Here's how Remote Browser addresses them:

  • Session isolation: Each session runs in its own browser context. No data leaks between sessions.
  • Ephemeral storage: By default, sessions don't persist data unless you enable persistent profiles.
  • Network controls: You can restrict what a session can access, including blocking certain domains.
  • Access controls: API keys and session tokens control who can connect to a session.

This is more secure than running a local browser with your personal profile, which has access to your entire machine.

The Bottom Line

browser-use Playwright is a great combination for building AI agents that interact with the web. But the runtime matters as much as the agent logic. A local browser is fine for development; a remote browser is necessary for production.

Remote Browser fills the gap by providing hosted Chromium sessions with CDP access, persistent profiles, session isolation, and live debugging. It works with browser-use, Playwright, Puppeteer, and any other library that speaks CDP.

If you're building an agent that needs to run reliably, scale, and be debuggable, the remote browser is the missing piece. Start with a local script to validate your approach, then move to a hosted runtime when you need operational guarantees.

For more context on how remote browsers fit into AI agent workflows, see our posts on remote browsers for AI agents and running browser automation in the cloud. If you're evaluating the operational checklist, our remote web browser guide covers the practical details.

The Chrome DevTools Protocol documentation is the authoritative reference for CDP, and it's worth reading if you're building on top of browser automation. The CDP docs explain the full range of what you can do with a browser over the wire.

The short version: browser-use gives you the agent, Playwright gives you the browser control, and Remote Browser gives you the runtime. All three together make a production-ready system.