Fast
Fork in tens of ms. Fan out without waiting in line.
CoW snapshot restore. Parallel children, wall time stays near one spawn.
v0.6 · call-tree provenance · usage metering
Secure, isolated sandboxes for every agent sub-task. Fan out in parallel, recurse safely, and trace every LLM call back to its root, with no shared state and no credential leaks.
faster than Docker
Host: familiar sandbox API
from sandy import Sandbox
sb = Sandbox.create()
sb.files.write("job.py", "print(sum(range(10)))")
print(sb.commands.run("python job.py").stdout)
sb.kill()
Benchmarks
n=10, bare-metal Firecracker · KVM host
Recursive agents: host + guest (no string soup)
# host
from sandy import SandyIsolatedREPL
with SandyIsolatedREPL(context_payload=docs) as env:
result = env.execute_code(PARENT)
tree = env.get_call_tree()
# guest (PARENT): each call = child sandbox
summaries = rlm_query_batched([
f"Summarise:\n{doc}" for doc in context["docs"]
])
answer = {"summaries": summaries}
How it works
Light sandboxes. Fast spawn. Children that work in parallel, then leave a full call tree behind.
Fork in tens of ms. Fan out without waiting in line.
CoW snapshot restore. Parallel children, wall time stays near one spawn.
Every sub-agent gets a sealed runtime. No shared state. No keys inside.
Separate filesystem, process tree, and network. Host broker for LLM calls.
The whole tree walks home as JSONL: who called whom, at what depth, for how much.
run_id, call_id, depth, parent links, cost tags for pass-through billing.
Demo use cases
Each demo spawns multiple child sandboxes via rlm_query() and returns a full call-tree.
Two (or three) passages summarised in parallel child sandboxes, merged by the parent into a single brief.
Three child sandboxes argue FOR, AGAINST, and as JUDGE on a given topic. The judge delivers a verdict.
Four specialist reviewers (security, performance, correctness, and style) each analyse a code snippet independently.
N contestants each solve a coding problem independently. A judge child selects the winner and explains its reasoning.