MetorialDocs

Sandboxes

Give your agents isolated Linux machines to run code, store files, and serve apps.

Sandboxes give your agents their own Linux machines. Start a machine in seconds, run commands and move files from the CLI or the SDKs, and let it pause or hibernate when it goes idle.

What you'll learn

  • What machines, images, disks, and firewalls are
  • How to install the CLI and the SDKs
  • Where to go next

How sandboxes fit together

A sandbox setup has four resources:

  • Machines are isolated Linux VMs. Each one has its own CPU, memory, and a writable root disk.
  • Machine images decide what a machine boots with. Start from a managed image such as Debian, Node.js, or Python, or build your own from a Dockerfile.
  • Disks store data that outlives a machine. Attach them to any machine in the same region.
  • Firewalls control which hosts a machine can reach on the internet.

You also pick a region for every machine and a size (CPU and memory). Images and disks must be available in the machine's region.

Rendering diagram…

Install the tools

Sandbox commands live in the metorial-admin CLI. Install it and sign in:

npm install -g @metorial/admin
metorial-admin login

Homebrew (brew install metorial/tap/metorial-admin) and the install script (curl -fsSL https://cli.metorial.com/install.sh | bash) work too.

To manage sandboxes from code, install the SDK:

npm install metorial

The SDKs authenticate with an API key.

Guides