Skip to main content

Browser agents that sleep for $0 and wake in 500ms on Orb Cloud

Project description

orb-browser

Browser agents that sleep for $0 and wake in 500ms.

Deploy headless Chrome on Orb Cloud. Connect browser-use or any CDP client. When idle, checkpoint the browser to NVMe — cookies, DOM, localStorage, everything preserved. Wake it up later in ~500ms, exactly where you left off.

Install

pip install orb-browser browser-use

Or from source:

pip install git+https://github.com/nextbysam/orb-browser.git

Get an API Key

# Register
curl -X POST https://api.orbcloud.dev/api/v1/auth/register \
  -H 'Content-Type: application/json' \
  -d '{"email":"you@example.com"}'

# Create org key
curl -X POST https://api.orbcloud.dev/v1/keys \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{"name":"my-key"}'

Usage

import asyncio
from orb_browser import OrbBrowser
from browser_use import Browser

async def main():
    # Deploy a browser on Orb Cloud (~1-3 min first time)
    orb = OrbBrowser(api_key="orb_...")
    cdp_url = orb.deploy()

    # Connect browser-use
    browser = Browser(cdp_url=cdp_url)
    await browser.start()

    # Full browser control
    await browser.navigate_to("https://example.com")
    title = await browser.get_current_page_title()
    screenshot = await browser.take_screenshot()

    # Disconnect before sleep
    await browser.stop()

    # Sleep — frozen to NVMe, $0/hr
    orb.sleep()

    # ... hours later ...

    # Wake — ~500ms, everything restored
    cdp_url = orb.wake()

    # Reconnect — same page, same cookies
    browser = Browser(cdp_url=cdp_url)
    await browser.start()

    # Clean up
    await browser.stop()
    orb.destroy()

asyncio.run(main())

API

from orb_browser import OrbBrowser

orb = OrbBrowser(api_key="orb_...")
Method Description
orb.deploy() Deploy browser VM, returns CDP WebSocket URL
orb.sleep() Checkpoint to NVMe ($0 while sleeping)
orb.wake() Restore from checkpoint (~500ms), returns new CDP URL
orb.destroy() Delete the VM
orb.connect(computer_id, agent_port) Connect to existing VM
orb.state Current state: init, deploying, running, sleeping, destroyed
orb.vm_url HTTPS URL of the VM
orb.cdp_url CDP WebSocket URL

How It Works

  1. deploy() creates a VM on Orb Cloud, installs Chromium via Playwright, starts it with CDP debugging enabled
  2. Returns a wss:// CDP URL that browser-use (or Puppeteer, Playwright, any CDP client) connects to
  3. sleep() calls CRIU to checkpoint the entire process tree (Node.js + Chromium + renderers) to NVMe
  4. wake() restores everything in ~500ms — the browser doesn't know it was frozen

Works With

  • browser-use (78K stars) — AI browser agents
  • Playwrightbrowser = await chromium.connect_over_cdp(cdp_url)
  • Puppeteerbrowser = await puppeteer.connect({ browserWSEndpoint: cdpUrl })
  • Any CDP client

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

orb_browser-0.1.0.tar.gz (5.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

orb_browser-0.1.0-py3-none-any.whl (6.4 kB view details)

Uploaded Python 3

File details

Details for the file orb_browser-0.1.0.tar.gz.

File metadata

  • Download URL: orb_browser-0.1.0.tar.gz
  • Upload date:
  • Size: 5.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for orb_browser-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ae91970dff2b147ff705e24dfdbeddd9dbb779b9046c049c94d4ceffe650e5f5
MD5 9c43b888b3734fe54c2053400800f7c8
BLAKE2b-256 81e50184e6628d274f15822e01045e08457958d9c3dfd3a8fee2aa24a5bfb0dd

See more details on using hashes here.

File details

Details for the file orb_browser-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: orb_browser-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for orb_browser-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9625feeda2a8350e0c438b09c01b1c5ec44baf6c87cebe7074e1d2e48afdc226
MD5 c7dac753638269e36f434b7237ad9293
BLAKE2b-256 6ba4719588f22601154f8c53ad5ab87312b7c8b3c688f6e1e5724bba7c9f6af8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page