← Blog

BLOG

Remote Browsercore: The Hosted Chromium Runtime for AI Agents

Remote Browsercore: a hosted Chromium runtime for AI agents. Keep sessions alive, connect via CDP, and scale Playwright without managing infra.

August 25, 20269 min readRemote Browser

# Remote Browsercore: The Hosted Chromium Runtime for AI Agents

When you move browser automation from a local script to a production system, the hard part isn't the code—it's the runtime. A remote browsercore solves the infrastructure problem: hosted Chromium sessions that stay alive across cloud workers, expose a standard debugging protocol, and scale without you babysitting a fleet of containers. This guide explains what remote browsercore means, how it differs from self-hosted Playwright infrastructure, and how to integrate it with your AI agent or test harness.

What Is Remote Browsercore?

Remote browsercore refers to a managed browser runtime that runs Chromium in the cloud and exposes it to your code over the network. Instead of launching a browser process inside your application server, you connect to a remote session via the Chrome DevTools Protocol (CDP) or a WebDriver-compatible API.

The core value proposition is separation of concerns:

  • Your code handles logic, decision-making, and data parsing.
  • The remote browser handles rendering, JavaScript execution, network requests, and session state.

This separation matters for AI agents because agents often run on ephemeral infrastructure. A serverless function or a Kubernetes pod can be terminated at any moment. If your browser session lives inside that pod, you lose the session. A remote browsercore keeps the browser alive independently of your compute.

Why a Remote Browsercore Beats Self-Hosted Playwright Infra

Many teams start with Playwright running locally or in a Docker container. It works for small test suites. But when you need 24/7 availability, concurrent sessions, or AI agents that must survive worker restarts, self-hosting becomes a burden.

ConsiderationSelf-Hosted Playwright InfraRemote Browsercore (Hosted Chromium)
Session persistenceLost when container restartsSurvives worker restarts; session lives in the cloud
ScalingYou manage pools, queues, and retriesProvider handles capacity; you request sessions on demand
Network egressYour IPs, often flagged by anti-bot systemsConfigurable browser settings and proxy options
MaintenanceBrowser updates, OS patches, dependency conflictsProvider manages Chromium versions and patches
DebuggingNeed to expose VNC or capture screenshots manuallyLive viewer and session recording built in
Cost modelPay for idle VMsPay for active browser time

The table above highlights the key trade-off: control versus operational overhead. Self-hosting gives you full control over the browser binary and network stack. A remote browsercore gives you a managed runtime with predictable behavior.

How to Keep Browser Sessions Alive Across Multiple Cloud Workers

One of the most common questions we hear is: *"How do I keep a browser session alive when my cloud worker dies?"*

The answer is to decouple the session from the worker. With a remote browsercore, you create a session on the hosted runtime, get a connection URL, and then any worker—or multiple workers—can connect to that same session.

