Skip to content

Sandboxes

Sandboxes are the fundamental unit of execution in Runra. Each sandbox is an isolated cloud workspace where agents can safely run code, modify files, and operate.

create → start → [running] → pause → [paused]
→ resume → [running]
→ terminate → [terminated]
StateDescriptionConsumes runtime?
creatingSandbox is being provisionedNo
runningActive, can execute commandsYes
pausedState preserved, not executingNo
terminatedSandbox is destroyedNo

Each sandbox has configurable resource limits:

const sandbox = await runra.sandboxes.create({
image: "node:22",
resources: {
cpu: 2, // vCPUs (2, 4, or 8)
memoryMb: 4096, // Memory in MB
diskMb: 10240, // Disk in MB
},
});

Runra Sandbox uses VM-backed isolation via CubeSandbox:

  • File system: Each sandbox gets its own workspace. No cross-workspace access.
  • Processes: Processes in one sandbox cannot see or interact with another.
  • Network: Configurable network policies per sandbox.
  • Resource limits: Hard CPU, memory, and disk limits.
sandbox.on("started", () => console.log("Sandbox ready"));
sandbox.on("paused", () => console.log("Sandbox paused"));
sandbox.on("terminated", () => console.log("Sandbox ended"));