# Depot Sandboxes

> Isolated, programmable Linux sandboxes from Depot for running commands and managing files, controlled through a Node.js SDK and API.

Depot Sandboxes are isolated Linux environments from Depot Technologies Inc. that engineers and AI agents create programmatically to run commands, work with files, and resume saved state. They run on Depot Metal, Depot's compute and storage platform, and are controlled through the `@depot/sandbox` Node.js SDK, which wraps the `depot.sandbox.v1` API.

## What It Is

Depot Sandboxes provide on-demand compute for running code in isolation. A developer authenticates with a Depot token, creates a sandbox, runs commands, reads or streams their output, manipulates the sandbox file system, and then stops it. The sandbox is billed through Depot's CI compute model, and the homepage describes sandboxes as isolated by design for ephemeral environments.

## How the SDK Workflow Works

The SDK requires Node.js 20 or newer and ships as ES modules. `Sandbox.create` accepts options for name, image, architecture (amd64 or arm64), resources (2 to 64 vCPUs, memory, disk), environment variables, and lifetime (up to 24 hours). Commands run directly without a shell, with output available as collected text (capped at 16 MiB) or as a live stream of stdout and stderr chunks. A `node:fs/promises`-style file system interface supports reading, writing, directories, stat, symlinks, copy, move, and permissions. Detached, fire-and-forget commands are in beta.

## Secrets, Cache, and Networking

Sandboxes can inject existing Depot CI secrets into commands without exposing values in code. Depot Cache is configured automatically for tools such as sccache, Turborepo, Nx, Bazel, Pants, Gradle, and Maven, and can be disabled. If the Tailscale integration is enabled, sandboxes join the organization's tailnet, and this can be turned off per sandbox. Custom images must come from Depot Registry.

## Snapshot and Resume

`sandbox.snapshot()` saves the home directory and `/workspace` files, up to 25 GiB, so a new sandbox can be created from the snapshot. Snapshots preserve files, not running processes or memory. Depot Managed Agents handles snapshot save and restore automatically for sessions. The docs list detached-command output retrieval and named runtimes as planned features.

## Features
- Programmatic sandbox creation via Node.js SDK
- x86-64 and ARM64 Linux architectures
- Configurable 2 to 64 vCPUs, memory, and disk
- Command execution with streaming stdout/stderr logs
- node:fs/promises-style file system API
- Snapshot and resume of workspace files
- Depot CI secrets injection
- Automatic Depot Cache configuration
- Optional Tailscale tailnet connectivity
- Custom images from Depot Registry
- Detached commands (beta)
- Sandbox lifetime up to 24 hours

## Integrations
Depot CI, Depot Cache, Depot Registry, Depot Managed Agents, Tailscale, Turborepo, Nx, Bazel, Gradle, Maven, sccache, Pants

## Platforms
WINDOWS, MACOS, LINUX, WEB, API, DEVELOPER_SDK, CLI

## Pricing
Subscription-based

## Links
- Website: https://depot.dev/products/sandboxes
- Documentation: https://depot.dev/docs/sandboxes/overview
- Repository: https://github.com/depot/sandbox-sdk
- EveryDev.ai: https://www.everydev.ai/tools/depot-sandboxes