Here's the pattern:

  1. Create a session via the Remote Browser API. The session starts Chromium in the cloud.
  2. Get the CDP endpoint (e.g., wss://remote-browser.dev/session/<id>).
  3. Pass the endpoint to your worker as an environment variable or through your orchestration layer.
  4. Worker connects using Playwright's connectOverCDP or a raw WebSocket client.
  5. If the worker dies, a new worker can connect to the same session URL. The browser state—cookies, localStorage, open tabs—remains intact.

This pattern is especially useful for AI agents that need to maintain login state across multiple tool calls or retries.

Connecting to Remote Browsercore with Playwright

Playwright's connectOverCDP method is the simplest way to attach to a remote browsercore session. Here's a TypeScript example:

import { chromium } from 'playwright';

async function connectToRemoteSession(sessionUrl: string) {
  // sessionUrl looks like: wss://remote-browser.dev/session/abc123
  const browser = await chromium.connectOverCDP(sessionUrl);

  // Get the default context or create a new one
  const context = browser.contexts()[0] || await browser.newContext();

  // Use the page as you normally would
  const page = await context.newPage();
  await page.goto('https://example.com');

  // Your AI agent logic here
  const title = await page.title();
  console.log(`Page title: ${title}`);

  // Don't close the browser—keep the session alive for the next worker
  // await browser.close();
}

// Usage
const sessionUrl = process.env.REMOTE_BROWSER_CDP_URL;
if (!sessionUrl) {
  throw new Error('REMOTE_BROWSER_CDP_URL is not set');
}
connectToRemoteSession(sessionUrl);

Note the comment at the end: you typically don't close the browser. The session is managed by the remote browsercore runtime. You disconnect your client, but the browser stays alive until you explicitly terminate it or the session timeout expires.

Browser-as-a-Service vs. Self-Hosted Playwright Infra

The term "browser-as-a-service" (BaaS) is often used interchangeably with remote browsercore. Both refer to hosted browser runtimes. But there's a spectrum of offerings:

  • Full BaaS platforms provide an API to create sessions, manage profiles, and handle scaling. They abstract away the browser entirely.
  • Self-hosted Playwright infra means you run Playwright's test runner or library in your own environment, managing browsers and workers yourself.

Remote Browser sits in the middle: it's a BaaS that gives you direct CDP access, so you can use Playwright, Puppeteer, or Selenium without locking yourself into a proprietary API.

When to Choose BaaS

  • You need persistent sessions across workers.
  • You want to avoid managing browser versions and OS dependencies.
  • You need to scale from 1 to 100 concurrent sessions without rearchitecting.
  • Your AI agent needs to run for hours or days without interruption.

When to Self-Host

  • You have strict data residency requirements that a cloud provider can't meet.
  • You need to modify the Chromium binary itself (e.g., custom patches).
  • Your traffic is extremely predictable and you already have idle capacity.
  • You need to keep everything on a private network with no external dependencies.

How to Give Your AI Agent Browser Access in Production

AI agents that browse the web need more than just a browser—they need a reliable, debuggable, and safe runtime. Here's a production checklist:

  1. Session isolation: Each agent task should get its own browser session. This prevents cross-task contamination of cookies and local storage.
  2. Persistent profiles: For tasks that require login (e.g., checking a dashboard), use a persistent profile so the agent doesn't re-authenticate every time.
  3. Live debugging: When an agent fails, you need to see what happened. A live viewer or session recording is essential for debugging.
  4. Usage controls: Set timeouts and limits so a runaway agent doesn't burn through your budget.
  5. Proxy and stealth settings: If your agent interacts with sites that block datacenter IPs, you need configurable browser settings and proxy options.

Remote Browser supports all of these. The documentation covers how to configure profiles, proxies, and session limits.

Virtual Browser API Integration

A virtual browser API is the programmatic interface to a remote browsercore. It typically includes endpoints for:

  • Creating and terminating sessions
  • Listing active sessions
  • Getting session details (CDP URL, status, metadata)
  • Managing profiles and proxies

Here's a minimal example of what the API flow looks like:

# Create a session
curl -X POST https://api.remote-browser.dev/v1/sessions \
  -H "Authorization: Bearer $API_KEY" \
  -d '{"profile": "default", "timeout": 3600}'

# Response
{
  "id": "abc123",
  "cdp_url": "wss://remote-browser.dev/session/abc123",
  "status": "running",
  "created_at": "2026-08-25T10:00:00Z"
}

Your application then uses the cdp_url to connect with Playwright or any CDP-compatible client.

Web Browser Agents and the "Agent Browser" Pattern

The term "agent browser" has become popular in the AI community. It refers to a browser runtime designed specifically for AI agents—one that supports long-running sessions, tool use, and integration with LLM decision loops.

A remote browsercore is the infrastructure behind an agent browser. The agent (e.g., a LangChain or Vercel AI SDK application) uses the browser as a tool. The browser performs actions, returns observations (screenshots, DOM snapshots), and the agent decides the next action.

The key difference from traditional test automation is the feedback loop. Tests are deterministic; agents are not. An agent might need to:

  • Wait for a page to load and then re-evaluate.
  • Navigate back after hitting a paywall.
  • Fill out a form, submit, and check for validation errors.

A remote browsercore supports this by providing a stable session that the agent can interact with over multiple steps, even if the agent's compute is ephemeral.

The Chrome Remote Desktop Typing Fix and Other Practical Issues

A common pain point in browser automation is typing issues—especially when using Chrome Remote Desktop or similar tools. Characters get dropped, or the input goes to the wrong field.

In a remote browsercore context, this problem is usually caused by:

  • Focus issues: The page doesn't have focus when you send keystrokes.
  • Race conditions: The page is still loading when you try to type.
  • Event handling: JavaScript event listeners interfere with synthetic input events.

The fix is to use Playwright's locator.fill() or locator.pressSequentially() instead of raw CDP Input.dispatchKeyEvent. These methods wait for the element to be actionable and handle focus automatically.

// Instead of:
// await page.keyboard.type('hello');

// Use:
const input = page.locator('input[name="q"]');
await input.fill('hello');
await input.press('Enter');

This is a small but critical detail when building reliable agents.

Remote Cloud Browser: Security and Compliance

When you move browser sessions to the cloud, you need to consider security:

  • Data in transit: CDP connections should be over WSS (WebSocket Secure). Remote Browser uses encrypted connections.
  • Data at rest: Session data (cookies, profiles) is stored on the provider's infrastructure. Review the provider's data handling policies.
  • Access control: Use API keys with scoped permissions. Rotate them regularly.
  • Session termination: Ensure sessions are terminated when no longer needed to avoid data retention.

For compliance-sensitive workloads, you may need to configure the browser to block third-party cookies or disable JavaScript on certain domains. Remote Browser's usage controls allow you to set these policies per session.

Browser-Use and Remote Browsercore

The browser-use library is a popular open-source tool for AI browser automation. It provides a high-level API for agents to interact with web pages. Remote Browser is compatible with browser-use workflows because it exposes a standard CDP endpoint.

If you're using browser-use, you can point it at a remote browsercore session instead of a local browser. This gives you the benefits of hosted infrastructure—persistence, scaling, and debugging—without changing your agent logic.

Conclusion: When to Move to a Remote Browsercore

You should consider a remote browsercore when:

  • Your AI agent runs on serverless or ephemeral compute.
  • You need browser sessions to survive worker restarts.
  • You're spending more time maintaining browser infrastructure than writing automation logic.
  • You need to scale beyond a few concurrent sessions.
  • You want live debugging and session recording without building it yourself.

You should stick with local or self-hosted browsers when:

  • You have strict data residency requirements.
  • You need to modify the browser binary.
  • Your workload is small and predictable.

Remote Browser provides a hosted Chromium runtime designed for AI agents and automation. It supports CDP, Playwright, Puppeteer, and Selenium, with persistent profiles, live debugging, and configurable browser settings. For a deeper dive into how remote browsers fit into your architecture, read our post on remote browsers for AI agents or explore the remote browser online guide.

For implementation details, check the official documentation. If you're comparing costs, the pricing page has current rates. And for a broader look at the ecosystem, the Chrome DevTools Protocol documentation is the authoritative reference for CDP.

The shift from local to remote browsercore is a shift from managing browsers to using them. Your code should focus on the task, not on keeping Chromium alive.