← Back to Blog
Header image for blog post: Best persistent sandbox platforms for AI agents in 2026
Deborah Emeni
Published 22nd September 2026

Best persistent sandbox platforms for AI agents in 2026

TL;DR: Best persistent sandbox platforms for AI agents

The best persistent sandbox depends on whether your AI agent needs saved files, preserved process memory, or a reusable snapshot, and how many tasks it must run at once.

  1. Northflank: Best for persistent AI agent sandboxes with no fixed session time limit. A fit for teams that want isolated sandbox environments for AI agents and code execution, with fast startup, thousands of concurrent sessions, persistent volumes, and custom environments for coding agents, APIs, scripts, and GPU tasks.
  2. Fly.io Sprites: Best for persistent Linux workspaces that idle between tasks. A fit for teams that need project files and installed tools to survive inactivity, with filesystem checkpoints for rollback.
  3. E2B: Best for preserving agent memory and files between tasks. A fit for teams that need pause and resume to retain process state, with session limits that depend on the plan.
  4. Modal: Best for snapshot-based agent environments and GPU workloads. A fit for teams that want reusable filesystem snapshots, persistent volumes, and SDK-configured execution environments.

Follow the Northflank sandbox quickstart to get started, create an account, or talk to an engineer about your agent’s persistence and concurrency requirements.

A comparison of the best persistent sandbox platforms for AI agents in 2026, covering how persistence works on each platform, GPU support, bring your own cloud (BYOC), and which use cases each fits.

Persistent sandboxes have moved from a niche requirement to something a lot of production AI agent teams are actively evaluating. The reasons are practical: agents that build up a working environment incrementally, maintain a filesystem between executions, or run long-horizon tasks need somewhere to keep state. Ephemeral-only platforms force you to engineer around that.

The platforms covered here approach persistence differently. Some keep filesystem state via volumes. Some offer full pause/resume including memory. Startup speed, concurrency, and support for custom agent environments also vary. This article covers what each platform actually does so you can evaluate them against your specific requirements.

If you're new to the concept, what are persistent sandboxes covers the fundamentals before you get into platform comparisons.

What are the key things to evaluate before choosing a persistent sandbox platform?

Not all persistent sandboxes work the same way under the hood, and the differences matter when you're building production agent workflows.

  • What actually persists? Some platforms persist only the filesystem. Others persist filesystem and memory including running processes. Others use snapshots to create new environments from a saved state. These are meaningfully different capabilities.
  • Is there a session time cap? Some platforms impose a continuous runtime limit before you have to pause. Others impose no fixed session time limit. File retention and uninterrupted process execution are separate considerations.
  • What's the isolation model? MicroVM-based isolation (Firecracker, Kata Containers) and user-space kernel sandboxing (gVisor) offer different tradeoffs between security, performance, and compatibility.
  • Do you need GPU access? Not all sandbox platforms support GPU workloads. If your agents run inference or training, this narrows the list.
  • Can you deploy in your own infrastructure? If your organisation requires execution inside infrastructure it controls, check bring your own cloud (BYOC) support and the provider’s responsibilities.
  • How quickly can it run your agent workload at scale? Check sandbox startup time, concurrency limits, and custom environment support for coding agents, APIs, scripts, and GPU tasks.

What are the top persistent sandbox platforms for AI agents in 2026?

The platforms below cover the main options for teams evaluating persistent sandbox infrastructure today. Each takes a different approach to persistence, isolation, and deployment.

1. Northflank

Northflank provides isolated sandbox environments for AI agents and code execution, with fast startup and support for thousands of concurrent sessions. Run coding agents, scripts, generated APIs, repository builds, and GPU tasks in custom environments, with persistent files for work that continues across sessions.

How persistence works: Attach persistent volumes to retain repositories, generated files, and task artifacts across restarts and pauses. Save files that must survive to the mounted volume: ephemeral files are lost when a sandbox pauses. Pausing stops running processes and terminal sessions; it does not save RAM. Sandboxes have no fixed session time limit.

northflank-sandbox-page.png

