SPAWNBOX

◐ Runs today on a plain sandbox · template coming

Give your agent a browser.It can visit only the sites you allow.

Run Chromium and Playwright in the agent's own microVM. It reads pages, fills forms and takes screenshots. This works today on a plain sandbox. A ready-made browser template and a guide are coming.

Browsers and drivers you install, for example

  • Chromium
  • Firefox
  • Playwright
  • Puppeteer
  • Selenium
YOUR AGENTSANDBOXchromiumSPAWNBOX APIKEYS · SITE RULESYOUR SERVERTEMPLATECOMING
FIG. 05 · ONE REQUEST, THERE AND BACK
0102

Follow one request.

Each step shows the call, the reply and the lines it adds to the activity log. You can read the whole log withGET /v1/sandboxes/$S/events.

Every step except the last one uses features that work today. The last step, marked PLANNED, is the tested, ready-made template and guide that are coming.

  1. SPAWNBOX API

    Make a template with a browser

    The base disk has no apt package lists, so run apt-get update first. The response is 202 with a build. Wait until the build is ready, or the next step gives 409.

    REQUEST
    POST /v1/templates
    
    {"name": "browser",
     "setup": [
       "apt-get update && apt-get install -y chromium python3-pip",
       "pip install --break-system-packages playwright"],
     "resources": {"vcpus": 2, "memory_mib": 2048}}
  2. SPAWNBOX API

    Start it with a list of sites

    This browser can open news.ycombinator.com and no other site. Private addresses and cloud metadata are always blocked.

    REQUEST
    POST /v1/sandboxes
    
    {"template": "browser",
     "egress": {"mode": "allowlist",
                "allow": ["news.ycombinator.com"]}}
    • sandbox.createdsbx_6wd1j8fn3ka0tz5r
  3. IN THE SANDBOX

    The agent runs its script

    The agent writes a Playwright script that opens the page, reads it and saves a screenshot. Then it runs the script.

    REQUEST
    PUT  /v1/sandboxes/$S/files?path=browse.py
    POST /v1/sandboxes/$S/exec
    
    {"cmd": "python3 browse.py", "timeout_s": 120}
    • net.dnsnews.ycombinator.com
    • net.connectionnews.ycombinator.com:443
  4. IN THE SANDBOX

    A page asks for another site

    A script or an ad on the page tries to load a different site. The DNS answer is REFUSED, and the log shows the name.

    • net.dnsads.example.net · REFUSED
  5. YOUR APP

    Get the screenshot

    Read any file the browser wrote: screenshots, PDFs or downloads.

    REQUEST
    GET /v1/sandboxes/$S/files?path=shot.png
  6. SPAWNBOX APIPLANNED

    Coming: a ready-made browser template

    A template with Chromium and Playwright installed and tested, and a step-by-step guide.

0202

Good to know.