back

AI sandboxes and agents

7 min read5 platformsprices checked 9 Nov 2026

AI agent sandboxes compared: E2B, Modal, Daytona, Cloudflare and GPU Flow (isolation, persistence, price)

Five places to give an AI agent a computer of its own. They look alike on a landing page and behave very differently once you ask what isolates them, what survives a stop and what an hour costs.

GPU Flow team. Published on 9 November 2026.

Every platform here was checked on its own website on 9 November 2026: documentation for isolation and lifecycle, pricing pages for money. Where a page did not state something, this article does not either. Where a rival does something better than we do, it says so.

What is an AI agent sandbox?

An isolated computer where an AI agent can run code, install packages and touch files without touching yours. The isolation matters because the code is written by a model, and sometimes by a model following instructions it found on a web page.

In practice the term covers two different products. The first is the ephemeral sandbox: your application creates one through an SDK for each task or each user, runs the generated code, reads the result and throws it away, often within seconds. The second is the persistent workspace: a machine a developer or an agent works in for hours, that keeps its repository and its tools between sessions. E2B, Modal, Daytona and Cloudflare are mostly the first kind, with options to persist. GPU Flow Sandboxes are the second kind.

Isolation: what separates your sandbox from everyone else’s

Containers share the host’s kernel; virtual machines bring their own. A kernel of its own is a stronger boundary against code that tries to escape, which is why platforms that run untrusted code at scale tend to use lightweight VMs or a userspace kernel.

platformisolation, as each one documents it
E2BEach sandbox is "a fast, secure Linux VM created on demand".
ModalgVisor, a userspace kernel from Google, by default; a VM runtime with its own Linux kernel is also available.
DaytonaLinux containers by default, each with its own kernel, filesystem and network stack per its docs; Linux VMs as an option.
CloudflareEach Containers instance is "a microVM with its own kernel and network".
GPU FlowA Linux container running as a non-root user, in a space of its own per customer with network rules that keep customers apart. Not a microVM.

If your agent runs code from untrusted users at scale, the microVM and gVisor options give you the stronger boundary, and that is a point in their favour. A GPU Flow Sandbox is designed around one customer’s own work: your code, your agent, your repository.

Persistence: what survives a stop

This is where the platforms differ most, and where a sandbox that looked cheap can turn expensive: if the filesystem disappears at every stop, someone has to rebuild it, and that takes time and tokens.

platformfiles after a stopsession and idle limits
E2BPause keeps the filesystem and the memory, including running processes; a paused sandbox is kept indefinitely.Up to 1 hour running on Hobby and 24 hours on Pro; the count restarts after a pause and resume.
ModalWhen a sandbox ends its files go with it, unless you use Volumes or Filesystem Snapshots (Modal recommends snapshots past 24 hours).Default lifetime of 5 minutes, configurable up to 24 hours; optional idle timeout.
DaytonaContainer sandboxes keep their filesystem through stop and start; memory is cleared; archived after 7 days stopped.Auto-stop after 15 minutes without activity by default.
CloudflareDisk and memory end when the instance stops; keep files with snapshots (public beta, kept 30 days) or a mounted R2 bucket.Inactivity timeout you set, up to 6 hours; no guaranteed run time.
GPU FlowA persistent network disk survives pauses and even deleting the Sandbox; memory is lost on pause.Auto-pause after an idle period you choose, from 10 minutes to 4 hours; no fixed session length.

Price: what one hour of a sandbox costs

To compare like with like, each row prices the same machine as our entry plan, 4 vCPU and 8 GB of memory, for one hour, from each platform’s published unit prices. Rivals in US dollars as they publish them, ours in euros, nothing converted.

platformconfigurationone hourplan, credit and storage
E2B4 vCPU, 8 GiB≈ $0.33Hobby: $100 one-time credit; Pro: $150 a month plus usage. Sandbox disk included.
Modal2 cores (4 vCPU), 8 GiB≈ $0.48Non-preemptible sandbox rate. Starter plan: $30 of credit a month. Volumes $0.09 per GiB a month beyond the free allowance.
Daytona4 vCPU, 8 GiB≈ $0.33$200 of free compute. Storage billed per GiB after the first 5.
Cloudflarestandard-4: 4 vCPU, 12 GiB, 20 GB≈ $0.40Needs Workers Paid ($5 a month, usage included). Shown at full CPU use; CPU is billed only when used.
GPU FlowStarter: 4 vCPU, 8 GB€0.15Billed per active hour. Persistent disk €0.10 per GB a month, billed while it exists.

