Welcome to Modbox

On-demand cloud sandboxes for AI agents, code execution and browser automation

View as Markdown

Modbox lets you spin up isolated, containerized environments in seconds — directly from your code or via API. Each sandbox is a fully independent Linux container running in the cloud, accessible via HTTPS, with a lifecycle you control.

What is a sandbox?

A sandbox is a short-lived, isolated container that runs a Docker image of your choice. Every sandbox gets:

  • A unique HTTPS URL to access the running service
  • A configurable time-to-live (TTL) so resources are never wasted
  • Full environment variable injection at provision time
  • Optional readiness probing — Modbox waits until the container is actually ready

How it works

1

Choose an image

Pick a pre-built Modbox image or bring your own Docker image. Images can include anything — a browser, a code interpreter, a full IDE server, an MCP server.

2

Provision a sandbox

Call POST /sandboxes/provision with a task_id and optional image_id. Modbox schedules the container and returns immediately with status: provisioning.

3

Wait for ready

Poll GET /sandboxes/detail/{sandbox_id} or call POST /sandboxes/wait to block until status: running. The sandbox_url field contains the live HTTPS endpoint.

4

Use the sandbox

Send HTTP requests, open a WebSocket, connect a browser CDP client — whatever your image exposes is available at the sandbox URL.

5

Destroy when done

Call POST /sandboxes/destroy or let the TTL expire. All resources are cleaned up automatically.

Key concepts

ConceptDescription
SandboxA running container instance with its own URL and lifecycle
ImageA Docker image definition stored in Modbox, optionally linked to a private registry
WorkspaceA team namespace that groups sandboxes, images, and members with RBAC
RegistryEncrypted Docker registry credentials for pulling private images
TTLA hard time limit (60s–24h) after which a sandbox is auto-destroyed
  • 🤖 AI coding agents — Give each agent a fresh, isolated environment to write and run code without risk
  • 🌐 Browser automation — Provision Chromium sandboxes for web scraping, testing, and AI browser agents
  • Code execution — Safe multi-language code execution for education platforms and dev tools
  • 🛠️ Dev environments — On-demand preview environments that spin up in seconds