Agents on Fly.io: Sprites and friends
Fly.io’s answer for agent workloads is Sprites: persistent Linux VMs that sleep when idle, keep their disk, wake on a request, and can be checkpointed and restored. Fly Machines remain the production runtime. A Sprite is where an agent builds and tries things, and a Machine is where the result is scaled out (https://fly.io/blog/design-and-implementation/, https://fly.io/blog/feng-shui-for-robots/).
This page is drawn from https://fly.io/sprites/ (fetched via https://sprites.dev, which redirects there), https://fly.io/docs/sprites/ (fetched via https://docs.sprites.dev, which redirects to https://docs.fly.io/sprites), the Sprites concept pages such as https://fly.io/docs/sprites/concepts/lifecycle/ and https://fly.io/docs/sprites/concepts/connectors/, https://fly.io/docs/model-context-protocol/, https://fly.io/docs/about/free-trial/, and the blog posts https://fly.io/blog/code-and-let-live/, https://fly.io/blog/design-and-implementation/, https://fly.io/blog/sprites-mcp/, https://fly.io/blog/sprites-block-device/ and https://fly.io/blog/feng-shui-for-robots/. https://docs.sprites.dev/llms.txt returned 404 when fetched; the index Fly points to is https://docs.fly.io/llms.txt (https://fly.io/docs/sprites/index/).
Sprites in one paragraph
“Sprites are persistent, hardware-isolated Linux VMs on Fly.io for AI agents, dev environments and untrusted code, billed by the second and free when idle.” (https://fly.io/docs/sprites/index/). The product page says “Sprites are full Linux computers designed for agents.” (https://fly.io/sprites/). Unlike serverless functions, “Sprites keep their filesystem and memory between runs” (https://fly.io/docs/sprites/index/).
Sprites versus Fly Machines
| Sprite | Fly Machine | |
|---|---|---|
| Image | No user-facing container image; every Sprite starts from a standard container (https://fly.io/blog/design-and-implementation/) | An OCI image you build and deploy (https://fly.io/docs/machines/) |
| Create time | “a second or two” (https://fly.io/blog/design-and-implementation/) | “can take over a minute” per the same post (https://fly.io/blog/design-and-implementation/) |
| Disk | 100 GB ext4, backed by object storage with an NVMe cache (https://fly.io/docs/sprites/concepts/lifecycle/) | Fly Volume, NVMe on one physical server (https://fly.io/blog/design-and-implementation/) |
| Idle | Goes warm, then cold, no compute charge (https://fly.io/docs/sprites/concepts/lifecycle/) | Start and stop are yours to configure (https://fly.io/docs/machines/) |
| Best for | Agents, dev boxes, untrusted code, prototypes (https://fly.io/docs/sprites/index/) | Production apps with CI/CD and availability needs (https://fly.io/blog/design-and-implementation/) |
Fly Machines run in Firecracker microVMs (https://fly.io/docs/reference/architecture/). The January 2026 design post says “under the hood, Sprites are still Fly Machines”, so that sentence may age; treat it as a dated statement [verify against current engineering]. Fly’s own advice on the boundary: prototype on Sprites, then “containerize it and ship it as a Fly Machine to scale it out” (https://fly.io/blog/design-and-implementation/). The October 2026 post adds that the most common reason to migrate out is needing it “always on” (https://fly.io/blog/feng-shui-for-robots/).
States: running, warm, cold
- Running. A Sprite is active while a command runs, a session produces output, a TCP connection to its URL is open, or a service handles traffic. Compute is billed (https://fly.io/docs/sprites/concepts/lifecycle/).
- Warm. After an idle window “about 30 seconds today”, the VM is suspended with memory frozen. Billing stops and the next request resumes it in 100-500ms with processes where they were (https://fly.io/docs/sprites/concepts/lifecycle/).
- Cold. If idle long enough, the VM stops fully and memory is dropped. The next wake takes 1-2s and starts processes fresh (https://fly.io/docs/sprites/concepts/lifecycle/).
- Four things reset the idle timer: an in-flight HTTP or API request, stdout from a session or exec’d process, an open TCP connection, or an active task (https://fly.io/sprites/).
Docs and product page differ slightly on timing: the docs say about 30 seconds, the pricing FAQ says “within seconds” (https://fly.io/docs/sprites/concepts/lifecycle/, https://fly.io/sprites/). Quote the docs figure and call it approximate.
Storage
Every Sprite has an ext4 filesystem: “It is not an object-storage shim or a network filesystem.” Hot data sits on NVMe, with a durable copy in object storage that syncs continuously (https://fly.io/docs/sprites/concepts/lifecycle/). Capacity starts at 100 GB and does not autoscale yet; you pay for bytes written, not the full 100 GB (https://fly.io/docs/sprites/concepts/lifecycle/). Disk persists; processes, memory and open connections do not (https://fly.io/docs/sprites/concepts/lifecycle/).
Storage backend changed in 2026: an October post introduces the Sprites Block Device (SBD), ext4 on a block device on a bucket, replacing a modified JuiceFS stack. Sprites created before 10/6 can migrate (https://fly.io/blog/sprites-block-device/). The product page calls an S3 block device “early access” and “Opt in per organization” (https://fly.io/sprites/); the blog says SBD “is going to be the Sprites filesystem from here on out” (https://fly.io/blog/sprites-block-device/). Those two statements conflict on how general SBD is [verify]. Resources per Sprite: 8 vCPUs, platform-managed memory, 100 GB (https://fly.io/docs/sprites/concepts/lifecycle/). New Sprites run Ubuntu 26.04 per the maintenance guide, while the working guide still says Ubuntu 25.10, so docs disagree (https://fly.io/docs/sprites/sprite-maintenance/, https://fly.io/docs/sprites/working-with-sprites/).
Checkpoints and restore: what exactly comes back
- A checkpoint “snapshots the writable filesystem overlay”: files, installed packages, config and dotfiles, and on-disk databases. It does not capture running processes, in-memory state or open connections (https://fly.io/docs/sprites/concepts/checkpoints/).
- Restore replaces the overlay with the saved state and restarts the environment. It is asynchronous, active sessions are terminated, and the replaced state is not backed up (https://fly.io/docs/sprites/concepts/checkpoints/).
- After a restore, services come back from their on-disk definitions, the way they do after a cold wake. A process started by hand does not (https://fly.io/docs/sprites/concepts/checkpoints/).
- Creation is copy-on-write and does not interrupt the Sprite. The last five checkpoints mount read-only at
/.sprite/checkpoints/(https://fly.io/docs/sprites/concepts/checkpoints/). - Automatic checkpoints carry
auto-IDs and are hidden unless you pass--include-auto(https://fly.io/docs/sprites/concepts/checkpoints/). - Agents can checkpoint themselves with
sprite-env checkpoints create(https://fly.io/docs/sprites/concepts/checkpoints/). - A checkpoint is not Git. Fly says commit your code and checkpoint the environment around it (https://fly.io/docs/sprites/concepts/checkpoints/).
Disagreements to know about: the working guide says creation takes 10 to 30 seconds and its “what gets saved” list appears to include running processes and in-memory state, but the corpus copy lost the check and cross marks, so the list cannot be read reliably [verify] (https://fly.io/docs/sprites/working-with-sprites/). The concept page says no, and the product page says “restoring rewinds your files rather than resuming a paused process” (https://fly.io/sprites/). Go with the concept page.
Wake on HTTPS and networking
Every Sprite has a URL of the form https://<sprite-name>-<org-id>.sprites.app/, always on, routing to the HTTP service (https://fly.io/docs/sprites/concepts/networking/). A request wakes the Sprite; pair it with a service defined with --http-port so the server is ready (https://fly.io/docs/sprites/concepts/services/). It routes to port 8080 by default (https://fly.io/docs/sprites/working-with-sprites/). The URL is org-private by default; sprite config update --url-auth public opens it to the internet (https://fly.io/docs/sprites/concepts/networking/).
Outbound is unrestricted by default. A network policy is a DNS-based allowlist applied from outside the Sprite; blocked domains get DNS REFUSED, raw IPs are blocked unless resolved from an allowed domain, and private IPs are always blocked (https://fly.io/docs/sprites/concepts/networking/).
Connectors and credentials
Connectors store a credential once in your organization and route calls through a gateway at https://api.sprites.dev/v1/gateway/<provider>/<connection_id>/<path>. “The Sprite never holds the provider token.” Access is deny-by-default and set by name prefix, labels or allow-all, with optional endpoint allow and block lists, where block rules win (https://fly.io/docs/sprites/concepts/connectors/). OpenRouter is available as a managed connector billed with the plan (https://fly.io/docs/sprites/concepts/connectors/). Caveat: Connectors cover HTTP APIs. A coding agent’s own login is a different story (see the whiteboard page).
CLI, API and SDKs
- CLI:
sprite create,sprite exec,sprite console,sprite checkpoint,sprite proxy(https://fly.io/docs/sprites/cli/commands/). Install withcurl https://sprites.dev/install.sh | bash(https://fly.io/sprites/). - REST:
PUT https://api.sprites.dev/v1/sprites/<name>, and exec, checkpoints, services and network policy endpoints (https://fly.io/sprites/, https://fly.io/docs/sprites/api/exec/execute-command/). - SDKs shown on the product page: JavaScript, Go, Elixir and Python (https://fly.io/sprites/).
- Framework adapters: Hugging Face OpenEnv (alpha), Google ADK, OpenAI Agents SDK, OpenRouter Agent SDK (the adapter “is experimental and source-only” and needs Node.js 24 or newer), TanStack AI (https://fly.io/docs/sprites/integrations/agent-sdks/).
MCP, skills and fly setup agent
- Sprites MCP, hosted at
https://sprites.dev/mcp, uses Fly.io OAuth. The default token is restricted to Sprites namedmcp-and a limited count (https://fly.io/docs/sprites/integrations/remote-mcp/). The blog says the default is “a cap of five Sprites”; the docs give no number, so quote the blog as the blog’s claim [verify] (https://fly.io/blog/sprites-mcp/). - Fly MCP (beta: the post says “You beta try it”),
https://mcp.fly.io, connects an agent to Sprites and to your apps, and there is no API token to paste (https://fly.io/blog/feng-shui-for-robots/, https://fly.io/docs/model-context-protocol/setup-agent/). The older localfly mcp serverwraps flyctl commands such as apps, machines, secrets and volumes (https://fly.io/docs/model-context-protocol/flyctl-server/). fly setup agentinstalls the Fly skills and adds theflyMCP entry to detected agents. It does not install the Claude Code plugin’s confirmation hook for destructive or billable operations (https://fly.io/docs/model-context-protocol/setup-agent/).fly skills installwrites skillsflyandbrandfrom superfly/skills (https://fly.io/docs/model-context-protocol/agent-skills/).- Plugins exist for Codex, Cursor, Antigravity, Grok Build, OpenCode, Pi, Herdr and others (https://fly.io/docs/sprites/integrations/agent-plugins/).
Running Claude Code in a Sprite
Sprites ship with Claude CLI, Gemini CLI and OpenAI Codex preinstalled (https://fly.io/docs/sprites/working-with-sprites/). Kurt Mackey says “the first thing you should think to do with a new Sprite is to type claude (or gemini or codex)” (https://fly.io/blog/sprites-mcp/). The design post says Claude runs with --dangerously-skip-permissions there (https://fly.io/blog/design-and-implementation/). To keep a long run alive, hold the Sprite with a task on /.sprite/api.sock; a task lasts at most one hour and long runs use a heartbeat (https://fly.io/docs/sprites/keeping-sprites-running/).
Pricing and limits
CPU $0.0385 per CPU-hour, memory $0.021875 per GB-hour, hot storage $0.000683 per GB-hour (about $0.50 per GB-month), cold storage $0.000027 per GB-hour, all metered hourly on actual use (https://fly.io/sprites/). Running is billed; warm and cold are not (https://fly.io/sprites/). Fly’s example: a four-hour Claude Code session totals $0.23 (https://fly.io/sprites/). Sprites bandwidth “isn’t metered today” (https://fly.io/sprites/). Plans bundle allowances; Hero is $100/mo with 1,200 CPU-hours, 4,800 RAM GB-hours and 150 GB, and allows 100 concurrently running and 100 warm Sprites. Creation is limited to 10 per minute on pay-as-you-go (https://fly.io/sprites/).
Trial claims conflict: the Fly.io trial doc says $1 of credit for 7 days with up to 3 Sprites (https://fly.io/docs/about/free-trial/), while the Sprites page advertises “$30 in trial credits” (https://fly.io/sprites/). Ask which applies to the customer’s account before promising either [verify].
How to sell it
- Lead with the loop: create, install once, checkpoint, sleep, wake on a request, restore (https://fly.io/blog/code-and-let-live/).
- Be straight about limits: fixed 8 vCPUs, 100 GB, and process state lost on cold wake (https://fly.io/docs/sprites/concepts/lifecycle/).
- Ask: “Does this need to be always on?” If yes, plan the move to a Machine (https://fly.io/blog/feng-shui-for-robots/).