Guide ยท Cost
Spot VMs for AI coding agents
An agent that builds and tests needs a real machine, often a large one, for an hour or two. Spot capacity is the cheapest way to get it. The catch is that nobody remembers to turn the machine off. A lease does.
Why spot fits agents
Spot capacity is the same hardware as an ordinary cloud VM, sold cheaper because the cloud may take it back. That is a bad deal for a database and a good one for an agent's work, which is short, repeatable and already saved somewhere else: the code is in git and the result is a patch or a test report.
Spot capacity costs 60 to 90% less than on-demand. You pay your cloud directly, at your own rates, with nothing added by Runlease.
What it costs
runlease up prints the hourly price and the cost of the whole lease before the machine starts, so an agent, and you, see the number first.
$ runlease up -p aws -s compute.large --ttl 2h -d $ runlease list # each machine with its hourly rate and what its lease will cost
Because the machine is in your account, the charge appears on your own cloud bill under your own tags and budgets. There is no second bill and no usage to reconcile.
When the cloud takes it back
A spot VM can be reclaimed at any time. That is a property of spot capacity, not a failure. On Google Cloud a reclaimed machine is deleted. On AWS it terminates.
Plan for it the way you would for any disposable machine:
- Keep the source of truth off the machine. Push branches, and
runlease pullthe artifacts you want to keep. - Make the job restartable. A manifest's
setupsteps rebuild the same machine on the next launch. - Split long jobs. Four machines for thirty minutes are less exposed than one machine for two hours.
The lease
Every machine has a lease, two hours unless you say otherwise. A timer on the VM deletes the instance when it runs out. Nothing outside the VM has to be running for that to happen: not your laptop, not the agent, not the relay.
$ runlease snooze box 1h # the work needs longer $ runlease down box --yes # the work is done early $ runlease down --leaked # delete stopped machines whose lease is over
This is the difference between cheap per hour and cheap in total. An agent that crashes mid-task leaves behind a machine that costs money for two more hours, not two more months.
Sizes
Sizes are portable names that map to a concrete type on each cloud. runlease catalog prints the full mapping.
| Size | Google Cloud, first choice | AWS, first choice |
|---|---|---|
compute.small | e2-small | t3.small |
compute.medium | e2-medium | c5.large |
compute.large | e2-standard-4 | c5.xlarge |
compute.xlarge | e2-standard-8 | c5.2xlarge |
compute.2xlarge | e2-standard-16 | c5.4xlarge |
compute.gpu | one NVIDIA T4 on AWS (g4dn.xlarge); not a GPU on Google Cloud yet | |
Questions
Does Runlease add a fee?
No. Runlease is free and open source under Apache-2.0. You pay your cloud for the VM and nothing to us.
Which clouds?
AWS and Google Cloud. Machines run in your own account, on your network, under your IAM.
Can I use on-demand capacity instead?
Runlease launches spot machines. For work that must not be interrupted, a spot machine is the wrong tool, with or without Runlease.
Running agents for a whole team? Runlease gives one agent one machine. Marshal, from the same team, runs AI coding agents in isolated pods inside your own VPC, with credential isolation, audited egress and live tool policies.