BLOG
Aside AI Browser: What It Is and How to Run One
An aside AI browser runs agent sessions beside your app instead of on your machine. Learn the architecture, trade-offs, and a CDP setup you can ship.

An aside AI browser is a browser session that runs off to the side of your application — on separate infrastructure — while your agent code stays where it is. Instead of launching Chrome on the same machine as your agent loop, you request a hosted Chromium session, connect to it over the Chrome DevTools Protocol (CDP), and drive it like a local browser. The "aside" part is the point: the browser is a sidecar resource, not a process your agent has to babysit.
This guide covers what that architecture actually looks like, where it beats a local browser, where it costs you, and how to wire one up with Playwright over CDP. If you want the broader runtime picture first, read Remote browsers for AI agents before continuing.
Why "aside" is the right mental model
Most agent tutorials assume the browser lives next to the agent. You call chromium.launch(), a Chrome process spawns on the same box, and your agent drives it. That works until it doesn't: the process leaks, the profile gets corrupted, two agents fight over the same user data directory, or the box runs out of memory at concurrency 12.
An aside AI browser inverts the relationship. Your agent is a client. The browser is a service with its own lifecycle, its own isolation boundary, and its own resource accounting. You get a CDP endpoint, you connect, you do work, you disconnect. The browser can outlive your agent process, or die without taking your agent down.
That inversion is what makes the model useful in production. It is also what makes it different from a "cloud browser" in the vague marketing sense — the aside browser is a concrete, addressable endpoint you can connect to from anywhere.
What an aside AI browser actually is
Strip away the branding and an aside AI browser is four things:
- A hosted Chromium instance running on infrastructure you don't manage, with a stable CDP WebSocket endpoint.
- A session lifecycle — create, connect, use, stop — that is decoupled from your agent's process lifetime.
- An isolation boundary so one session's cookies, storage, and cache don't bleed into another.
- A control plane for things like persistent profiles, proxy settings, and usage metering.
Remote Browser provides exactly this: hosted Chromium sessions with CDP access, Playwright/Puppeteer/Selenium compatibility, a live viewer for debugging, persistent profiles, configurable browser settings, session isolation, and usage controls. Current limits and pricing live on the pricing page.
The important distinction: an aside browser is not a headless library you install. It's a runtime you connect to. That changes how you think about failure, scaling, and debugging.
Aside browser vs. local browser vs. in-process headless
The comparison that matters is not "cloud vs. local" in the abstract. It's about where the browser process lives relative to your agent and what that buys you.
| Dimension | Local browser (same process) | Local headless (same host) | Aside AI browser (hosted) |
|---|---|---|---|
| Process isolation | None — agent and browser share a process tree | Partial — separate process, same host | Full — separate host, separate lifecycle |
| Concurrency ceiling | Bounded by local RAM/CPU | Bounded by host resources | Bounded by your plan's session limits |
| Profile persistence | Manual, fragile | Manual, fragile | Managed persistent profiles |
| Debugging | Attach a local devtools window | Screenshots and logs | Live viewer plus CDP |
| Failure blast radius | Agent crash kills browser | Host OOM kills both | Session failure is contained |
| Network egress | Your IP | Your IP | Configurable proxy settings |
| Setup cost | Low | Medium | Low (connect, don't install) |
| Operational cost | Hidden — you own it | Hidden — you own it | Metered, visible |
The trade-off is real. A local browser has zero network latency between agent and browser; an aside browser adds a hop. For a single script that runs once, local is fine. For an agent that runs continuously, handles untrusted pages, or needs to scale past a handful of concurrent sessions, the aside model wins on operational grounds — not because it's faster, but because it fails in smaller, more recoverable ways.
If you specifically want the "no local install" angle, Remote browser online covers that path. If you want to drive a browser from a remote control surface, see Remote control browser.
When an aside AI browser is the right call
Use the aside model when at least two of these are true:
- You run more than a few concurrent sessions. Local Chrome at concurrency 20 is a memory problem before it's a code problem.
- Your agent touches untrusted or third-party pages. Isolating the browser from your agent host limits what a malicious page can reach.
- You need sessions to survive agent restarts. A persistent profile on a hosted runtime outlives a crashed worker.
- You want to watch sessions live. A live viewer beats tailing logs when an agent gets stuck on a modal.
- You need per-session network configuration. Configurable proxy settings per session are easier to manage centrally than per-host.
- You're running agents from serverless or short-lived compute. A function that lives 30 seconds can't host a long browser session, but it can connect to one.
Skip the aside model when your workload is a single deterministic script, when you need sub-millisecond interaction latency, or when your compliance posture forbids any external browser egress. Those are legitimate reasons to stay local.
How to connect: Playwright over CDP
The connection path is the same one you'd use for any remote Chromium: get a CDP WebSocket endpoint from the runtime, then call connectOverCDP. Playwright's connectOverCDP documentation is the authoritative reference for the client side; the Chrome DevTools Protocol spec is the wire format underneath.
Here's a minimal TypeScript example that creates a session, connects, does work, and tears down cleanly:
import { chromium, type Browser, type BrowserContext } from "playwright";
interface SessionInfo {
id: string;
cdpUrl: string; // wss://... from the runtime's session-create call
}
// Your runtime client — replace with the actual create-session call.
async function createSession(): Promise<SessionInfo> {
const res = await fetch(`${process.env.BROWSER_API_URL}/sessions`, {
method: "POST",
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${process.env.BROWSER_API_KEY}`,
},
body: JSON.stringify({
// Persistent profile lets logins survive across sessions.
profileId: "agent-checkout-profile",
// Configurable browser settings, e.g. locale and timezone.
settings: { locale: "en-US", timezone: "America/New_York" },
}),
});
if (!res.ok) throw new Error(`session create failed: ${res.status}`);
return (await res.json()) as SessionInfo;
}
async function runTask(): Promise<void> {
const session = await createSession();
let browser: Browser | undefined;
let context: BrowserContext | undefined;
try {
browser = await chromium.connectOverCDP(session.cdpUrl);
// Reuse the existing context so the persistent profile is honored.
context = browser.contexts()[0] ?? (await browser.newContext());
const page = await context.newPage();
await page.goto("https://example.com/account", {
waitUntil: "domcontentloaded",
timeout: 30_000,
});
// Agent logic goes here — read state, click, fill, extract.
const title = await page.title();
console.log("loaded:", title);
} finally {
// Close the context, not the browser, if the runtime owns the browser.
await context?.close().catch(() => {});
await browser?.close().catch(() => {});
// Explicitly stop the session so it stops metering.
await fetch(`${process.env.BROWSER_API_URL}/sessions/${session.id}`, {
method: "DELETE",
headers: { Authorization: `Bearer ${process.env.BROWSER_API_KEY}` },
}).catch(() => {});
}
}
runTask().catch((err) => {
console.error(err);
process.exit(1);
});A few details that matter in practice:
- Reuse the existing context.
connectOverCDPattaches to a browser that already has a context. Creating a new one can bypass the persistent profile you asked for. - Always stop the session explicitly. A disconnected client does not always mean a stopped session. If the runtime meters by session time, orphaned sessions cost money. Check pricing for how metering works.
- Set timeouts on navigation. Hosted browsers are not slower, but network paths vary. A 30-second navigation timeout is a reasonable default for agent work.
- Don't assume `browser.close()` stops the session. Depending on the runtime, closing the client connection may leave the session alive. The explicit DELETE above is the safe pattern.
The same endpoint works with Puppeteer's browserWSEndpoint and Selenium's CDP bridge, so you're not locked into one client library.
Production criteria to evaluate before you commit
An aside AI browser is infrastructure. Evaluate it the way you'd evaluate a database: on failure modes, observability, and cost predictability, not on a feature checklist.
Session lifecycle semantics. What happens when your client disconnects without stopping the session? Is there an idle timeout? Can you list and kill orphaned sessions? If the answer is "we clean up eventually," budget for it.
Isolation guarantees. Are cookies, localStorage, and cache scoped per session? Are persistent profiles opt-in and namespaced? Cross-session bleed is the failure mode that's hardest to debug and most damaging when it happens.
Observability. Can you watch a session live? Can you retrieve a recording or trace after the fact? When an agent fails at step 14 of 20, a live viewer and a trace are worth more than any log line.
Network configuration. Per-session proxy settings, region selection, and egress control matter if your agents hit geo-restricted or rate-limited sites. "Configurable browser settings" should mean you can set these per session, not globally.
Usage controls. Concurrency limits, session-hour metering, and hard caps. You want to know what a runaway agent costs before it costs you. See pricing for the current model.
Client compatibility. CDP is the common denominator. If a runtime only supports one client library, you're coupling your agent code to a vendor. Prefer runtimes that speak plain CDP.
Data handling. Where do session recordings, profiles, and page content live? What's the retention policy? This matters more for agents touching authenticated pages than for public scraping.
Common mistakes when moving to an aside browser
- Treating it as a drop-in for `chromium.launch()`. The API surface is similar, but lifecycle, cleanup, and error handling differ. Port the teardown logic first.
- Ignoring the network hop. If your agent does 200 round-trips per task, the added latency compounds. Batch operations and use
waitUntilwisely. - Sharing one session across concurrent tasks. Sessions are not thread-safe for agent work. One session per task, or explicit serialization.
- Forgetting to stop sessions. The most common cost surprise. Wire session stop into your
finallyblock, not your happy path. - Assuming stealth is automatic. Configurable browser settings help, but no runtime guarantees you'll pass every bot check. Design for graceful failure.
- Skipping the live viewer until something breaks. Watch a few sessions early. You'll learn more about your agent's behavior in ten minutes of watching than in a week of logs.
Where this fits in a larger agent stack
An aside AI browser is one layer. Above it sits your agent framework — browser-use, Stagehand, a custom loop, or a CLI like agent-browser. Below it sits the runtime: hosted Chromium, CDP, profiles, proxies. The aside model is what lets those layers evolve independently. You can swap agent frameworks without re-provisioning browsers, or change runtimes without rewriting agent logic.
If you're building the full stack, the documentation covers session creation, CDP connection, profiles, and the live viewer in detail. If you're still deciding whether a hosted runtime is the right layer at all, Remote web browser walks through the decision from first principles.
The short version: an aside AI browser is not a faster local browser. It's a different operational model — one where the browser is a service with a lifecycle, and your agent is a client that connects, works, and disconnects. That model is what makes agent workloads survivable at scale.