---
type: analysis
slug: guide-sandboxes-for-agents-e2b-daytona-modal
title: "Sandboxes for agents: E2B, Daytona, Modal"
description: "E2B, Daytona, and Modal sell isolated compute so agents can run untrusted code. E2B stores a running sandbox as a template snapshot that loads in about 80ms; Hobby max continuous runtime is 1 hour and Pro is 24 hours, and paused sandboxes are kept indefinitely with no compute charge. Daytona default"
published_at: 2026-11-10T10:00:00.000Z
topics: ["tools","developer_tools"]
source_urls: ["https://docs.e2b.dev/template/how-it-works","https://docs.e2b.dev/billing","https://docs.e2b.dev/byoc","https://www.daytona.io/docs/en/sandboxes/","https://modal.com/docs/guide/sandboxes.md","https://modal.com/docs/guide/sandbox-snapshots","https://e2b.dev/pricing","https://www.daytona.com/pricing","https://modal.com/pricing","https://developers.cloudflare.com/sandbox/","https://docs.e2b.dev/changelog","https://vercel.com/docs/sandbox/pricing","https://runloop.ai/pricing","https://docs.e2b.dev/faq/sandbox-lifetime"]
author: "Andrey Reshetnikov"
author_profile: https://newruntime.com/owner-profile.md
---
E2B, Daytona, and Modal sell isolated compute so agents can run untrusted code. E2B stores a running sandbox as a template snapshot that loads in about 80ms; Hobby max continuous runtime is 1 hour and Pro is 24 hours, and paused sandboxes are kept indefinitely with no compute charge. Daytona defaults to Linux containers (under 90ms) and adds Linux VM, Windows, macOS, and GPU classes; pause/resume is VM-only; Starter sessions last up to 1 hour and Team up to 48 hours. Modal Sandboxes run on gVisor or a VM, default to 5 minutes and cap at 24 hours, and bill max(request, actual) at non-preemptible rates (3x list). Pick E2B for pause/resume persistence and Embed/BYOC; Daytona for multi-OS/GPU and longer Team sessions; Modal for burst billing and GPU on the same platform. Cloudflare Sandboxes, Vercel Sandboxes, and Runloop Devboxes are the documented alternatives.

*Field guide compiled 2026-11-06 from the official documentation, pricing pages and changelogs linked below; every line links to the page that states it.*

## What it does

