All guidesWalkthroughs

Run tests or a one-off command

Run tests, builds or one-off commands in a fresh Linux microVM with airgap_sandbox_run. Node, Python and Rust images are picked from your files.

Run tests or a one-off command

Short answer: Use airgap_sandbox_run for any ad-hoc test run, build, bug reproduction, or script you do not want executing on your laptop. airgap uploads only the files you pass into /workspace inside a fresh Linux microVM on GMI AgentBox v2, runs the command, scrubs secrets from stdout and stderr, and deletes the sandbox on exit.

use airgap and run the tests
reproduce issue 88 in a sandbox with node 20

Auto-detected runtime images

When you omit the image parameter, airgap picks a Debian Bookworm container image based on the root files in your snapshot. On images that ship Corepack, setup runs corepack enable automatically so pnpm and yarn work without global installs, and sets TMPDIR=/root/tmp so large builds do not fill the 1 GiB /tmp tmpfs.

Repo root containsDefault imageBest for
Cargo.tomldocker.io/library/rust:1-bookwormRust crates, cargo check, cargo test, clippy
package.jsondocker.io/library/node:20-bookwormNode.js, TypeScript, npm, pnpm, yarn, Vitest, Jest
Anything elsedocker.io/library/python:3.12-bookwormPython scripts, pytest, shell tools, data parsing

Direct MCP tool call

{
  "tool": "airgap_sandbox_run",
  "arguments": {
    "command": "npm ci --ignore-scripts && npm test",
    "files": {
      "package.json": "{ \"name\": \"demo\", \"scripts\": { \"test\": \"node --test\" } }",
      "index.test.js": "import test from 'node:test'; import assert from 'node:assert'; test('ok', () => assert.equal(1+1, 2));"
    },
    "timeout_secs": 120
  }
}

Sizing, timeouts, and exit codes

Setting / SignalDefault or meaningHow to adjust
Instance typegmi.sandbox.medium (2 vCPU, 4 GiB)Set GMI_AGENTBOX_INSTANCE_TYPE to small (1 vCPU, 2 GiB) or large (4 vCPU, 8 GiB)
Command timeout120 s (range 1..1800 s)Pass timeout_secs or update defaults with airgap_configure
Template cachingKept as airgap-{image}-{instance_type}First run builds the template; later runs reuse it and start much faster
Exit code 137Out-of-memory kill (SIGKILL)Switch to gmi.sandbox.large or narrow the test target
Exit code 124 / 130Timed out / cancelledNever marked passed; sandbox cleanup still runs and is awaited

Credentials and concurrency: airgap_sandbox_run needs only GMI_AGENTBOX_API_KEY. Up to 4 sandbox jobs run in parallel per server process. For why a remote microVM isolates better than local Docker, read Docker vs. remote microVMs.

Keep reading

All 12 guides

Audit a dependency manifest

Catch install hooks and risky packages before anything installs.