baton
0.4.0batonvm is on npm, MIT

Cloud Chrome that moves without dropping your agent.

One API call returns a CDP URL for Playwright, Puppeteer or any agent. Every browser runs in its own Firecracker microVM, and it can change machines, split in three or sleep in storage while your agent stays connected.

Install the SDK
$ npm i batonvm playwright-core

A whole session in 475 ms.

Create, connect over CDP, load a page and release, timed end to end by Browser Arena’s own harness, 100 sessions in a row: 6th of 13 by the median, Browser Arena’s own measure, and 4th by p95. Down from 1,198 ms the morning we started on it.

Browser Arena

Milliseconds per session, lower is better

  1. N

    Notte

    340
    p50291p99430
  2. Browser Use

    490
    p50424p99639
  3. L

    Lightpanda

    559
    p50485p99674
  4. Baton

    564
    p50475p99630
  5. Browserbase

    663
    p50590p99730
  6. Kernel (headful)

    676
    p50344p99767
  7. Kernel

    712
    p50378p99741
  8. Tilion

    922
    p50156p9913,292
  9. Hyperbrowser

    975
    p50890p991,280
  10. Cloudflare

    1,546
    p50962p991,919
  11. Steel

    1,691
    p501,293p992,577
  12. Anchor

    3,164
    p502,552p993,937
  13. AWS AgentCore

    3,627
    p502,613p994,411

Every other row is Browser Arena’s own latest run, from the raw results it publishes; we did not re-run them. Baton’s row is our run of the same harness from t3.small in us-east-1, on a free account, 100 of 100 sessions completed.

Move it, copy it, put it to sleep.

A real Chrome in its own microVM, driven over CDP. Move it to another machine mid-session, fork it into copies, pause it to storage and wake it anywhere.

Sessions over CDP

One call returns a wss:// URL for Playwright, Puppeteer or any CDP client. This is a real run, phase by phase.

const session =
create
connect
goto
release
wss://…/vm-7f3a21…/cdp0 ms

Live migration

Drain the machine under a running browser and it moves to another. Your agent keeps its connection, its page and its place.

vm-7f3a21running
node-aChrome · 1 tab
node-b
0 disconnects in 20 movespaused 223 ms

Profiles

Save a logged-in browser as a profile. Every session started from it opens already logged in.

profile “shop”encrypted
  • session_idshop.example30 days
  • cart_idshop.example7 days
  • __cf_bm.shop.example30 min
Every session started from it is already logged in
vm-7f3a21parent
pageshop.example/account
cookiessession_id, cart_id
logged in asagent@acme.dev
session.fork(3)paused 201 ms

POST /api/v1/sessions/:id/fork { count: 3 }

  1. vm-1c40e2node-alogged in, same tabs
  2. vm-88b0a7node-blogged in, same tabs
  3. vm-e4d913node-blogged in, same tabs

Three copies running in 2.6 s, each with its own randomness.

Fork a running browser

Copy one logged-in browser into several, each its own VM with the same pages, cookies and storage, for agents that work in parallel.

session.pause()stored in 2.1 s
no machine holds itup to 7 days
session.resume()node-c, 1.2 s
memory, disk, device state → S30%

Pause and resume

Store an idle browser and free its machine; it costs nothing while it waits. Resume it on any machine, as it was.

Move the machine, not the session.

Every browser is a Firecracker microVM with an address of its own. A move only changes the route to it, so your agent’s connection carries on, and every node’s firewall keeps VMs away from the cloud, the network and each other.

node-a, jailed Firecrackernode-b, jailed FirecrackerYour agentany CDP clientGatewayCDP proxymicroVMChrome · vm-7f3a21freeroom for the nextFirewallnftablesexample.comallowed169.254.169.254cloud metadata

Refused for every VM

  • Cloud metadata
  • The VPC and private ranges
  • Other VMs
  • Loopback
  • Shared address space
  • The node and the gateway
  • Mail ports 25, 465, 587
  • CDP without a signed token

What a move looks like

> POST /api/v1/sessions/vm-7f3a21/migrate
{ "from": "node-a", "to": "node-b",
  "pausedMs": 223, "unreachableMs": 225 }

Measured over 20 moves under a live client: 0 disconnects.

Your code doesn’t change.

Only the browser does. Create a session from TypeScript or Python, connect the Playwright or Puppeteer you already use, and call migrate, fork or pause on the same object.

$npm i batonvm playwright-core
import { Baton } from "batonvm";
import { chromium } from "playwright-core";

const baton = new Baton(); // reads BATON_API_KEY
const session = await baton.sessions.create();
const browser = await chromium.connectOverCDP(session.connectUrl);
const page = browser.contexts()[0].pages()[0];
await page.goto("https://example.com");

const move = await session.migrate(); // another machine, mid-script
console.log(`${move.from} → ${move.to}, paused ${move.pausedMs} ms`);
console.log(await page.title()); // same page, same connection
await session.close();
output
node-a → node-b, paused 223 ms
Example Domain

Free to start

Make an account with your email or GitHub, and the dashboard gives you an API key, your sessions and every event they logged.

Sessions at once
2
Longest session
60 minutes (15 by default)
Browser time
60 minutes a day
Sign up
Email or GitHub, no card
$ export BATON_API_KEY=bk_…

Open source, all of it.

The orchestrator, the node agent, the CDP proxy, the SDK and this site. MIT, with every benchmark's raw samples next to the code.