Quickstart
Flashbox gives your agent a Linux sandbox for thin commands: fetching pages and APIs, reading and searching files, small edits and short scripts. You pay per command, idle sandboxes cost nothing, and every command ends in a checkpoint you can roll back to.
1. Get an API key
Sign in with GitHub and create a key in the dashboard. Keys start with fbx_ and are shown once.
export FLASHBOX_API_KEY=fbx_...
export FLASHBOX_API_URL=https://flashbox.app
2. Create a sandbox and run a command
With curl:
curl -s -X POST $FLASHBOX_API_URL/v1/sandboxes \
-H "Authorization: Bearer $FLASHBOX_API_KEY" -H "content-type: application/json" -d '{}'
# {"id":"sbx_...","state":"running","head":"ck_...", ...}
curl -s -X POST $FLASHBOX_API_URL/v1/sandboxes/sbx_.../commands \
-H "Authorization: Bearer $FLASHBOX_API_KEY" -H "content-type: application/json" \
-d '{"command":"curl -s https://example.com | grep -o \"<title>.*</title>\""}'
# {"exitCode":0,"stdout":"<title>Example Domain</title>\n", "checkpoint":{"id":"ck_...","kind":"files"}, ...}
With the TypeScript SDK (one file, no dependencies: download it):
import { Flashbox } from "./flashbox.ts";
const fb = new Flashbox(); // reads FLASHBOX_API_KEY and FLASHBOX_API_URL
const sb = await fb.create();
const r = await sb.run("python3 -c 'print(sum(range(100)))'");
console.log(r.stdout, r.checkpoint.id, r.cost.usd);
3. Undo and branch
Every command returns a checkpoint id. Roll the sandbox back to one, or fork it into new sandboxes:
const before = await sb.run("echo draft > notes.md");
await sb.run("rm notes.md");
await sb.rollback(before.checkpoint.id); // notes.md is back
const [a, b] = await fb.fork(before.checkpoint.id, 2);
4. Give it to your agent
Point any MCP client at the hosted endpoint, https://flashbox.app/mcp, with your key as a bearer token. See MCP.
What to read next
- Commands: timeouts, the CPU budget, what counts as heavy
- Checkpoints: files and memory, rollback, fork, retention
- Billing: what a command costs and what is free