← Blog

Guide

Cloud Computers for AI Agents (2026): Persistent VMs vs Sandboxes

A cloud computer for an AI agent is a Linux machine the agent controls over SSH or an API, with its own disk, IP and tools. There are two shapes: sandboxes, which start in milliseconds and are capped at hours, and persistent VMs, which stay on for weeks. For an agent that works around the clock, a machine0 large VM (2 vCPU, 4 GB) costs about $38 per month, against about $121 for the same resources on E2B or Daytona at full use, as of October 2026.

## What a cloud computer for an agent is

Agent workloads are shifting from short-lived to always-on. An agent that fixes a bug and exits can run anywhere. An agent that watches a repo, answers webhooks, keeps a browser session warm, or works through a backlog for three days needs a machine of its own: a filesystem that persists, a stable address, tools already installed, and a way to be created and destroyed by other software.

That is what a cloud computer for an AI agent is. It is a Linux machine the agent operates over SSH or an API, not a laptop a person sits at. The agent is the user. The questions that matter are how long the machine can stay up, what happens to its disk when it stops, what it costs while idle, and whether the agent can manage it without a human clicking through a console.

## The two shapes: sandboxes and persistent VMs

Most products in this space fall into one of two shapes.

Sandboxes are lightweight, isolated environments built for running code the provider does not fully trust. They start in milliseconds, scale to thousands of concurrent instances, and are usually driven from an SDK. E2B, Daytona and Modal Sandboxes are examples. Their tradeoff is lifetime: sessions are capped, and long-lived state has to be checkpointed and restored into a fresh instance.

Persistent VMs are full virtual machines. They boot in minutes rather than milliseconds, but they stay on until you stop, suspend or destroy them. The disk is yours, the IP is static, and anything you install stays installed. machine0 is this shape: full KVM virtual machines on DigitalOcean infrastructure, running Ubuntu or NixOS, in nine datacenters.

Fly.io Sprites sit in between. They are persistent Linux computers that sleep when idle, so they keep their disk like a VM while billing for compute only when busy, like a sandbox.

## Comparison: machine0, E2B, Daytona and Fly.io Sprites

All prices are from each provider's official pricing page as of October 2026. "2 vCPU + 4 GB" is the configuration used to compare hourly cost.

machine0E2BDaytonaFly.io Sprites
ModelPersistent KVM VMSandboxSandboxPersistent, sleeps when idle
Longest runUntil you stop it1 h (Hobby), 24 h (Pro), multi-day on EnterpriseNo hard cap; auto-stops after 15 min idle by defaultUntil you stop it
Idle billingFull rate while running or stopped; storage only when suspendedPer second while the sandbox existsPer second while runningStorage only while asleep
2 vCPU + 4 GB, one hour$0.052 (large)$0.1656$0.1656 before storageAbout $0.1645 at full use, much less idle
GPUsYes, 9 sizes from $0.836/hrNot listedAvailableNot listed

Some details behind the table:

  • E2B Hobby is free with a $100 one-time credit, sessions up to 1 hour and 20 concurrent sandboxes. Pro is $150/month with sessions up to 24 hours and 100 concurrent. Enterprise offers multi-day and persistent sessions, with a $3,000/month minimum per E2B's estimator.
  • Daytona charges $0.0504 per vCPU-hour and $0.0162 per GiB-hour of memory, billed per second, with $200 of free compute for new users. Standard sandboxes max out at 4 vCPU, 8 GB RAM and 10 GB disk.
  • Modal Sandboxes (not in the table) default to a 5 minute lifetime with a maximum of 24 hours. Longer work uses Filesystem Snapshots restored into a new sandbox.
  • Fly.io Sprites charge $0.0385 per CPU-hour and $0.021875 per GB-hour of memory on actual usage. Idle sprites stop compute and memory billing; storage is still billed. Checkpoints cover the disk, not running processes.

## The always-on cost math

Take an agent that needs 2 vCPU and 4 GB and runs for a full month, 730 hours.

ProviderMonthly compute at full use
E2BAbout $121 (and sessions over 24 hours need Enterprise)
DaytonaAbout $121
Fly.io SpritesAbout $120 if fully busy, less if mostly idle
machine0 largeAbout $38

The machine0 figure is 730 h x $0.052. If the agent only works office hours, 8 hours a day for 22 workdays, a large VM costs 176 h x $0.052, about $9.15, as long as you suspend it in between.

