Guide ยท Choosing
A hosted code sandbox, or a VM in your own cloud?
An agent that writes code needs somewhere to run it. There are two broad ways to give it that: a sandbox service that runs your code on its own infrastructure, or a machine in a cloud account you already have. Runlease is the second kind. This page is about when each one fits.
The two approaches
A hosted sandbox is a service. You call its API, it starts an isolated environment on its infrastructure, your code runs there, and you pay the service for the time.
A VM in your own cloud is a machine in your AWS or Google Cloud account. A tool on your computer launches it under your IAM, on your network, and you pay your cloud for it. Runlease is that tool, with the two things raw cloud VMs lack for this job: the machine deletes itself, and it is reachable without a public address.
Side by side
| Hosted sandbox | Runlease, in your own cloud | |
|---|---|---|
| Where the code runs | The provider's infrastructure | Your cloud account |
| Who can see it | You, and whatever the provider's design allows | You. The relay in the middle cannot read the session |
| Reaching private things | Needs a route from the provider to your network | The machine is already on your network, under your IAM |
| What you get | Usually a container or small virtual machine, shaped by the service | A full Linux VM, up to 16 cores or a GPU |
| Time to start | Usually faster: these services are built for it | A VM boot, every time |
| Price | The provider's rate | Your cloud's spot price, nothing added |
| Setup | An API key | A cloud account, credentials, and a subnet that can reach the internet |
| If the vendor goes away | You migrate | It is open source, and the relay can be your own |
Hosted sandboxes differ from one another, and some can be self-hosted. Check the one you are considering against the rows that matter to you.
When hosted is better
- You need an environment in a second or two, many times a minute. A VM boot is too slow for that.
- You have no cloud account, or nobody to look after one.
- The code is small and self-contained: a snippet, a notebook cell, a function.
- You want one bill and an SDK, and where the code runs is not a concern.
When your own cloud is better
- The code, the data or the credentials it touches must not leave your account.
- The job needs to reach things inside your network: a database, an internal registry, a staging service.
- The work is heavy: a real build, a full test suite, a GPU.
- You already have cloud commitments or credits, and want the spend on that bill.
- You want to read the code that handles your sessions. Runlease is open source.
Questions
Can I use both?
Yes, and many teams will: a hosted sandbox for quick snippets, and a leased machine when the work is heavy or must stay inside the account.
Is a VM as isolated as a hosted sandbox?
A VM is a strong boundary, and it is your cloud's, the one your other workloads already rely on. What matters as much is what you put on it: Runlease does not copy your keys or cloud credentials to the machine.
What about a whole team of agents?
Runlease is one person, or one agent, and one machine at a time. Governing many agents across a company is a different problem; that is what Marshal is for.
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.