All comparisons

Best platforms for long-running AI agents (2026)

The best platforms for long-running AI agents keep the agent's state when compute stops, either by pausing a sandbox with its memory or by keeping the workspace on storage that any machine can pick up. Archil does both: tool calls run as serverless commands against a persistent disk, and Firecracker sandboxes pause with memory and processes intact, so compute bills only while the agent works. Pick Modal when the agent needs GPUs, E2B or Daytona for an established sandbox API, and AWS Lambda durable functions, Step Functions or Fargate when everything has to stay in your AWS account.

Updated . Competitor facts are from each vendor's own docs and pricing pages.

The short list

  1. Archil: Best for agents that work for hours in bursts, where state must outlive every machine and idle time shouldn't bill
  2. Modal: Best for agents that need GPUs, or that mix agent sandboxes with inference and training in one platform
  3. E2B: Best for agents that pause between user turns and must resume with exactly the same memory and files
  4. Daytona: Best for long-lived development environments that stop when idle and come back with their files
  5. Northflank: Best for teams that want agents, services and databases on one platform, in Northflank's cloud or their own
  6. Fly.io Machines: Best for agents that run as ordinary long-lived processes close to users, in many regions
  7. AWS Lambda and Fargate: Best for teams that must keep agent compute inside their AWS account and already run on Lambda or ECS
  8. Vercel: Best for agents built into a Vercel app, with short tool calls and occasional sandboxes

Side by side

PlatformLongest single runPause and resumeKept after a stopBilling basisGPUs
ArchilSandbox session 24 h, then it pauses; tool calls 5 min eachYes, with memory and processesRoot filesystem and mounted disksSandboxes per vCPU-hour and GiB-hour while running; tool calls per 1,000Not offered
ModalFunctions 24 h; Sandboxes 5 min by default, up to 24 hMemory snapshots (alpha) restore into a new sandboxVolumes; filesystem snapshotsPer second for CPU and memoryYes
E2B1 h per session on Hobby, 24 h on ProYes, filesystem and memoryPaused sandboxes, with no expiryPer vCPU-second and GiB-secondNot documented
DaytonaNo limit unless you set one; stops after 15 min idle by defaultVM sandboxes, with memoryFilesystem; volumesPer second for vCPU, memory and storageYes, in ephemeral GPU sandboxes
NorthflankNo limit stated for sandboxesPause scales to zero; ephemeral storage is lostVolumesPer second for vCPU and memoryYes
Fly.io MachinesNo limit statedSuspend with memory, recommended for 2 GB or lessRoot filesystem and volumesPer second while runningYes; Fly says it is scaling back GPU plans
AWS Lambda and FargateLambda 30 min; durable functions up to 1 year; Lambda MicroVMs 8 h; Fargate no limit statedDurable functions suspend during waits; MicroVMs suspend with memory and diskEFS or S3 Files mounts; EBS or EFS on FargateLambda per request and GB-second; Fargate per second, 1 min minimumNot on Fargate
VercelFunctions 300 s (Hobby), 800 s (Pro); Sandbox 45 min (Hobby), 24 h (Pro) per sessionSandboxes restore the filesystem, not memoryPersistent sandbox filesystem; DrivesActive CPU time plus memoryNot documented

What to look for

  • How long one run can last

    Limits range from minutes to a day. AWS Lambda stops a function at 30 minutes; Vercel Functions at 300 s on Hobby and 800 s on Pro. Modal Functions, E2B Pro sandboxes, Vercel Sandbox on Pro and Archil sandboxes allow sessions of up to 24 hours. An agent that runs longer needs a way to stop and pick up where it left off.

  • What survives when compute stops

    Some platforms pause a VM with memory and running processes (Archil, E2B, Daytona VM sandboxes, Fly.io Machines). Others keep only the filesystem (Vercel Sandbox, Daytona container sandboxes), or nothing unless you attach a volume (Northflank, Fargate, Cloudflare Sandbox).

  • What you pay while the agent waits

    Most of an agent's wall-clock time is spent waiting on the model. A sandbox that stays up between tool calls bills for that wait. Per-call execution, or a sandbox that pauses when idle, doesn't.

  • Where the loop runs and where tools run

    The agent loop can live in your backend or a durable workflow engine, and only the tool calls need an isolated machine. See two places to run an agent.

  • Isolation and hardware

    Agent-written code should run in a VM boundary (Firecracker or gVisor), not a shared-kernel container. Check GPU support if the agent trains or serves models.

