Docs
Run one sandbox. Then run thousands.
Pick how you’ll call Kalworks. Every path ends the same way: one command ran, you saw its output, and you saw what it cost.
pip install kalworks
export KALWORKS_API_KEY=kw_live_…
import kalworks
with kalworks.sandboxes.create(workload="rl-v1") as sb: # stops on exit
r = sb.run(["python", "--version"])
print(r.exit_code, r.stdout, r.cost)Choose a path
Start from wherever you write code
- You’re writing the codePython or TypeScript SDK. Create a sandbox, run a command, read the result.
- Your agent runs the codeGive it Kalworks as tools over MCP, with a key that caps what it can spend.
- You call HTTP directlyEvery console action has a REST endpoint, with idempotency and request IDs.
- You want to see it firstClick through one sandbox in the console. No code, under $0.01.
Your first ten minutes
Six steps, each with a result you can see
- Sign upEmail and an organization name. No card needed.
- Get a keyThe quickstart makes one for you, scoped to sandboxes and expiring in 7 days.
- Run one commandA sandbox starts from the sample environment, runs your command, and returns the exit code and output.
- See what it costMachine time and charges so far, with the rate version, on the same screen.
- Release itBilling stops when release is confirmed. Sandboxes also stop themselves after 10 minutes.
- Run a fleetSame environment, many sandboxes. Come back to what passed, what’s safe to retry, and what it cost.
Run a fleet
Many sandboxes, one pinned environment
A fleet starts every sandbox from the same environment digest. Choose whether to start with the slots we can grant, or wait for all of them. Set a budget and we stop creating sandboxes when it's reached.
Python
fleet = kalworks.fleets.create(
name="eval-batch-043", workload="rl-v1",
machine="standard-2", slots=48,
if_partial="start", # or "wait"
retry="infrastructure_only", budget_usd=20,
)
results = fleet.wait() # returns when every task has an outcome
fleet.retry(results.safe_to_retry)Task outcomes
Every task ends in one of five outcomes
Exit codes describe the command. Your tests decide whether the eval passed. We tell you when a machine broke.
How billing works
You pay per machine-hour from ready to release confirmed. Queueing and booting are free. Charges stay provisional until the period closes, then go onto your invoice. See pricing
- PassedYour tests said the task succeeded.
- FailedYour tests said it didn’t. That’s a real result, so we never retry it.
- InterruptedWe lost the machine or couldn’t start it. Safe to retry. The API calls it `interrupted`.
- Still runningThe task hasn’t reported yet.
- Not classified yetIt finished but no report arrived. Check its output.
Run your first sandbox in under a minute.
No card needed. Your first run costs under a cent.
Start free