Modal Sandboxes
Modal Sandboxes are isolated containers on Modal's serverless infrastructure for safely running untrusted code, including code produced by LLM-based agents. They run on a gVisor-based container runtime by default and can be opted into a full Linux VM for workloads that need a real kernel. They are used by AI coding-agent platforms and other systems that need to spin up many concurrent execution environments.
| Pricing model | Per-second, billed on max(resource request, actual usage) |
|---|---|
| Pricing The headline compute price as the provider states it. Sorting ranks prices stated per vCPU over time, converted to hourly. Other pricing models sort after, unranked. | $0.00003942 per CPU core/sec, $0.00000667 per GiB memory/sec |
| Free while idle Whether a stopped, paused, or sleeping sandbox costs nothing. | ✕ |
| Elastic Resources flex with what the sandbox actually uses, and the bill follows: yes when the provider bills on active or observed use, no when capacity is reserved or allocated and billed while it runs. | – |
| Memory snapshots Whether RAM state survives a pause and resume, not just disk. | ✓ |
| Wake on request Whether a stopped sandbox wakes automatically on inbound traffic. | ✕ |
| Start / resume Typical time from create or resume to running. Sorting ranks stated times, converted to seconds; claims with no figure sort after, unranked. | ~1 s container boot; warm-up can range from seconds to minutes |
| Max runtime The longest a sandbox may run. | 24 h |
| Isolation The isolation technology between sandboxes. | gVisor container runtime (default); full Linux VM with VM Sandboxes (Beta) |
| GPUs Whether GPU instances are available for sandboxes. | ✓ |
| Docker Whether Docker containers can run inside the sandbox. | ✓ |
| SDKs | Python, JavaScript, Go |
✓ yes · ✕ no · – no cited public fact.
Memory Snapshots are Alpha and expire after 7 days. They terminate the Sandbox when taken, close open TCP connections, do not support GPUs, and require the same exact instance type for restoration. Filesystem and Directory Snapshots default to 30-day retention, with configurable TTLs including no expiry. VM Sandboxes are Beta and the recommended way to run Docker in a Sandbox; they do not support GPUs, support Filesystem Snapshots, and limit VM Memory Snapshots to enabled customers. Unlike CPU Sandboxes, GPU Sandboxes are subject to preemption.
Sources
- https://modal.com/docs/guide/vm-sandboxes
- https://modal.com/docs/guide/sdk-javascript-go
- https://modal.com/blog/modal-product-updates-oct-2025
- https://modal.com/docs/guide/sandboxes
- https://modal.com/blog/mem-snapshots
- https://modal.com/docs/guide/memory-snapshots
- https://modal.com/docs/guide/sandbox-snapshots
- https://modal.com/docs/guide/timeouts
- https://modal.com/docs/sdk/py/latest/modal.Sandbox
- https://modal.com/blog/modal-product-update-sep-2025
- https://modal.com/blog/directory-snapshots-resumable-project-state-for-sandboxes
- https://modal.com/blog/gpu-mem-snapshots
- https://modal.com/docs/guide/sandbox-resources
- https://modal.com/products/sandboxes
- https://modal.com/docs/guide/cold-start
- https://modal.com/docs/guide/billing
- https://modal.com/pricing
- https://modal.com/blog/scaling-to-1-million-concurrent-sandboxes-in-seconds
- https://modal.com/blog/unpacking-sandbox-startup-latency
Last verified 2026-09-26. Corrections land through the update log.