Modal Sandboxes & Software Factory¶
Toolkit for provisioning, managing, and snapshotting isolated cloud execution environments on Modal with OpenSSH, Cloudflare Tunnel ingress, and integrated AI developer tooling.
Architecture Overview¶
flowchart TD
subgraph Client["Control Surfaces"]
CLI["modal-sandbox CLI"]
WebUI["Web Dashboard & REST API<br/>(sandbox/function.py)"]
end
subgraph ModalCloud["Modal Cloud Infrastructure"]
Runner["Unified Sandbox Runner<br/>(sandbox/launcher.py)"]
subgraph Sandbox["Modal Sandbox Environment"]
direction TB
Runtime["Runtime: Standard Container or Linux VM (Docker)"]
Workspace["Workspace (/root/<name>)<br/>Git Repository & Python Virtual Environment"]
subgraph Services["Network Ingress & Services"]
SSH["OpenSSH Server (Port 2222)"]
Tunnel["Cloudflare Ingress (Port 3000)"]
AgentTools["AI Dev Tooling:<br/>T3 Code (3775), OpenCode (4096),<br/>Antigravity Daemon, Herdr, Pi Agent"]
end
end
Volume["Persistent Modal Volumes<br/>(t3code-usage-v1, Gradle Caches)"]
Snapshots["Filesystem Snapshots<br/>(modal.Image Copy-on-Write)"]
end
CLI --> Runner
WebUI --> Runner
Runner --> Sandbox
Sandbox -.-> Volume
Sandbox -.-> Snapshots
Key Capabilities¶
- Zero-Config Standalone Sandboxes: Launch disposable cloud development instances in seconds with
modal-sandbox --name <sandbox-name>, requiring only a standard Modal account. - Dual Runtimes: Choose between lightweight standard container sandboxes and full Linux VM sandboxes (
--vm) equipped with Docker-in-Docker and custom kernel privileges. - Hermetic Ingress: Automatic Cloudflare Tunnel provisioned on port 3000 alongside OpenSSH on port 2222 with zero-friction SSH config registration (
ssh <sandbox-name>). - Filesystem Snapshotting: Instant copy-on-write image capture (
modal-sandbox --snapshot <id>) and resumption (modal-sandbox --from-snapshot <image-id>). - Integrated AI Developer Tooling: Turnkey provisioning for T3 Code, Antigravity ACP, OpenCode Go, Pi Agent, Herdr, and Playwright-ready headless Chrome.
- Serverless Web Control Plane: Deploy a lightweight FastAPI control plane on Modal (
modal deploy sandbox/function.py) providing a unified web dashboard and REST API.
Quick Navigation¶
-
Launch your first sandbox in under 60 seconds with no credentials beyond
modal setup. -
Explore all command-line options, feature flags, runtime configurations, and snapshot actions.
-
Understand the unified runner, dual execution runtimes, network ingress, and secret lifecycle.
-
Connect T3 Code, Antigravity, OpenCode, and Pi Coding Agent to live sandboxes.
-
Operate the serverless web management dashboard and REST APIs across all Modal apps.
-
Browse the collection of 93+ Architecture Decision Records documenting design choices.