Skip to main content
When every worker needs the same heavy web application already booted and hydrated, Browser Session Snapshots eliminate repetitive startup time by restoring live VM memory state directly via startFromSnapshot. Required API key scopes: browser.sessions.create, browser.sessions.read, browser.sessions.update, browser.sessions.stop, browser.sessions.snapshots.create, browser.sessions.logs.read.

Prerequisites

  • HYPERBROWSER_API_KEY exported in your shell and team browser-snapshot access enabled.
  • @hyperbrowser/sdk + playwright-core (TypeScript) or hyperbrowser + playwright (Python) installed.
Browser session snapshots require VM-backed sessions and team snapshot access. Sessions started with webBotAuth cannot be snapshotted. Snapshots of sessions that filled secrets are marked as containing secrets, and restoring them requires team owner/admin access or the secrets.use scope for API keys.

Step 1: Warm Up & Capture a Snapshot


Step 2: Restore Workers, Extend Long Jobs & Inspect Events

Expected output

  • buildWarmSnapshot() logs Captured snapshot: <snapshot-id> and stops the seed session cleanly.
  • runFromSnapshot() prints the current active session count, confirms the worker opens directly at https://app.example.com/workspace, extends the timeout by 30 minutes, and prints the session event log count.

Next Steps