sail-sdk) is the client library for Sail. It exposes
three product surfaces from a single import sail:
- Sailboxes — persistent Linux VMs you create, run commands in, expose ports from, and checkpoint/pause/resume.
- Voyages — a flight recorder for long-running agent and background-task trajectories.
- Inference — thin wrappers over Sail’s hosted inference endpoints that correlate model calls with the active Voyage.
Installation
Install with pip:Authentication
Set your API key in the environment before using the SDK:SAIL_API_KEY. When it is absent,
sail.voyage degrades to a safe no-op (no Voyage is created and no network
calls are made) so local scripts don’t crash; see the
Voyages reference for details.
SAIL_MODE selects the environment the SDK talks to (prod by default;
dev and staging are also valid). See the
Voyages reference environment table for
the full list of supported environment variables.
The sail surface
Everything you normally need is available directly on the top-level sail
module:
| Symbol | What it is |
|---|---|
sail.Sailbox | Create and operate sandbox VMs. See Sailbox. |
sail.App | The org-owned application a Sailbox belongs to. See Apps. |
sail.Image | Base images and the custom-image builder. See Images & Functions. |
sail.function | Decorate a Python function to run it inside a Sailbox. See Images & Functions. |
sail.voyage | Record agent/task trajectories. See Voyages. |
sail.inference | Voyage-correlated inference wrappers. See Inference. |
sail.Config / sail.RetryPolicy | Endpoint and retry configuration. See Configuration. |
sail.SailTokenCompleter / sail.get_tinker_checkpoint_signed_url_async | Tinker RL/training integration. See Tinker. |
sail.__version__ exposes the installed SDK version string.
Errors
All SDK exceptions derive from a single base,sail.SailError, so you can
catch everything the SDK raises with one except sail.SailError. Each product
narrows the tree further:
- Sailbox and image errors — see Sailboxes → Errors.
- Voyage and inference errors — see Voyages → Errors.
ValueError, LookupError,
PermissionError, FileNotFoundError, TimeoutError) where that is the most
natural fit; those are noted on the relevant method.