Introduction
Sub-millisecond sandbox snapshots for AI agents
Iris is open-source infrastructure for running code in secure, isolated sandboxes with instant checkpoint and fork.
Your AI agents can experiment freely, break things, and branch from any point in under a millisecond.
What you can do
Execute Commands
Run any shell command inside the VM. Capture stdout/stderr, set env vars, pipe stdin.
File Operations
Read, write, list, move, and delete files. Stat and check existence without exec overhead.
Checkpoints
Snapshot the full filesystem in the background while the sandbox keeps running.
Fork
Clone any running sandbox in under 1ms via copy-on-write. Original stays untouched.
Restore
Rewind the filesystem to any checkpoint in-place. Same sandbox ID and token stay valid.
Services
Long-running background processes with health probes, dependency ordering, and container support.
KV Store
Per-sandbox key-value store for agent state. Supports TTL and atomic batch operations.
Suspend & Resume
Snapshot and stop a sandbox to pause compute billing. Resume exactly where it left off.
Quick example
import { Sandbox } from '@iris/sdk'
// IRIS_API_KEY is read from the environment automatically
const sandbox = await Sandbox.create()
// Run commands
const result = await sandbox.exec.run('echo "Hello from Iris!"')
console.log(result.stdout) // "Hello from Iris!\n"
// Checkpoint current state
const cp = await sandbox.checkpoint.create({ name: 'baseline' })
// Fork from here — original sandbox keeps running
const branch = await sandbox.fork()
await branch.exec.run('rm -rf /tmp/data') // branch is expendable
await branch.kill()
// Original sandbox is untouched