Skip to content
LogoLogo

Amp

Amp runs its agent loop on its own servers and the agent's tools on an orb, a machine for the thread. With self-hosted orbs, you provide the machines. The createos CLI turns each Amp thread into its own CreateOS Sandbox microVM.

At a glance

  • Command: createos sandbox setup amp
  • One thread = one sandbox. Idle threads pause (disk and memory kept); the next message resumes them.
  • Requires: the amp CLI and a CreateOS login on a machine that stays on
  • Network: outbound only. Amp never connects into your network.
Amp (ampcode.com)            your machine                       CreateOS
─────────────────            ────────────                       ────────
thread starts   ── spawn ──▶ createos sandbox setup amp
thread idles    ── pause ──▶   └─ amp orb provider ── API ──▶  sandbox per thread
thread deleted  ── delete ─▶                                     │
agent tools ◀════════════ amp orb bootstrap (outbound WSS) ══════╛

Prerequisites

Install the createos CLI and the Amp CLI:

curl -sfL https://raw.githubusercontent.com/NodeOps-app/createos-cli/main/install.sh | sh -
curl -fsSL https://ampcode.com/install.sh | bash

Then sign in to CreateOS, or set CREATEOS_API_KEY on a headless server:

createos login

Set up

1. Register a provider in Amp. Orb providers belong to a workspace. If you have none, create one under Workspace Settings → Create a Workspace (free). Then open Workspace Settings → Orbs, check that Self-Hosted Orbs is on, click Add Provider, name it createos, and copy the aop_live_… token. Amp shows it once.

Save the token to a file only you can read. Paste it when asked; it is not shown and stays out of your shell history:

mkdir -p ~/.config/amp
read -rs t && install -m 600 /dev/null ~/.config/amp/orb-provider-token && printf %s "$t" > ~/.config/amp/orb-provider-token && echo saved

2. Check, then start the provider.

export AMP_ORB_PROVIDER_TOKEN=$(cat ~/.config/amp/orb-provider-token)
createos sandbox setup amp --doctor   # checks login, amp and the token; starts nothing
createos sandbox setup amp            # runs Amp's orb provider; leave it running

Run the second command under systemd or launchd so it comes back after a reboot. Run it on one machine per Amp provider: jobs for a thread are kept in order with a lock on that machine, so a second host serving the same provider could race it.

3. Start a thread on it.

amp -ox "your first message" --orb-provider createos

In the Amp app, pick Orb → Self-Hosted → createos in the thread composer.

What happens to a sandbox

Amp jobWhat the CLI does
spawnResume the thread's sandbox if paused, or create it. Set it up. Start amp orb bootstrap inside it as user.
pausePause the sandbox. Disk and memory are kept; compute stops.
deleteDelete the sandbox and its disk.

Every job is safe to repeat. A job that arrives while the sandbox is still pausing or resuming waits for it first. If the CreateOS API cannot be reached, the job fails rather than guess, and Amp tries again on the next message.

The amp-orb template

Amp's own orb image cannot boot on CreateOS, because templates build only from nodeops/sandbox:* and take no COPY or ADD. The CLI ships a Dockerfile that rebuilds what Amp's image contract asks for: git, Node.js, tmux, ripgrep, gh, a user account with passwordless sudo, and amp itself.

The first orb builds the template when it is missing. While it is not ready (up to two minutes), or if the build failed, the orb boots devbox:1 and the CLI installs what is missing in place. A failed template is not rebuilt on its own: read createos sandbox template logs amp-orb, then delete it to retry.

Settings

FlagEnv varDefaultMeaning
--shapeCREATEOS_ORB_SHAPEs-4vcpu-8gbSandbox size for each orb.
--templateCREATEOS_ORB_TEMPLATEamp-orbTemplate each orb boots from.

Pause and resume time grows with memory. Measured: about 30 s to pause and 13 s to resume at 8 GB, about 7 s and 6 s at 1 GB. Pick the smallest shape your builds fit in.

Stop

Press Ctrl+C in the provider window. Jobs already running finish first (up to about five minutes), then it exits. To remove it for good, delete the provider in Workspace Settings → Orbs and check for leftover sandboxes with createos sandbox list.

Limits

  • No Desktop tab. The template has no Wayland stack.
  • ORB_SNAPSHOT_ID is ignored, which Amp's contract allows. Each new thread clones the repository and runs .agents/setup; pausing and resuming the same thread keeps everything.
  • No hostname egress allowlist. Orbs need ampcode.com and your Git host, and CreateOS enforces IP and CIDR egress rules only.

See also