Skip to content

AgentBox documentation ​

AgentBox creates lightweight, isolated Linux environments for AI agents and applications that are unsafe to run on your own machine. Create a sandbox, transfer files, run commands, and remove the environment when the task is done.

First sandbox ​

Install @abox-dev/sdk for JavaScript, abox-sdk for Python, or github.com/abox-dev/sdk/packages/go-sdk for Go 1.24+. Every SDK reads the API key from AGENTBOX_API_KEY.

mjs
import { Sandbox } from "@abox-dev/sdk";

const sandbox = await Sandbox.create();

try {
  const result = await sandbox.commands.run("printf 'hello from AgentBox'");
  console.log(result.stdout);
} finally {
  await sandbox.kill();
}

The finally block removes the sandbox even when a command fails.

Main concepts ​

  • A sandbox is a temporary Linux microVM for commands, files, and services.
  • A template defines the software and resources available at startup.
  • The SDK manages sandboxes and templates from an application.
  • The CLI provides the same common workflows from a terminal.

Next steps ​