Run your first sandbox
You need an AgentBox account, an API key, and JavaScript or Python.
1. Create an account
Register in the AgentBox dashboard. New projects receive 1,000 ₽ of promotional credit; a bank card is not needed to start.
2. Add an API key
Open your project in the dashboard, choose API keys, and select Create API key. Put the key in the AGENTBOX_API_KEY environment variable. Do not commit it to the repository. See API key safety.
3. Install the SDK
npm install @abox-dev/sdk4. Run a command
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();
}Run the file with Node.js or Python. A successful run prints hello from AgentBox and then removes the sandbox.
Next, try transferring files or installing a package.