Each option in detail

Best for: agents that work for hours in bursts, where state must outlive every machine and idle time shouldn't bill

Archil gives an agent two ways to run code, both on the same durable disk. Serverless tool calls run one command in a fresh Firecracker microVM with the disk mounted and bill per call, so nothing runs between turns. Persistent sandboxes are Firecracker microVMs whose root filesystem is an Archil disk: stop keeps the files and installed packages, pause also keeps memory and running processes, and a fork copies a running sandbox in milliseconds.

Strengths

  • Stopped and paused sandboxes don't accrue compute charges; a sandbox pauses after 30 minutes idle by default
  • Commands inside a sandbox have no time limit; a session pauses at 24 hours with its processes intact
  • Tool calls cost $0.05 per 1,000, with execution included
  • The workspace disk also mounts in E2B, Daytona, Modal and Vercel Sandbox, and is readable over S3
  • Egress firewall and credential brokering keep API keys out of the sandbox (Developer plan and up)

Tradeoffs

  • No GPUs; use Modal, Daytona or Northflank for GPU work
  • Public sandboxes and tool calls run only in three AWS regions (us-east-1, us-west-2, eu-west-1); other clouds need BYOC
  • A tool call is capped at 5 minutes, 2 vCPU and 4 GiB; longer work belongs in a sandbox
  • Sessions last at most 30 minutes on the Free plan

Best for: agents that pause between user turns and must resume with exactly the same memory and files

Every E2B sandbox is a Firecracker microVM. Pausing saves both the filesystem and memory, and paused sandboxes have no time-to-live. Sessions last up to 1 hour on Hobby and 24 hours on Pro; billing is per vCPU-second and GiB-second while running.

Strengths

  • Pause and resume keep memory, with no expiry on paused sandboxes
  • Established SDKs for code interpreters and agent tools
  • Paused sandboxes aren't billed for compute

Tradeoffs

  • Pausing takes time in proportion to memory (E2B cites about 4 s per GiB)
  • No GA shared volume; Volumes are in private beta
  • Sandbox disk is 10 GiB on Hobby and 20 GiB and up on Pro

Best for: long-lived development environments that stop when idle and come back with their files

Daytona sandboxes have no maximum lifetime unless you set one. They auto-stop after 15 idle minutes by default and auto-archive after 7 days stopped. VM sandboxes can pause with memory; container sandboxes keep the filesystem but not memory on stop. Volumes are FUSE mounts shared across sandboxes.

Strengths

  • No lifetime cap; stopped sandboxes are kept until deleted
  • GPU sandboxes with up to 8 GPUs
  • Per-second billing for vCPU, memory and storage

Tradeoffs

  • Container sandboxes can't pause; memory is lost on stop
  • GPU sandboxes are ephemeral
  • Sandbox disk tops out at 10 GB; see Archil vs Daytona

5. Northflank

northflank.com

Best for: teams that want agents, services and databases on one platform, in Northflank's cloud or their own

Northflank runs CPU sandboxes in microVMs and GPU sandboxes under gVisor, with no fixed session limit. Pausing scales a sandbox to zero and stops compute charges; ephemeral storage is wiped, so durable state goes on a volume.

Strengths

  • No session time limit stated
  • Persistent NVMe volumes, up to 64 TB
  • GPUs, and bring-your-own-cloud deployment

Tradeoffs

  • Pause doesn't keep memory or ephemeral files
  • Volumes keep billing while a sandbox is paused

6. Fly.io Machines

fly.io

Best for: agents that run as ordinary long-lived processes close to users, in many regions

Fly Machines are Firecracker microVMs billed by the second while running, with no stated run limit. Suspend snapshots the whole VM, memory included, and resumes in a few hundred milliseconds; Fly recommends it for Machines with 2 GB of memory or less. Sprites are Fly's agent-focused sandboxes with a persistent 100 GB disk.

Strengths

  • Suspend and resume with memory
  • Volumes and stopped root filesystems are cheap to keep
  • Many regions

Tradeoffs

  • Suspend is recommended only for small Machines
  • A Fly Volume attaches to one Machine
  • Fly has said it is scaling back its GPU plans

7. AWS Lambda and Fargate

docs.aws.amazon.com

Best for: teams that must keep agent compute inside their AWS account and already run on Lambda or ECS

