> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sailresearch.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Sailboxes

> Efficient cloud environments for long-horizon agents

This page is a high-level guide to Sailboxes, efficient cloud environments
specifically designed for long-horizon agents.

See the [Sailbox reference](/sailbox-sdk) for reference documentation on
Sailboxes.

## What are Sailboxes and why should I use them?

Sailboxes are persistent Linux VMs designed for long-horizon agents. They can be
dynamically provisioned in seconds and are the perfect cloud environment for any
agent.
They provide a number of advantages over other sandboxing providers:

* Cost efficiency: not only is our pricing >70% less than other providers,
  Sailboxes only charge you for the exact portion of CPU, memory, and disk you
  use. Since agents spend most of their time blocked on I/O, we are
  significantly more cost-efficient than anyone else.
* Elastic scaling: use as much (or as little) compute as you need, up to your
  Sailbox size's CPU, memory, and disk ceilings. Because billing follows actual
  usage, a higher ceiling costs nothing on its own.
* Pause, resume, and fork all sandbox state. In-flight work survives the pause
  with no save/restore code on your side, and open network connections survive
  for up to 10 minutes.
* Automatically sleep Sailboxes while waiting on Sail inference calls.

## Provider comparison

<div className="sailboxes-comparison-table">
  | Provider   | vCPU                          | Memory                       | Sleep during inference | Max runtime    | Memory snapshots | Local NVMe disks | Docker-in-Docker | Start/resume time |
  | ---------- | ----------------------------- | ---------------------------- | ---------------------- | -------------- | ---------------- | ---------------- | ---------------- | ----------------- |
  | Sailboxes  | \$0.015<br />active vCPU·h    | \$0.008<br />active GB·h     | Yes                    | No fixed limit | Yes              | Yes              | Yes              | \<3s              |
  | Modal      | \$0.071<br />active vCPU·h    | \$0.008<br />reserved\* GB·h | No                     | 24 hours       | Alpha            | No               | Beta             | \<500ms           |
  | E2B        | \$0.0504<br />reserved vCPU·h | \$0.0162<br />reserved GB·h  | No                     | 24 hours       | Yes              | No               | Yes              | \<1s              |
  | Vercel     | \$0.128<br />active vCPU·h    | \$0.0212<br />reserved GB·h  | No                     | 5 hours        | No               | Yes              | Yes              | \<1s              |
  | Daytona    | \$0.0504<br />reserved vCPU·h | \$0.0162<br />reserved GB·h  | No                     | No fixed limit | Experimental     | Yes              | Yes              | \<500ms           |
  | Cloudflare | \$0.072<br />active vCPU·h    | \$0.009<br />reserved GB·h   | No                     | No fixed limit | No               | Yes              | Yes              | \<3s              |
</div>

<p className="sailboxes-comparison-footnote">
  \*Modal allows bursting beyond reserved capacity, but this is best-effort
  (e.g. sandboxes OOM if no memory is available).
</p>

## What is the tradeoff?

Sailboxes achieve their efficiency through live migrations: we are able to
achieve much higher utilization on our underlying hardware than other providers
by migrating VMs based on their live resource usage. These migrations only occur
a few times a day, take several seconds, and happen completely without the
knowledge of the agent.

While these migrations mean that the occasional command incurs a few seconds of
additional latency, the tradeoff is massive gains in cost-efficiency. Unlike
human-in-the-loop workflows like chatbots where patience is limited,
long-horizon agents can tolerate the occasional latency blip without issue.
Sailboxes directly trade off this p99 latency for better economics and we
believe this makes them the ideal platform for any long-horizon agent.

## Start here

* [Quickstart](/sailboxes-quickstart): create a Sailbox, run commands, expose a
  service, and clean up.
* [Pricing](/sailboxes-pricing): understand observed-usage billing dimensions and
  per-hour rates.
* [Images](/sailboxes-images): choose a base image and build custom images with
  packages, commands, environment variables, and local files.
* [Networking](/sailboxes-networking): expose HTTP services, raw TCP ports, and
  SSH from a Sailbox.
* [Filesystem](/sailboxes-filesystem): read and write files at runtime, stream
  large files, and decide what belongs in an image.
* [Lifecycle](/sailboxes-lifecycle): checkpoint, start from checkpoint, pause,
  sleep, resume, upgrade, and terminate Sailboxes.
* [HTTP API](/sailboxes-http-api): create and operate Sailboxes over plain HTTP
  from any language.
