BLOG
App Use: What It Means for AI Browser Agents
App use in browser automation means driving real web apps through a hosted Chromium runtime. Here is how to scope, connect, and run it in production.

"App use" is a short query with a specific meaning in browser automation: an agent or script needs to *use a web app* — sign in, click through a dashboard, fill a form, pull a report — the way a person would. The hard part is never the click. It is the runtime underneath: a real browser, a stable session, a way to observe what happened, and a way to stop paying for it when the task ends. This guide covers how app use works for AI agents, where local Chrome breaks down, and how to run it on hosted Chromium with CDP.
What "app use" actually requires
When an agent performs app use, it is not calling an API. It is loading the app's HTML, executing its JavaScript, holding cookies and localStorage, and reacting to whatever the UI renders. That means four things have to be true at once:
- A real browser engine. Chromium, not a headless HTML parser. Modern apps are client-rendered; the DOM only exists after scripts run.
- A persistent session. Login state, CSRF tokens, and multi-step flows span requests. If the browser dies mid-flow, the task restarts.
- A control channel. Something has to tell the browser what to do — CDP, Playwright, Puppeteer, or an agent framework built on top of them.
- Observability. When an agent fails at step 7 of 12, you need to see the page it was looking at, not just a stack trace.
Most teams start with local Chrome and a Playwright script. That works for one developer on one machine. It stops working when you need ten agents running the same app use concurrently, or when the app requires a login your CI runner does not have, or when you need to debug a failure that happened at 3 a.m.
Where local Chrome breaks down for app use
Local browser automation has three structural limits that show up as soon as app use moves past a demo.
Resource contention. Each Chromium instance is memory-hungry. Running several in parallel on one machine forces you to tune process limits, shm size, and zombie reaping. On a laptop this is annoying; on a shared CI box it is a source of flaky failures that look like app bugs.
State fragility. Cookies, profiles, and downloaded files live on the local filesystem. Container restarts wipe them. Ephemeral CI runners start clean every time, so every app use run re-authenticates from scratch — which is exactly the step most likely to hit a CAPTCHA or a 2FA prompt.
No shared view. When an agent gets stuck, the only artifact is a log line. Reproducing the failure means re-running the whole flow and hoping it fails the same way. For app use against a stateful dashboard, it usually does not.
A hosted runtime addresses all three by moving the browser off your machine and giving it an addressable lifecycle. That is the model behind Remote Browser for AI agents: a Chromium session you create over an API, drive over CDP, watch live, and stop when done.
The runtime model: sessions, CDP, and lifecycle
The core abstraction is the browser session. You request one, get back a CDP WebSocket endpoint, connect your automation library to it, run the app use task, then release the session. Everything else — profiles, proxies, the live viewer — hangs off that lifecycle.
| Concern | Local Chrome | Hosted Chromium session |
|---|---|---|
| Provisioning | Install and launch per machine | One API call per session |
| Parallelism | Bounded by local RAM/CPU | Bounded by your plan's concurrency |
| Login state | Local profile directory | Persistent profile you attach to sessions |
| Debugging | Screenshots and logs you add yourself | Live viewer plus CDP access |
| Cleanup | Kill the process, hope it exits | Explicit session stop |
| Network identity | Your machine's IP | Configurable proxy settings |
| Cost model | Fixed infra you own | Metered per session; see /pricing |
The important shift is that the browser becomes a *resource with a lifecycle* rather than a process you spawn. That makes app use tasks schedulable, retryable, and observable in the same way you would treat a database connection or a queue worker.
Why CDP is the right control surface
The Chrome DevTools Protocol is the wire format Chromium exposes for external control. Playwright, Puppeteer, and Selenium all speak it (Selenium via ChromeDriver, Playwright and Puppeteer natively). Connecting over CDP means your existing automation code does not change — only the connection target does.
This matters for app use specifically because agent frameworks tend to sit on top of one of these libraries. If your agent uses Playwright under the hood, pointing it at a remote CDP endpoint is a one-line change. The protocol reference is at the Chrome DevTools Protocol documentation, and Playwright's connection semantics are documented in its CDP guide.
Connecting an agent to a hosted session
The pattern is the same across libraries: obtain the WebSocket endpoint from the session API, then connect. Here is a TypeScript example using Playwright's connectOverCDP, with the endpoint supplied by your session-creation call.
import { chromium, type Browser, type Page } from "playwright";
interface SessionResponse {
id: string;
cdpUrl: string; // wss://... provided by the runtime
}
async function createSession(): Promise<SessionResponse> {
const res = await fetch(`${process.env.RB_API_URL}/sessions`, {
method: "POST",
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${process.env.RB_API_KEY}`,
},
body: JSON.stringify({
// Attach a saved profile so app use starts logged in.
profileId: process.env.RB_PROFILE_ID,
// 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 SessionResponse;
}
async function runAppUse(): Promise<void> {
const session = await createSession();
let browser: Browser | undefined;
try {
browser = await chromium.connectOverCDP(session.cdpUrl);
const context = browser.contexts()[0] ?? (await browser.newContext());
const page: Page = context.pages()[0] ?? (await context.newPage());
await page.goto("https://app.example.com/dashboard", {
waitUntil: "domcontentloaded",
});
// App use: drive the UI the way a user would.
await page.getByRole("button", { name: "New report" }).click();
await page.getByLabel("Report name").fill("Q4 pipeline");
await page.getByRole("button", { name: "Generate" }).click();
await page.waitForSelector("[data-testid='report-ready']", {
timeout: 60_000,
});
const summary = await page
.locator("[data-testid='report-summary']")
.innerText();
console.log("report summary:", summary);
} finally {
await browser?.close();
// Always release the session; metered runtimes bill on session time.
await fetch(`${process.env.RB_API_URL}/sessions/${session.id}`, {
method: "DELETE",
headers: { Authorization: `Bearer ${process.env.RB_API_KEY}` },
});
}
}
runAppUse().catch((err) => {
console.error(err);
process.exit(1);
});Two details in that snippet carry most of the production weight. First, profileId — attaching a persistent profile means the app use task begins in an authenticated state instead of replaying a login flow on every run. Second, the finally block — sessions are metered, so an unclosed session is a slow leak. Treat session release as part of the task contract, not an afterthought.
For the connection mechanics in more depth, see Remote Browser online and the documentation.
Production criteria for app use workloads
Once app use moves from a script to a service, evaluate the runtime against these criteria rather than against feature checklists.
Session isolation. Each app use task should get its own browser context so cookies and storage from one tenant never bleed into another. Confirm the runtime gives you isolated contexts by default and that profile attachment is explicit, not implicit.
Profile management. Persistent profiles are what make app use practical for logged-in apps. You want to create a profile once, authenticate it, and reuse it across sessions — with a clear way to rotate or reset it when credentials change.
Network configuration. Many apps behave differently by geography or IP reputation. Configurable proxy settings let you route sessions through the network identity the app expects. Be precise about what you need: proxy routing is a real, supported capability; confirm any additional browser-identity features against the provider's documentation before you rely on them.
Observability. A live viewer that lets a human watch a session in real time is the fastest debugging tool for app use failures. Pair it with CDP access so you can also attach programmatically and pull console logs or network traces.
Usage controls. Metered sessions need guardrails: per-session timeouts, concurrency limits, and a way to see what you have consumed. Check /pricing for the current model rather than assuming a fixed rate.
Library compatibility. If your agent stack uses Playwright, Puppeteer, or Selenium, the runtime should accept all three over CDP without a proprietary SDK in the middle. That keeps you portable.
Common app use failure modes and how to handle them
Most app use failures fall into a small set of categories. Naming them makes them easier to design around.
- Auth expiry mid-flow. The profile's session token expired between runs. Detect the login redirect and either refresh the profile or fail fast with a clear signal rather than letting the agent click into a login page.
- Selector drift. The app shipped a UI change and your locator broke. Prefer role- and label-based locators over CSS paths, and assert on page state before acting.
- Timing races. The agent acts before the app finishes rendering. Wait on specific elements or network idle conditions, not fixed sleeps.
- Silent session death. The session was released or timed out while the agent was still working. Wrap the task in a timeout shorter than the session lifetime so you fail on your terms.
- Cross-tenant contamination. A shared profile leaked state between tasks. Isolate contexts per task and scope profiles per account.
Each of these is cheaper to fix when the browser is a managed resource: you can replay a session, inspect the live view, and swap a profile without rebuilding infrastructure.
When hosted Chromium is the right call — and when it is not
Hosted Chromium is the right runtime for app use when any of the following is true: you need concurrency beyond one machine, your tasks depend on persistent login state, you need to debug failures after the fact, or you want to stop maintaining browser infrastructure yourself.
It is *not* the obvious choice when your app use is a single daily script on a developer's machine, when the app is fully API-accessible and you are only using the browser out of habit, or when regulatory constraints require the browser to run inside a specific network you control. In those cases, local Chrome is fine — and honest.
The decision usually comes down to whether browser sessions are *infrastructure* for your product or *a script* you run occasionally. If agents depend on app use to deliver value to users, treat the runtime as infrastructure: version your profiles, monitor session duration, alert on failure rates, and keep the connection layer thin so you can move between providers. The remote web browser guide and remote control browser guide cover adjacent patterns if your workload leans toward interactive control rather than scripted app use.
Getting started
The shortest path to running app use on a hosted runtime is: create a profile, authenticate it once through the live viewer, then connect your Playwright or Puppeteer agent over CDP using the pattern above. Start with a single task, confirm the session lifecycle behaves as expected, then scale concurrency and add monitoring.
Read the documentation for the session and profile APIs, and check /pricing for the current metering model before you size your workload. App use is a solved problem at the protocol level — CDP has driven Chromium for years. The remaining work is operational, and that is exactly what a hosted runtime is for.