The honest reading of this table: if your agent is busy most of the time, a persistent VM is the cheapest option by a wide margin. If your agent is idle most of the day and only wakes up for a few minutes at a time, Sprites can cost less than machine0, because machine0 bills every minute the VM is on and Sprites bill only when busy.

## When a sandbox is the better choice

Sandboxes exist for good reasons, and there are workloads where they win clearly:

  • Thousands of short, untrusted code runs. An agent evaluating generated code, running tests per pull request, or executing user-submitted snippets wants millisecond start times and strong isolation per run. Provisioning a VM takes minutes, so a VM per run makes no sense.
  • SDK-first workflows. If your agent framework already speaks the E2B or Daytona SDK, a sandbox slots in without changing the agent.
  • Computer-use agents that need a screen. machine0 is headless Linux with no desktop or GUI. If the agent needs to see pixels, look elsewhere.

## When a persistent VM wins

A persistent VM is the right shape when the machine itself is part of the work:

  • The agent runs for days. Claude Code working through a backlog, a research loop on a GPU, a long build. There is no session cap to design around.
  • State must survive. Installed tools, cloned repos, caches, databases and the agent's own working files stay on disk. On machine0, "anything that survives a reboot survives a suspend".
  • Something needs a stable address. Every machine0 VM gets a public static IPv4 and authenticated HTTPS at https://<vm>.mac0.io, which proxies to port 80. Webhooks, a dashboard, an API the agent serves: they all have a fixed URL.
  • Secrets and integrations should be injected, not pasted. Profiles bundle GitHub, Claude Code, Codex, MCP servers, prompts and secret environment variables, and inject them when the VM is created.
  • GPUs. H100, H200, MI300X, L40S and RTX Ada sizes, billed per minute, with suspend between runs.
  • Reproducibility. NixOS images turn the whole OS into code, and snapshots turn a configured VM into an image you can clone.

The cost of all this is that you own a machine. It bills while it is on, including while stopped, so suspending idle VMs matters. And it boots in minutes, not milliseconds.

## Quick start

Install, create, connect:

$ curl -LsSf https://machine0.io/install.sh | sh
$ machine0 new my-vm
$ machine0 ssh my-vm

The default image, ubuntu-24-04-loaded, ships with Docker, Node.js, Python, Claude Code, Codex and tmux. When the agent is done for the day:

$ machine0 suspend my-vm   # keep the disk, stop compute billing
$ machine0 start my-vm     # pick up where it left off

Agents can do all of this themselves through the remote MCP server or the TypeScript SDK.

## FAQ

What is a cloud computer for an AI agent?

A Linux machine in the cloud that the agent, not a person, operates: it runs commands over SSH, keeps files on disk, and is created and destroyed through a CLI, an API or an MCP server.

Is a sandbox or a persistent VM better for a coding agent?

For a single code execution or a test run, a sandbox. For an agent that keeps state between tasks, serves a webhook, or runs for days, a persistent VM.

How much does an always-on agent VM cost?

On machine0 a large VM (2 vCPU, 4 GB) running all month is 730 hours x $0.052, about $38. Suspend it when idle and you pay only image storage at $0.078/GB/month.

Do sandboxes support sessions longer than 24 hours?

As of October 2026, E2B Pro caps sessions at 24 hours and multi-day sessions need its Enterprise plan. Modal Sandboxes max out at 24 hours. Daytona sandboxes auto-stop after 15 minutes of inactivity by default, which can be disabled.

Does machine0 offer GPUs?

Yes. GPU VMs from a 1x RTX 4000 Ada at $0.836/hr up to 8x H200 at $39.336/hr, billed per minute, in seven GPU datacenters across North America, Europe and Asia.

Can I move between a sandbox and machine0?

Not as a drop-in replacement. machine0 is a full VM reached over SSH, the CLI, the TypeScript SDK or MCP, not an SDK-driven sandbox. Most teams use both: sandboxes for short runs, VMs for long-lived agents.

## Sources

## Related

  • E2B alternatives: When a sandbox session cap gets in the way, and what to use instead for long-running agents.
  • Run Claude Code or Codex in the cloud: Step by step: a VM with Claude Code or Codex, GitHub and MCP connected, running in tmux, suspended when idle.
  • Remote MCP server: Let Claude Code, Claude Desktop or claude.ai create, start, stop and SSH into your VMs.
  • Pricing: Per-minute CPU and GPU prices, what gets billed, wallet and safeguards.