Key Northflank offerings:

  • Environments: Persistent and ephemeral sandboxes, configured per workload.
  • Storage: Persistent volumes up to 64 TB, multi-read-write support, and S3-compatible object storage for artifacts and generated files.
  • Isolation: Northflank Cloud uses microVMs for CPU sandboxes and gVisor for GPU sandboxes.
  • Deployment: Self-serve bring your own cloud (BYOC), where Northflank acts as the control plane to run coding agents and their sandboxes in your virtual private cloud (VPC). Sandbox isolation requires a supported runtime on your infrastructure.
  • GPU: On-demand GPU execution for agent tasks that need accelerated compute.
  • Access: APIs, SDKs, and CLI tools for creating environments, executing commands, and managing files.
  • Compliance: SOC 2 Type II and HIPAA compliant, with Business Associate Agreements (BAAs) supported under Enterprise contracts.
  • Startup and concurrency: Sub-second sandbox boot times on Northflank Cloud, with support for thousands of concurrent sessions.
  • Custom workloads: Run coding agents, generated APIs, scripts, test suites, and GPU tasks using your own container images.

Pricing: $0.01667/vCPU-hour, $0.00833/GB-hour, with H100 GPU plans at $2.74/hour all-inclusive (CPU and RAM included). The free developer Sandbox tier includes always-on compute with no sleeping, two free services, one database, and two cron jobs for development and testing. Pay-as-you-go offers self-service CPU and GPU workloads, per-second billing, no seat-based fees, and autoscaling. Enterprise plans offer custom pricing, volume discounts, 24/7 support, service-level agreements (SLAs), single sign-on (SSO), and audit logs. See the full pricing details for additional GPU options and compute plans.

Running AI agents in production?

Northflank sandboxes combine persistent files, fast startup, high concurrency, and custom environments for AI agents and code execution. Run short-lived tasks or keep agent environments running without a fixed session cutoff.

2. Fly.io Sprites

