BLOG
Browserbase Alternative GitHub: Open-Source and Hosted Options
Compare Browserbase alternatives on GitHub: open-source browser runtimes, self-hosting trade-offs, and hosted Chromium for AI agents.
# Browserbase Alternative GitHub: Open-Source and Hosted Options
If you searched for a Browserbase alternative GitHub, you are probably weighing three things: cost, control, and how much infrastructure you want to own. Browserbase is a hosted browser API. The "GitHub" part of the query usually means you want something you can self-host, inspect, or fork — or you want to know which hosted alternatives publish their tooling openly.
This guide separates those concerns. It covers the open-source projects people actually run, the real trade-offs of self-hosting Chromium at scale, and where a hosted runtime like Remote Browser fits when you want CDP access without owning the fleet. For the broader runtime picture, see Remote Browser for AI agents.
What "Browserbase alternative GitHub" actually means
The query mixes two different intents:
- Open-source replacement — a repo you clone and run yourself (Playwright, Puppeteer, browser-use, Steel, and similar).
- Hosted alternative with public tooling — a managed browser API whose SDKs, CLI, or examples live on GitHub.
Both are legitimate. The mistake is assuming they solve the same problem. An open-source library gives you code. A hosted runtime gives you running browsers, session isolation, and someone else's on-call rotation.
If you want the shortest path to a working session, a hosted endpoint you connect to over CDP is usually faster than standing up your own Chromium grid. If you want to read every line before it touches production, open source wins.
Open-source options people find on GitHub
These are the projects that show up most often when developers compare browser automation stacks.
- Playwright — Microsoft's automation library. Chromium, Firefox, and WebKit. Excellent for testing and scripting. You still supply the browser infrastructure.
- Puppeteer — Chrome/Chromium-focused, CDP-native. Lean and well documented.
- browser-use — an agent framework that drives a browser to complete tasks. It expects a browser to connect to; it does not host one for you.
- Steel — an open-source browser API you can self-host. Closer to a Browserbase-shaped product, but you run it.
- Selenium — the long-standing standard, broad language support, heavier setup.
None of these are drop-in replacements for a hosted service. They are the layer *below* it. The hosted product is the part that keeps browsers alive, isolated, and reachable.
Self-hosting vs hosted: the real trade-off
The honest comparison is not "free vs paid." It is "who operates the browser fleet."
| Dimension | Self-hosted (GitHub) | Hosted runtime (e.g. Remote Browser) |
|---|---|---|
| Upfront cost | Low (open source) | Usage-based; see /pricing |
| Ongoing cost | Engineer time, compute, egress | Metered browser time |
| Scaling | You build the scheduler | Session API handles allocation |
| Isolation | Your responsibility | Per-session isolation |
| Browser updates | You patch and redeploy | Managed |
| Debugging | Your logs and tooling | Live viewer + session logs |
| CDP access | Full | Full |
| Playwright/Puppeteer/Selenium | Yes | Yes |
| Persistent profiles | You build storage | Built-in profiles |
| Time to first session | Hours to days | Minutes |
Self-hosting is not wrong. It is a commitment. The question is whether browser infrastructure is your product or a dependency of it.
Why teams move off self-hosted Chromium
The failure modes are predictable and they show up after launch, not during the demo.
- Zombie browsers. A crashed worker leaves Chromium running. Multiply by a few hundred sessions and you are paying for nothing.
- Memory pressure. Headless Chromium is not lightweight. Ten concurrent sessions on one box is often optimistic.
- Version drift. Your local Chrome, your CI Chrome, and your production Chrome diverge. Selectors break in one place and not another.
- No isolation. One session's cookies leak into another. For agent workloads touching authenticated sites, that is a correctness bug, not a nuisance.
- Debugging blind. When a task fails at 3 a.m., you have logs and nothing else. A live viewer changes the diagnosis loop.
A hosted runtime absorbs these. You connect over CDP, run your task, and disconnect. The browser lifecycle is not your problem.
Connecting to a hosted runtime over CDP
The migration path from a local Playwright script to a hosted session is small. You swap launch() for connectOverCDP() and point at a WebSocket endpoint.
import { chromium, Browser, Page } from 'playwright';
// Endpoint from your Remote Browser session.
// Treat this like a credential — do not commit it.
const CDP_ENDPOINT = process.env.REMOTE_BROWSER_CDP!;
async function runTask(): Promise<void> {
let browser: Browser | undefined;
try {
// Connect to the hosted Chromium session instead of launching locally.
browser = await chromium.connectOverCDP(CDP_ENDPOINT);
// Reuse the existing context so persistent profile state is honored.
const context = browser.contexts()[0] ?? (await browser.newContext());
const page: Page = await context.newPage();
await page.goto('https://example.com', { waitUntil: 'domcontentloaded' });
// Your agent or automation logic goes here.
const title = await page.title();
console.log('Loaded:', title);
await page.close();
} catch (err) {
console.error('Session failed:', err);
throw err;
} finally {
// Close the connection, not the remote browser process.
await browser?.close();
}
}
runTask();Two details matter in production:
- `browser.close()` closes your connection. It does not necessarily terminate the remote session. Session teardown is handled by the runtime, which is what you want when a task crashes mid-run.
- Reuse `contexts()[0]`. Creating a fresh context on every connect discards profile state. If you need persistent login, connect to the existing context.
For the full connection surface, see the documentation. Playwright's own connectOverCDP reference documents the Chromium-only constraint and the endpoint format.
What to check before picking an alternative
Run every candidate through the same checklist. The answers separate a demo from a runtime.
- CDP access. Can you connect raw, or are you locked into one SDK? Raw CDP matters when you need browser-level control.
- Framework compatibility. Playwright, Puppeteer, and Selenium should all work. If only one does, you are coupling your stack to a vendor.
- Session isolation. Each task gets its own browser state. No shared cookies, no shared storage.
- Persistent profiles. Can you keep a logged-in session across runs without re-authenticating every time?
- Live viewer. Can you watch a session in real time when something breaks?
- Proxy and browser settings. Configurable network and browser settings, not a fixed black box.
- Usage controls. Can you cap spend and concurrency? Unbounded usage is how bills surprise you.
- Pricing model. Per browser-hour, per task, or per seat. See /pricing for how Remote Browser meters usage.
If a candidate fails on isolation or CDP access, stop there. Those are not features you can bolt on later.
Where Remote Browser fits
Remote Browser is a hosted Chromium runtime for AI agents and browser-use workflows. It is not an open-source repo you fork. It is the layer you connect to when you have decided that operating browsers is not your differentiator.
What it provides:
- Hosted Chromium sessions with CDP access
- Playwright, Puppeteer, and Selenium compatibility
- A live viewer for real-time debugging
- Persistent profiles for stateful workflows
- Configurable proxy and browser settings
- Per-session isolation
- Usage controls so spend stays bounded
What it does not claim:
- It is not free at every scale. Pricing is usage-based; check /pricing for current rates.
- It does not guarantee success on every site. Anti-bot systems are adversarial and change constantly.
- It is not a replacement for your agent logic. It runs the browser; you decide what the agent does.
That positioning is deliberate. A runtime should be boring. The interesting part is the task your agent performs.
When open source is the right call
Self-hosting is the better choice when:
- You have strict data residency or compliance requirements that forbid third-party browser infrastructure.
- Your volume is low and predictable, and you already run the compute.
- You need to patch Chromium itself for a specific behavior.
- You want to read and modify every line for security review.
In those cases, start with Playwright or Puppeteer and build the session layer yourself. Budget for the operational work — it is real, and it does not shrink as you scale.
When a hosted runtime is the right call
A hosted runtime is the better choice when:
- Browser infrastructure is a dependency, not your product.
- You need to scale concurrency up and down without provisioning.
- You want isolation and persistent profiles without building storage.
- You want a live viewer for debugging instead of log archaeology.
- You want to ship the agent, not the fleet.
The migration is a connection string. If you already have Playwright code, the change is measured in minutes, not sprints. For a walkthrough of running Chromium without local setup, see Remote Browser Online.
A practical migration path
If you are moving from a self-hosted setup to a hosted runtime, do it in stages.
- Keep your Playwright code. Replace
launch()withconnectOverCDP(). Nothing else changes. - Move secrets to environment variables. The CDP endpoint is a credential. Treat it like one.
- Test isolation. Run two sessions concurrently and confirm they do not share state.
- Enable persistent profiles only where you need them. Stateless tasks should stay stateless.
- Add usage caps before you scale. Know your ceiling.
- Wire up the live viewer for the tasks that fail most often. Debugging speed compounds.
Each step is reversible. You can run self-hosted and hosted side by side while you compare.
The bottom line
A Browserbase alternative on GitHub is usually one of two things: an open-source library you operate yourself, or a hosted runtime with public tooling. The library is cheaper upfront and more expensive in engineering time. The hosted runtime trades metered cost for operational relief.
Pick based on where your team's time is best spent. If browser infrastructure is not your product, do not build it. Connect to it. Start with the documentation to see the connection surface, and check /pricing to model cost against your expected session volume.