Dory and Modal Sandboxes compared
Modal Sandboxes and Dory both give AI agents a Linux machine to run code in, but they are built for different jobs. A Modal Sandbox is a container you create from code, give an image and a timeout, and run commands in; it lives for 5 minutes by default and at most 24 hours. Dory is a computer an agent keeps: a whole Linux virtual machine of a fixed size, with SSH, Docker and a desktop, billed per second with a cap on each computer every month.
This page sets out public facts from both sides so you can pick the right one. Modal facts come from Modal's own pages, read on 26 November 2026; prices and limits change, so check the linked pages before you decide. Dory facts come from our pricing, tiers and honest limits pages.
Price for the same size
Modal bills Sandboxes per second at $0.00003942 per physical core and $0.00000667 per GiB of memory. These Sandbox rates already include Modal's three-times multiplier over its list price, and a physical core counts as 2 vCPUs (Modal pricing). You pay for the CPU and memory you request for the whole life of the Sandbox, whether it is used or not, or for actual use when that is higher (Sandbox resources). Dory bills per second for a whole size, disk included. Per hour, from the published rates:
| Size | Modal Sandbox | Dory |
|---|---|---|
| 2 vCPU, 4 GB RAM | about $0.238 an hour (1 physical core, 4 GiB) | $0.0288 an hour (ac-2, 40 GB disk) |
| 4 vCPU, 8 GB RAM | about $0.476 an hour (2 physical cores, 8 GiB) | $0.0576 an hour (ac-4, 80 GB disk) |
Modal's Starter plan has no monthly fee and includes $30 of free credit every month; the Team plan costs $250 a month and includes $100 of credit (Modal pricing). Modal lets you set a monthly budget for a workspace; when the spend limit is reached, Modal stops workloads that would cost more (budgets). Dory's vCPUs are shared, and each Dory computer stops charging for compute and its own storage once it reaches its monthly cap ($13.50 for ac-2, $26.10 for ac-4).
Side by side
| Modal Sandboxes | Dory | |
|---|---|---|
| Plans | Starter: no monthly fee, $30 of credit a month. Team: $250 a month, $100 of credit a month. Enterprise: custom (Modal pricing) | No plans or monthly fee. Prepaid credit, $20 to $100 per PayPal payment; no trial (pricing) |
| Kind of machine | A container from a custom image you choose, run under gVisor or in a virtual machine with its own Linux kernel; Modal picks the runtime unless you set it (Sandboxes) | One kind: a Linux (Debian 13) virtual machine (honest limits) |
| How long it runs | 5 minutes by default, up to 24 hours; an optional idle timeout ends it sooner (Sandboxes) | Run timer up to 30 days, default pause on expiry with memory kept; always-on mode runs with no timer (timeouts) |
| Saving state | Filesystem and directory snapshots, kept 30 days by default or for good if you opt out of expiry; memory snapshots are in alpha, end the Sandbox when taken and expire after 7 days (snapshots) | Saved memory is kept 30 days, then the computer is stopped with its disk; stored disk costs $0.05 per GB-month, inside the cap (pricing, honest limits) |
| Account limits | 250 containers at once on Starter, 10,000 on Team (Modal pricing) | 2 computers at once at Tier 1, 6 at Tier 2, more by agreement at Tier 3 (tiers) |
| Access | SDKs for Python, JavaScript and Go; you run commands with exec (Sandboxes) |
SSH, Docker, a desktop stream, a computer-use API and a Playwright endpoint on the same machine; SDKs for Python and TypeScript |
| Incoming connections | None by default; you list the ports to open when you create the Sandbox and they are served through tunnels on a Modal domain (networking) | A preview exposes a port you choose through a private HTTPS address, with optional share links (previews) |
| GPUs | Yes, under gVisor; GPU Sandboxes can be preempted (Sandbox resources) | Not yet (honest limits) |
When Modal is the better choice
- You run many short tasks, each in a fresh container from your own image, and want to start them from Python, JavaScript or Go.
- You need GPUs: Dory has none yet (GPU compute is coming soon).
- You want a large number of machines at once: Modal's plans allow hundreds or thousands of containers.
- Your use fits in the free monthly credit: Modal's Starter plan includes $30 of credit every month; Dory has no trial.
- You want memory snapshots, filesystem snapshots or directory snapshots you can mount into another Sandbox.
When Dory is the better choice
- Your agent keeps one machine for days or weeks: a Modal Sandbox lives at most 24 hours (Sandboxes), while a Dory computer can run for up to 30 days on a timer or with no timer at all.
- You want a lower price for the same size: from the published rates, a Dory computer costs about an eighth of a Modal Sandbox of the same CPUs and memory per hour, with disk included.
- You want each machine capped automatically: every Dory computer has a monthly cap, so a machine left running all month costs at most its cap for compute and its own storage.
- You want SSH, a desktop and a computer-use API on the machine without setting them up yourself.
- You want memory kept when the machine pauses, and kept for 30 days.
Moving over
Dory has its own API; Modal's SDKs cannot point at it. Start with the quickstart and the Python and TypeScript SDKs.
Modal is a trademark of its owner and is named here only to compare published facts. Dory is not affiliated with or endorsed by Modal.