# Concepts The terms and rules that every other page uses. ## Sandbox A sandbox is an isolated Linux computer that your code starts, uses and stops. Use it for code an AI agent wrote, clean test runs, or many jobs at once. - Its ID starts with `i`, then lowercase letters and digits. - It starts from a [template](#templates). - It runs on 64-bit Arm (arm64). Downloaded binaries must be arm64 builds. - You pay per second while it runs. [Pricing](https://fdtn.dev/docs/pricing.md) ## Templates A template is a saved Linux system plus a size. A create with no template name uses `base`. | Template | Size | Inside | |---|---|---| | `base` (default) | 2 vCPU, 512 MiB | Debian 12, Python 3.11, pip, Node.js 20, git, curl | | `small` | 2 vCPU, 512 MiB | Ubuntu 24.04, Python 3.12, pip, git | | `claude` | 2 vCPU, 2 GiB | Claude Code, Node.js 24, Python 3, pip, git, curl, ripgrep | Coding agents also come in larger sizes: `claude`, `codex` and `opencode` with `-2vcpu-4gib`, `-4vcpu-8gib` or `-8vcpu-16gib` (for example `claude-4vcpu-8gib`). Every coding-agent template has 20 GiB of disk. Only plain `claude` stays on our own computers; for a sized one, add `--trusted` or metadata `fdtn_own_fleet_only=1`. The Templates page in the [portal](https://compute.fdtn.dev) shows the current list. For other software or another size, build a template from a Dockerfile: ```bash $ fdtn template create my-env --cpu-count 4 --memory-mb 8192 $ fdtn create my-env ``` An unknown template name fails at once with `404`. List names with `fdtn template ls`. [Templates](https://fdtn.dev/docs/templates.md) ## Sizes and disk The template sets the size of every sandbox it starts. | vCPU | 1 to 16. CLI default: 2. | |---|---| | Memory | Up to 32 GiB, in 512 MiB steps. CLI default: 1,024 MiB. | | Disk | Free of charge. 5 GiB up to 512 MiB memory, 10 GiB up to 2 GiB, 20 GiB above that and for coding-agent templates. | ## Lifetime When the lifetime ends, the sandbox stops, so a forgotten sandbox does not cost money. - Default 300 seconds. Maximum 24 hours. - Set it with `--timeout` (CLI, seconds), `timeout` (Python, seconds) or `timeoutMs` (TypeScript). - At the end, the sandbox is killed. `--lifecycle.ontimeout pause` pauses it. - An open terminal and each `fdtn` command keep it running longer. [Lifecycle](https://fdtn.dev/docs/lifecycle.md#lifetime) The SDK wait is separate: `request_timeout` / `requestTimeoutMs`, 60 seconds by default. ## States | State | Billing | Ends when | |---|---|---| | Running | Per second | The lifetime ends, or you pause or kill it | | Paused | Free for 72 hours | You resume or kill it, or 72 hours pass | | Killed | None | Final; files are deleted | ## Pause and resume Pause keeps memory and disk and stops the clock. Resume continues from the same point. ```bash $ fdtn pause $ fdtn resume # or fdtn connect , which also opens a terminal ``` To keep it longer than 72 hours, save a snapshot: `fdtn snapshot create --name `. [Snapshots](https://fdtn.dev/docs/lifecycle.md#snapshots) ## Names and metadata ```bash $ fdtn create -d --name worker --metadata run=eval-1,project=demo $ fdtn exec @worker python3 --version $ fdtn ls --metadata run=eval-1 $ fdtn kill --all --metadata run=eval-1 ``` - Name: 1 to 64 letters, digits, dashes or underscores. Use it in place of the ID. - Metadata: `key=value` text pairs to select groups. Keys that start with `fdtn_` are reserved. [Many sandboxes](https://fdtn.dev/docs/parallel.md) ## The queue Start as many as you need. When machines are busy, extra starts wait in a queue for up to 30 minutes. - A resume does not wait. When it cannot start, it fails at once with `429`. - Set `request_timeout=1800` or `requestTimeoutMs: 1_800_000` so the SDK waits as long as the queue. - Metadata `class=batch` puts batch creates behind interactive ones. [Limits](https://fdtn.dev/docs/limits.md#queue) lists every queue rule and error. ## Where sandboxes run A sandbox runs on a machine we own or on a Host's computer. A Host lends an idle computer and earns a share of what developers pay. - `--trusted` keeps a sandbox on our machines only. Use it for credentials or private work. - The `claude` template always runs on our machines. [Security](https://fdtn.dev/docs/security.md) explains what each choice protects. ## Workspaces and keys Your first sign-in creates a personal workspace. Team workspaces can invite members. Each workspace has its own limits and prepaid credit. Only a personal workspace gets the $20 welcome credit; a team workspace buys credit from the start. The CLI and SDKs look for a key in this order: passed in code, `FDTN_API_KEY`, `~/.fdtn/key`. [API keys](https://fdtn.dev/docs/keys.md) ## Next - [**Lifecycle**: Timeouts, pause and resume.](https://fdtn.dev/docs/lifecycle.md) - [**Templates**: Build one from a Dockerfile.](https://fdtn.dev/docs/templates.md) - [**Pricing**: What each size costs per hour.](https://fdtn.dev/docs/pricing.md) - [**Limits**: Every limit and how to raise it.](https://fdtn.dev/docs/limits.md) Source: https://fdtn.dev/docs/concepts/