Skip to content

Documentation

Runra Sandbox Docs

Runra Sandbox gives your AI agents isolated cloud environments for running code, writing files, installing packages, and connecting to existing agent loops. The SDK is E2B-compatible, with Runra-native API keys and endpoints.

  1. Quickstart - create your first sandbox.
  2. Connect LLMs - use a sandbox as an agent tool.
  3. Upload and download files - move data in and out.
  4. Install custom packages - add dependencies.

A Runra sandbox is a short-lived cloud workspace. You create it from your application, run code or shell commands inside it, optionally persist work by writing files, and terminate it when the task is complete.

import { Sandbox } from "runra";
const sbx = await Sandbox.create();
try {
const execution = await sbx.runCode('print("hello from Runra")');
console.log(execution.logs.stdout.join("\n"));
} finally {
await sbx.kill();
}
VariableRequiredDescription
RUNRA_API_KEYYesYour Runra API key, for example runra_....
RUNRA_API_URLNoDefaults to https://box.runra.dev.
RUNRA_TEMPLATE_IDNoDefault sandbox template ID.