A Lambda invocation runs for at most 30 minutes. Lambda durable functions run a workflow for up to a year and suspend during waits without compute charges, and Step Functions Standard workflows also run for up to a year. Lambda MicroVMs, built for sandboxes, run for up to 8 hours and suspend with memory and disk. Fargate runs containers with no stated time limit and attaches EBS or EFS.

Strengths

  • Durable functions and Step Functions keep the agent loop's state for up to a year
  • Lambda mounts Amazon EFS or Amazon S3 Files for shared files
  • IAM, VPC and billing stay in one AWS account

Tradeoffs

  • Fargate has no GPUs and no pause; AWS retires tasks for platform maintenance, and standalone tasks aren't replaced
  • Several products to assemble: compute, storage and orchestration are separate
  • A plain Lambda function can't hold a sandbox open past 30 minutes

Best for: agents built into a Vercel app, with short tool calls and occasional sandboxes

Vercel Functions run for up to 300 s on Hobby and 800 s on Pro, with 1,800 s in beta, and bill Active CPU, so time spent waiting on a model isn't billed as CPU. Vercel Sandbox runs Firecracker microVMs for up to 45 minutes per session on Hobby and 24 hours on Pro; persistent sandboxes save the filesystem when stopped and restore it on resume. Vercel Workflow can pause for minutes or months and resume.

Strengths

  • Active CPU pricing for Functions and Sandbox
  • Sandbox, Workflow and the app in one project

Tradeoffs

  • Sandbox resume restores files, not memory or running processes
  • A Drive takes one writer at a time; see Archil vs Vercel Sandbox

Long-running is two problems

An agent that runs for hours has a loop (prompt, model call, tool call, repeat) and a workspace (the files and packages its tools touch). The loop's state is small and can live in your database or a durable workflow engine such as Temporal, AWS Step Functions, Vercel Workflow or Cloudflare Workflows. The workspace is large and has to survive between tool calls.

Platforms on this page mostly answer the second problem. Archil's Temporal guide shows the split: the workflow holds the loop, and each activity runs in its own sandbox on a persistent disk.

Which one should you use?

If you needPick
Hours of work in bursts, with no compute billed while the agent waitsArchil
GPUs in the agent's sandboxModal, Daytona or Northflank
Exact memory state after a pause, with no expiryE2B or Archil
One workspace that several agents or machines write at onceArchil
Everything inside your AWS accountAWS Lambda durable functions or Step Functions, with Fargate or Lambda MicroVMs
Your own cloud, with sandboxes next to services and databasesNorthflank, or Archil BYOC
An agent inside a Vercel appVercel Functions and Workflow, with Vercel Sandbox

Questions people ask

What is the best platform for long-running AI agents?

One that keeps the agent's state when compute stops. Archil keeps the workspace on a durable disk and pauses sandboxes with memory, Modal is the pick for GPUs, E2B for exact pause and resume, and AWS durable functions or Step Functions when everything must stay in AWS.

How long can an AWS Lambda function run?

30 minutes per invocation, per AWS's limits page. Lambda durable functions can run a workflow for up to one year, suspending during waits, and Lambda MicroVMs run for up to 8 hours.

Can an agent sandbox run for more than 24 hours?

On Daytona and Northflank, yes: neither sets a lifetime limit. On E2B Pro, Modal, Vercel Sandbox Pro and Archil, a session lasts up to 24 hours. Archil pauses the sandbox at that point with processes intact, and resuming starts a new session.

Do I pay for a sandbox while the agent waits on the model?

On most platforms, yes, while the sandbox is running. Archil serverless tool calls bill per call, so nothing runs between turns, and Archil sandboxes pause when idle and accrue no compute charges while paused or stopped. Vercel bills Active CPU, which excludes idle waiting but still bills memory.

Which agent platforms have GPUs?

Modal, Daytona (ephemeral GPU sandboxes), Northflank and Fly.io document GPUs. Archil and Fargate don't offer them.

Should the agent loop run inside the sandbox?

It doesn't have to. Running the loop in your backend or a durable workflow and sending only tool calls to a sandbox keeps API keys out of the sandbox and lets the loop survive a sandbox restart. See how to build agents.

How we chose

We picked platforms that teams use to run agents for longer than one request, and compared what each documents: run limits, what pause and stop keep, billing basis, GPUs and isolation. Every competitor fact comes from that vendor's own docs or pricing page as of the date above; where a vendor doesn't say, the table says so. Archil makes Archil, which is ranked first because it covers both halves of the problem, but it isn't the right pick for GPU work or for teams that must stay inside AWS.