- **sandbox template.** E2B snapshots a running sandbox (filesystem plus running processes) after template build so later spawns load that saved state. How: Build with Template.build (JS) or Template.build (Python); spawn from the template with the E2B SDK. [source](https://docs.e2b.dev/template/how-it-works)
- **Snapshots.** E2B serializes the sandbox filesystem and running processes so the sandbox can be loaded later in about 80ms with processes already running. How: Specified start command, optional ready command (default wait 20 seconds if start command is set), then snapshot. [source](https://docs.e2b.dev/template/how-it-works)
- **Max continuous runtime.** Time an E2B sandbox can run without being paused: 1 hour Hobby, 24 hours Pro, custom Enterprise. Pause and resume reset the window. How: Pause with sbx.pause(); resume later. Hobby/Pro limits are plan ceilings, not a kill of paused state. [source](https://docs.e2b.dev/billing)
- **Paused sandbox retention.** Paused E2B sandboxes are kept indefinitely on Hobby, Pro, and Enterprise; compute is not billed while paused or killed. How: sbx.pause() to stop compute billing; sbx.kill() to release permanently; optional auto-pause on inactivity. [source](https://docs.e2b.dev/billing)
- **E2B Embed (self-hosted).** Self-host the E2B runtime on one Linux machine you operate (KVM host, cloud VM, or a Kubernetes node). BYOC is a separate Enterprise managed deploy in your VPC. How: Install E2B Embed (Apache-2.0) yourself; BYOC is AWS, GCP, or Azure for Enterprise via enterprise@e2b.dev. [source](https://docs.e2b.dev/byoc)
- **Container.** Daytona default Linux container runtime for processes and code; docs list spin-up under 90ms, dynamic builds, and Docker images. How: daytona.create() (Python Daytona(); TypeScript new Daytona(); CLI daytona create; POST https://app.daytona.io/api/sandbox). [source](https://www.daytona.io/docs/en/sandboxes/)
- **VM sandboxes.** Daytona Linux VM or Windows VMs with fork, pause/resume, snapshot-from-sandbox, and nested virtualization (Linux VM only). Distinct from container sandboxes. How: Create a snapshot with sandboxclass LINUXVM (or windows- snapshots), then daytona.create(CreateSandboxFromSnapshotParams(snapshot=...)). VM sandboxes currently only come from existing VM snapshots. [source](https://www.daytona.io/docs/en/sandboxes/)
- **Pause / resume sandboxes.** Daytona preserves filesystem and memory on Linux VM and Windows; container sandboxes cannot pause (stop keeps filesystem only). How: sandbox.pause() / daytona pause / POST .../pause; resume with start. Auto-pause default 60 minutes on pause-capable non-ephemeral VMs. [source](https://www.daytona.io/docs/en/sandboxes/)
- **gVisor.** Modal container runtime with strong isolation for most Sandbox workloads. GPU Sandboxes are only supported with this runtime. How: modal.Sandbox.create(..., runtime="gvisor") or leave runtime unset to let Modal choose. [source](https://modal.com/docs/guide/sandboxes.md)
- **VMs.** Modal VM runtime with its own Linux kernel for Docker-in-sandbox, FUSE, or nested cgroups. Nested virtualization is Enterprise via experimentaloptions enablenestedvirt. How: modal.Sandbox.create(app=..., runtime="vm") or JS { runtime: "vm" }. [source](https://modal.com/docs/guide/sandboxes.md)
- **timeout.** Modal Sandboxes default to a 5-minute maximum lifetime; timeout can be set up to 24 hours. Longer work should use Filesystem Snapshots then a new Sandbox. How: Sandbox.create(..., timeout=1060) (seconds in Python) or timeoutMs in JS. [source](https://modal.com/docs/guide/sandboxes.md)
- **Filesystem Snapshots.** Copy of a Modal Sandbox root filesystem as an Image used to start new Sandboxes; default retention 30 days; Volumes are not included. How: image = sb.snapshotfilesystem(); optional ttl= (seconds) or ttl=None to retain indefinitely; then Sandbox.create(image=image, app=app). [source](https://modal.com/docs/guide/sandbox-snapshots)
- **Memory Snapshots.** Copy of Modal Sandbox memory and filesystem; restore is an exact clone. Default retention 7 days and cannot currently be extended. Experimental APIs. How: Sandbox.create(..., runtime="vm", experimentalenablesnapshot=True) then sb.experimentalsnapshot(); restore with Sandbox.experimentalfromsnapshot(snapshot). [source](https://modal.com/docs/guide/sandbox-snapshots)

## Modes

- **Hobby.** E2B free tier: sessions up to 1 hour, 20 concurrent sandboxes, $100 one-time credits, default CPU and RAM. [source](https://e2b.dev/pricing)
- **pro.** E2B paid tier: $150/month plus per-second usage; sessions up to 24 hours; 100–1,100 concurrent sandboxes; custom CPU and RAM. [source](https://e2b.dev/pricing)
- **Container.** Daytona default Linux container sandbox class for running processes and executing code. [source](https://www.daytona.io/docs/en/sandboxes/)
- **Linux VM.** Daytona VM class for Linux-specific tools; supports fork, pause/resume, and memory snapshots. [source](https://www.daytona.io/docs/en/sandboxes/)
- **Windows.** Daytona Windows OS VM class (windows-small/medium/large snapshots). [source](https://www.daytona.io/docs/en/sandboxes/)
- **gVisor.** Modal container runtime; required for GPU Sandboxes. [source](https://modal.com/docs/guide/sandboxes.md)
- **runtime="vm".** Modal VM runtime for Docker-in-sandbox and full Linux kernel workloads. [source](https://modal.com/docs/guide/sandboxes.md)
- **Containers.** Cloudflare sandbox environment: full Linux from an image; each instance is a microVM with its own kernel and network; Durable Object scheduling policy in public beta. Alternative: Dynamic Workers for JS/Python/Wasm. [source](https://developers.cloudflare.com/sandbox/)

## Pricing and limits

- **Hobby:** FREE / $100 in credits (+usage costs). $100 one-time usage credit; sessions up to 1 hour; 20 concurrent sandboxes; default sandbox CPU and RAM; no credit card required. Disk 10 GiB Free. Sandbox creation rate 1/sec. Max 8 vCPUs, 8 GiB memory. [source](https://e2b.dev/pricing)
- **pro:** $150 /month (+usage costs). Sessions up to 24 hours; 100 concurrent sandboxes, expandable to 1,100; custom sandbox CPU and RAM. Pricing estimator: Pro+ 600 concurrent +$500/mo; Pro++ 1,100 concurrent +$1,000/mo. Enterprise starts at a $2,000/mo commit, 500 concurrent included. Disk 20 GiB Free. [source](https://e2b.dev/pricing)
- **vCPUs (Hobby / Pro):** $0.000014/s per 1 vCPU; 2 Default $0.000028/s; 4 $0.000056/s; 6 $0.000084/s; 8 $0.000112/s. Charged per second of a running sandbox. Hobby and Pro share these rates. [source](https://e2b.dev/pricing)
- **Memory (GiB) (Hobby / Pro):** $0.0000045/s per 1 GiB; 2 GiB $0.0000090/s; 4 Default $0.0000180/s; 8 GiB $0.0000360/s. Charged per second while running. Default resources in billing docs: 2 vCPU, 512 MiB RAM. [source](https://e2b.dev/pricing)
- **Starter:** $0 + compute / month · $200 one-time free credits. 100 sandboxes / 7 GPU cards / 10 Windows core licenses / 10 Mac reservations; sessions up to 1 hour; 3 organization members. Sandbox size up to 64 cores, 128 GiB memory, 1 GPU. Usage billed per second. No credit card required. [source](https://www.daytona.com/pricing)
- **Team:** $250 + compute / month · $100 / month free credits. 5000 sandboxes / 50 GPU cards / 50 Windows core licenses / 50 Mac reservations; sessions up to 48 hours; unlimited members. Sandbox size up to 64 cores, 128 GiB, 8 GPU cards. [source](https://www.daytona.com/pricing)
- **Memory (per GiB / hour):** RAM Preemptible $0.0113; On demand $0.0162. CPU, memory, and disk billed only while a sandbox is running (pricing FAQ). Volumes On demand $0.000108 per GiB/hour. NVMe SSD $0.000. One core is equivalent to 2 vCPUs where SMT is available and enabled. Compute example: AMD Zen 3 · Intel Ice Lake · AWS Graviton 4 · Apple M4 Preemptible $0.0706 / On demand $0.101 per core/hour. [source](https://www.daytona.com/pricing)
- **Starter (Modal):** $0 + compute / month. $30 / month included compute; up to 3 seats; 100 containers + 10 GPU concurrency; 1 TiB / month free network egress. Sandboxes billed at non-preemptible rates of 3x list price. [source](https://modal.com/pricing)
- **CPU (non-preemptible) Modal Sandbox:** $0.00003942 / core / sec. Physical core (2 vCPU equivalent). Minimum of 0.125 cores per container. Charged max(request, actual). Default request 0.125 CPU cores and 128 MiB memory. [source](https://modal.com/pricing)
- **Memory (non-preemptible) Modal Sandbox:** $0.00000667 / GiB / sec. Sandboxes priced at non-preemptible Function rates (3x list). Volumes $0.09 / GiB / mo (includes 1 TiB / mo free). Team plan: $250 + compute / month with $100 / month free credits. [source](https://modal.com/pricing)

## Recent changes

- 2026-11-02: E2B: streaming file uploads via files.write() iterables; Sandbox.create idempotencyKey; CLI template list pagination (CLI 2.23.0, SDKs 2.62.0 / 2.61.0). Pause/fork/snapshot during another snapshot now returns retryable 503 instead of killing the sandbox. [source](https://docs.e2b.dev/changelog)
- 2026-10-26: E2B: dnsServers allowlist; streamInput() for commands/terminals (SDKs 2.58.0–2.59.0). apiUrl/sandboxUrl deprecated. Rebuild templates built before October 20 for a port-forwarding drop fix. [source](https://docs.e2b.dev/changelog)
- 2026-10-19: E2B: pauseMode full or filesystem on GET sandbox; JavaScript SDK 2.56.0 requires Node.js 22.19.0 or later; Python SDK 2.56.0 requires Python 3.11 or later. Self-hosted DEFAULTFIRECRACKERVERSIONS override. Fixed a regression that slowed pause and resume. [source](https://docs.e2b.dev/changelog)
- 2026-10-12: E2B: filesystem-only snapshots/pauses via mode option; keepMemory deprecated (SDKs 2.55.0). Deprecated POST /sandboxes always enables secured access; old templates return 400 and must be rebuilt. [source](https://docs.e2b.dev/changelog)
- 2026-09-21: E2B: Sandbox.create/connect use POST /v2/sandboxes; SDKs stop presetting timeout and resource fields so API defaults apply; every sandbox is secured (SDKs 2.51.0). CLI e2b sandbox fork (CLI 2.20.0). [source](https://docs.e2b.dev/changelog)
- 2026-09-14: E2B Embed for self-hosted deployments (Docker Compose, Terraform, or Kubernetes) with pinned images. SDK automatic 429 retries (SDKs 2.49.1). [source](https://docs.e2b.dev/changelog)
- 2026-08-03: As of August 1, 2026, E2B no longer accepts access tokens; authenticate the CLI with E2BAPIKEY. Fedora, Alpine, Arch, and NixOS template base images (JS SDK 2.37.0 / Python SDK 2.36.0). [source](https://docs.e2b.dev/changelog)
- 2026-07-21: E2B sandbox forking: sandbox.fork in JavaScript SDK 2.35.0 / Python SDK 2.34.0 snapshots a running sandbox in place and returns independent clones. [source](https://docs.e2b.dev/changelog)

## Alternatives

- **Sandboxes on Cloudflare.** Runs on Workers Paid plan. Container instances are microVMs with their own kernel. Dynamic Workers isolate JS/Python/Wasm without a full Linux VM. You drive start/exec from a Worker (container.start / container.exec). No per-vCPU list rates on this overview page. [source](https://developers.cloudflare.com/sandbox/)
- **Vercel Sandboxes.** Each sandbox is a Firecracker microVM. Hobby: Sandbox Active CPU 5 hours/month, Provisioned Memory 420 GB-hours/month, Concurrent Sandboxes 10, Max Session Duration 45 minutes. Pro/Enterprise Active CPU $0.128/hour and Provisioned Memory $0.0212/GB-hour (iad1); Pro session max 24 hours; concurrent 10,000. CPU billed only while active; memory billed while provisioned. Default timeout 5 minutes. [source](https://vercel.com/docs/sandbox/pricing)
- **Devbox CPU.** Runloop usage: Devbox CPU $0.108 / CPU-hr ($0.00003 / CPU-sec); Devbox Memory $0.0252 / GB-hr ($0.000007 / GB-sec); Devbox Storage $0.00034236 / GB-hr. Trial: $50 Usage Credit, 3 Running Devboxes / 5 blueprints / 10 snapshots / 3 objects. Basic: Free + usage based-compute, 100 GB Free Storage, 1st month FREE. Pro: $250 /month + usage, 1 TB Free Storage, includes Suspend and Resume. [source](https://runloop.ai/pricing)

## Traps

- E2B timeout defaults to 5 minutes and onTimeout defaults to kill, which terminates the sandbox and drops state. Set lifecycle onTimeout to pause (and optional autoResume) or the sandbox cannot be resumed. [source](https://docs.e2b.dev/faq/sandbox-lifetime)
- A single E2B SDK stream is not guaranteed for more than one hour even if the sandbox keeps running; reconnect with commands.connect(pid) / pty.connect(pid). Hobby continuous runtime is still 1 hour without pause. [source](https://docs.e2b.dev/faq/sandbox-lifetime)
- Daytona pause is not supported for container sandboxes; stop preserves filesystem only. GPU sandboxes are ephemeral (autodeleteinterval=0) and do not support auto-pause. Linked sandboxes must be ephemeral and cannot be persisted after stop. [source](https://www.daytona.io/docs/en/sandboxes/)
- Daytona auto-stop defaults to 15 minutes and fires even if internal processes are running. Background scripts (for example npm run dev) and long LLM inference without toolbox/SSH/preview traffic do not reset the inactivity timer. [source](https://www.daytona.io/docs/en/sandboxes/)
- Daytona VM sandboxes can currently only be created from existing VM snapshots; declarative dynamic builds are container-only. Sandboxes docs also cap organization resources at 4 vCPUs, 8GB RAM, and 10GB disk by default (1 vCPU / 1GB / 3GiB default size). [source](https://www.daytona.io/docs/en/sandboxes/)
- Modal Memory Snapshots expire 7 days after creation and cannot currently be extended; snapshotting a Sandbox currently terminates it; open TCP connections close; GPUs cannot be used with memory snapshots; exec-spawned background processes are not restored. [source](https://modal.com/docs/guide/sandbox-snapshots)
- Modal GPU Sandboxes are only supported with runtime="gvisor". Filesystem Snapshots (v1.5 Python / v0.8.0 Go/JS) default to a 30-day TTL (previously indefinite); expired snapshots raise NotFoundError. [source](https://modal.com/docs/guide/sandboxes.md)
- Vercel Hobby Max Session Duration is 45 minutes and sandbox creation pauses after included quotas until the next cycle. Pro Active CPU is $0.128/hour but idle I/O wait is not Active CPU; provisioned memory still bills for the full run (1 minute minimum). [source](https://vercel.com/docs/sandbox/pricing)

Author: [Andrey Reshetnikov](https://newruntime.com/owner-profile.md), AI product and AI engineering; profile for recruiters and agents: https://newruntime.com/owner-profile.json

## Continue in the graph

Next records for an agent, linked to their Markdown twins. Replace `.md` with `.json` for structured fields, including `next_reads`.

- topic hub: [Tools](https://newruntime.com/topics/tools.md): Explore the tools topic hub.
- topic hub: [Developer Tools](https://newruntime.com/topics/developer-tools.md): Explore the developer_tools topic hub.
- collection: [Analysis](https://newruntime.com/analysis.json): Open the latest authorial analysis.
- collection: [Sources](https://newruntime.com/sources/): See the original sources this archive cites.
- whole graph: [discovery graph](https://newruntime.com/discovery-graph.json) (typed nodes and edges) and [site index](https://newruntime.com/site-index.md)