E2B, Modal, Daytona and Cloudflare prices checked on 9 November 2026 on their pricing pages, in USD and not converted. GPU Flow prices in EUR and live. Sources: e2b.dev/pricing, modal.com/pricing, www.daytona.io/pricing, developers.cloudflare.com/containers/pricing/

Read the hour column with care, because the billing models differ. Everyone else bills per second, so a sandbox that lives for twenty seconds costs twenty seconds; for that workload they are the better fit. We bill per active hour, and a Sandbox pauses on its own after the idle period you choose. Cloudflare bills CPU only while it is used, so its real figure is usually below the one shown. And none of the rival rows includes the agent: on GPU Flow, Claude Code or OpenCode comes installed.

How this works on GPU Flow

A GPU Flow Sandbox is a cloud machine in our data centre in Spain that you create in a minute from the panel or the CLI and reach over SSH with your own key. There is no browser access: you connect from your terminal or your editor, as you would to any server.

It can boot with Claude Code or OpenCode already installed and connected to Token Factory, our open-source model API, over the internal network. Claude Code works with your own Anthropic account or with an open-source model paid from your Token Factory credit; OpenCode lets you pick the model inside the Sandbox. The tokens are billed separately from the machine.

There are three sizes with a fixed price per active hour: Starter (4 vCPU, 8 GB) €0.15, Pro (8 vCPU, 32 GB) €0.30, Team (16 vCPU, 64 GB) €0.55. The disk where your files live is separate, at €0.10 per GB a month (€5.00 for 50 GB): it keeps billing while the Sandbox is paused, and if you delete the Sandbox the disk stays so you can attach it to another one, billing for as long as it exists.

When you stop working, the Sandbox pauses itself after the idle period you set, from 10 minutes to 4 hours, and the hourly rate stops. Your files are still on the disk when you come back; whatever was in memory is not.

One limit to know before you choose: there is no GPU inside a Sandbox. The models run on our GPUs through Token Factory, and if you need the GPU itself, that is our dedicated GPU product.

Where the others are a better fit

Being straight about this saves you a migration later. Choose one of the others if:

  1. 1You run untrusted code from many users and want a VM-level boundary per run: E2B and Cloudflare document a microVM per sandbox, Modal offers gVisor or a VM runtime.
  2. 2You need to resume exactly where you left off, processes and memory included: E2B pause keeps the memory, we do not.
  3. 3Your sandboxes live for seconds and you create thousands a day from code: per-second billing and an SDK built for that are what you want.
  4. 4You need a GPU inside the sandbox itself: Modal and Daytona offer GPU sandboxes; ours have none.
  5. 5Your stack already lives on Cloudflare Workers and you want the sandbox next to it.

Which agent sandbox should you pick?

If none of the above settles it, ask yourself who starts the sandbox and how long it lives:

  1. 1Your application creates one per task and throws it away: E2B, Modal, Daytona or Cloudflare.
  2. 2A developer, a team or a long-running coding agent works in it for hours and expects to find everything there tomorrow: a persistent workspace like GPU Flow.
  3. 3You want Claude Code or OpenCode running in the cloud without setting anything up, paid in euros: GPU Flow.

Isolation, persistence and limits checked on 9 November 2026 in each platform’s documentation. Sources: docs.e2b.dev/sandbox/persistence, modal.com/docs/guide/sandboxes, www.daytona.io/docs/en/persistence/, developers.cloudflare.com/sandbox/concepts/lifetime/

Prices and limits change

Every rival figure in this article was copied from its official page on the date shown, in its original currency. Sandbox platforms change plans often; check the source links before you commit, and tell us if something here has gone out of date.

A persistent Sandbox with your agent ready

Claude Code or OpenCode preinstalled, SSH access, a disk that keeps your work and auto-pause so you only pay the hours you use.