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 second for container boot; total Sandbox startup varies by image and initialization |
| 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; taking one currently terminates the Sandbox and closes open TCP connections. VM Sandboxes are Beta, support Docker and Filesystem Snapshots, but do not support GPUs or Memory Snapshots. Filesystem and Directory Snapshots default to 30-day retention, with configurable TTLs including no expiry.
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/pricing
Last verified 2026-08-18. Corrections land through the update log.