Fly.io Sprites are persistent Linux microVMs built by Fly.io that hibernate when idle and wake on demand.

  • Filesystem: Persists across hibernation (files, installed packages, git repos, and databases on disk all survive)
  • Memory: A warm pause freezes RAM and processes, which resume on a warm wake. A later cold transition discards memory and restarts processes. The platform controls that transition, so memory is not durable across all idle periods.
  • Network config: Open ports and URL settings persist across hibernation
  • Storage: 100 GB filesystem per Sprite, with a local cache backed by durable object storage
  • Wake time: Fly.io describes normal wakes of 100–500 ms and cold starts of 1–2 seconds; requests to a Sprite’s HTTPS URL can wake it automatically
  • Checkpoints: Save filesystem state without interrupting the running environment; process memory is not included
  • Services: Defined processes that restart after a cold wake, allowing servers to return when the environment resumes
  • Isolation: Firecracker microVMs
  • GPU: Not supported on Sprites
  • Bring your own cloud (BYOC): Not available (runs on Fly.io's managed infrastructure)

3. E2B

E2B provides sandboxed code execution with a pause/resume model that preserves filesystem and memory state.

  • Filesystem: Persists on pause/resume
  • Memory: Normal pause preserves memory and running processes. Filesystem-only pause saves files but reboots on resume, losing memory state.
  • Paused sandbox retention: Kept indefinitely, no automatic deletion
  • Continuous runtime cap: 24 hours on Pro and 1 hour on Hobby, with longer Enterprise options
  • Snapshots: Available as a separate feature. Saves filesystem and memory state and can be used to create new sandboxes from a saved state.
  • Isolation: Firecracker microVMs
  • GPU: Not supported in sandboxes
  • Bring your own cloud (BYOC): AWS, GCP, and Azure on Enterprise

4. Modal

Modal supports persistent agent environments through filesystem snapshots, directory snapshots, memory snapshots, and mounted volumes.

  • Filesystem Snapshots: Save the root filesystem as an image for new sandboxes. Default retention is 30 days; expiry can be changed or disabled.
  • Directory Snapshots: Save a selected directory for use in another sandbox. Default retention is 30 days; expiry can be changed or disabled.
  • Memory Snapshots: Alpha. Save filesystem and memory state for up to seven days. Snapshotting terminates the sandbox, excludes GPU support, and does not properly restore background processes launched through command execution.
  • Volumes: Network filesystems (Modal Volumes) can be mounted into sandboxes for persistent storage
  • Isolation: gVisor for standard sandboxes; CPU-only VM Sandboxes are also available in beta
  • GPU: Supported across the platform, but not available when memory snapshots are enabled
  • Bring your own cloud (BYOC): Not available
  • SDK model: Python, JavaScript, and Go clients, with support for custom container images
  • Session limit: Up to 24 hours per sandbox; saved files can be used in another sandbox

How do persistent sandbox platforms compare on pricing?

Pricing checked in September 2026. Hourly equivalents are rounded where needed. Billing models differ across platforms (some bill based on active CPU usage only, others bill for the entire duration the sandbox is running). Verify current rates on each platform's pricing page before making cost decisions.

PlatformCPUMemoryStorageGPUBilling model
Northflank$0.01667/vCPU-hr$0.00833/GB-hr$0.15/GB-monthL4: $0.80/hr, A100 40GB: $1.42/hr, A100 80GB: $1.76/hr, H100: $2.74/hrPer second
E2B$0.0504/vCPU-hr$0.0162/GiB-hr10 GiB Hobby / 20 GiB Pro includedDo not provide GPU computePer second; Pro adds $150/month plus usage
Fly.io Sprites$0.07/CPU-hr$0.04375/GB-hr$0.000683/GB-hr hot; $0.000027/GB-hr coldDo not provide GPU computeActual usage, metered hourly; idle compute is free, retained storage is billed
Modal Sandboxes$0.1419/physical core-hr (2 vCPU)$0.0240/GiB-hrVolumes: $0.09/GiB-month; 1 TiB/month includedL4: $0.80/hr, A100 40GB: $2.10/hr, A100 80GB: $2.50/hr, H100: $3.95/hr, H200: $4.54/hrPer second

Modal charges per physical core (two vCPUs).

Fly.io Sprites pricing update: From October 1, 2026, CPU costs $0.03825/CPU-hour and memory costs $0.021875/GB-hour. Storage rates remain unchanged.

Bring your own cloud (BYOC) support across persistent sandbox platforms

The table below shows how each platform handles bring your own cloud (BYOC) deployment, which clouds are supported, and whether it requires a sales process.

PlatformBring your own cloud (BYOC) availableClouds supportedAccess modelPricing model
NorthflankYes, fully self-serveAWS, GCP, Azure, and supported Kubernetes infrastructure, including on-premises and bare-metalSelf-serve, enterprise contracts available for larger commits (with bulk discounts)Cloud infrastructure costs plus Northflank management charges
E2BYes, limited and not self-serveAWS, GCP, and AzureNot publicly disclosed, need to contact salesCustom Enterprise pricing plus cloud infrastructure costs
ModalNoManaged only——
Fly.io SpritesNoManaged only——

Which persistent sandbox platform fits your situation?

Here's a quick reference for matching your use case to the right platform.

If your situation is...Consider...
You need persistent and ephemeral AI agent sandboxes with custom environmentsNorthflank
You need self-serve deployment of AI agent sandboxes in your own virtual private cloud (VPC)Northflank
You need GPU execution with persistent sandbox filesNorthflank or Modal
You need fast sandbox execution for AI-generated code and agent workloads at high concurrencyNorthflank
You need filesystem state to survive between executions with no session capNorthflank or Fly.io Sprites
You need saved memory and process state across an explicit pause/resumeE2B; Sprites preserves these during warm pauses only
You need to save a filesystem snapshot and spin up new sandboxes from itModal (Filesystem Snapshots)
You want a persistent Linux environment that hibernates when idle and wakes on demandFly.io Sprites
Your workloads are Python-first and primarily ML/inferenceModal

FAQ: best persistent sandbox platforms

Which persistent sandbox platform is best for enterprise teams?

Northflank is a strong fit for enterprise teams that need persistent AI agent sandboxes, high concurrency, custom environments, and GPU execution. It is SOC 2 Type II and HIPAA compliant, with Business Associate Agreements (BAAs) supported under Enterprise contracts. With bring your own cloud (BYOC), Northflank acts as the control plane to run coding agents and their sandboxes in your virtual private cloud (VPC).

Do any of these platforms support GPU workloads in persistent sandboxes?

Northflank supports GPU workloads in both persistent and ephemeral environments. Modal supports GPUs but sandboxes with memory snapshot support enabled cannot run with GPUs. Fly.io Sprites are CPU-only. E2B does not support GPU sandboxes.

Can I use both persistent and ephemeral sandboxes on the same platform?

Yes. Northflank supports both, configured per workload: attach a volume for files you need to retain, or use an ephemeral sandbox for a disposable task. E2B and Modal also support disposable execution and persistence through their pause or snapshot features.

How long do persistent sandboxes last on each platform?

Northflank has no fixed session time limit, and attached-volume files survive pauses and restarts. Fly.io Sprites retains its filesystem when compute idles; warm pauses preserve memory and processes, but cold transitions discard them. E2B retains paused sandboxes indefinitely, with active session limits depending on the plan. Modal sandboxes run for up to 24 hours; filesystem and directory snapshots default to 30-day retention with configurable expiry, while memory snapshots expire after seven days.

Share this article with your network
X