
Landlock, gVisor, or Firecracker? Choosing a Sandbox for AI Agents
Every developer I know who runs coding agents has done it. Some flag like --dangerously-skip-permissions or --yolo, an agent churning through a repo late at night, nobody watching. It works wonderfully right up until you think about what the agent can actually reach. Your SSH keys sit in ~/.ssh. Your cloud credentials sit in the environment. The agent runs as your user, so it can read all of it, and the only thing between those keys and a model that hallucinated a “debugging step” is a probability distribution having a good day.
The stories are not hypothetical. A founder told TechRadar how an AI-powered tool wiped a company database and its backups in about nine seconds while attempting a routine task. The realistic threat was never Skynet. It is a competent intern with your login who sometimes follows instructions planted in a web page or a code comment. Security people call this prompt injection. The defense is always the same shape. Stop asking the agent to be careful and take away its keys instead.
A lot of tools promise to do exactly that, and comparing them is genuinely confusing because their marketing speaks different languages. nono talks about Landlock and Seatbelt. NVIDIA OpenShell talks about gateways and policy engines. E2B and microsandbox talk about Firecracker and libkrun. Google talks about gVisor. These are not six arbitrary feature sets. They are points on two axes, and once you see the axes, every tool in the field becomes placeable in about ten seconds.
One fact about your computer first
Programs never touch your files or your network directly. When anything wants to read a file, open a connection, or spawn a process, it makes a request to the kernel of the operating system. These requests are syscalls, and the kernel is the bouncer that handles all of them.
Hold onto that, because every isolation technology is just a different answer to one question. How do you intercept, or remove, the agent’s ability to make bad requests?
Axis one, wall strength
Picture three levels of paranoia.
Level one, a locked room in your house. The agent still runs on your normal operating system, sharing its kernel with everything else you do. But at the moment the process starts, the kernel is told, this process may see these folders and these network addresses, nothing else. On Linux the mechanism is called Landlock. On macOS it is Seatbelt. nono and NVIDIA OpenShell both build on this level.
Two properties make it better than it might sound. The rule is not something the agent is asked to follow, the kernel simply refuses the request, the same way a locked drawer does not care about your reasoning. And the rule is one-way. Once applied it cannot be lifted, not by the agent, not by a bug, not even by the sandbox tool itself. There is no admin override to talk your way into.
The honest weakness is the shared house. If someone finds a hole in the foundation, a bug in the Linux kernel itself, the room walls stop mattering. For an agent that misreads a task and deletes the wrong folder, this never comes up. For deliberately hostile, exploit-grade code, it might.
Level two, a movie set of your house. The agent does not run against your real kernel at all. It runs against an impersonator, a program called the Sentry in gVisor, that pretends to be an operating system and decides, for every syscall, what to pass along to the real system underneath. The agent can rummage through the set’s drawers all day. Smash through a set wall and you find more set. To reach anything real, it has to con the actor, and the actor is a much smaller, better-audited target than an entire kernel. Google’s GKE Agent Sandbox works this way, as does Modal.
Level three, a separate building on another plot of land. The agent runs inside a tiny virtual machine with its own private kernel, separated from yours by the CPU’s hardware virtualization. That is not a wall you can drill through. It is empty land. Even a perfect kernel exploit inside the sandbox just wrecks the sandbox’s own kernel, and yours never notices. E2B uses Firecracker, the same microVM technology behind AWS Lambda. microsandbox uses libkrun. Docker Sandboxes, since Docker Desktop 4.60, puts each sandbox in its own microVM too.
The catch is that you have to build the other building. Images to maintain, a boot to wait for, memory overhead, and a dev environment to rebuild inside every sandbox. Modern microVMs boot in the 150 to 200 millisecond range, so this is far cheaper than it used to be, but the workflow friction is real, and it is the number one reason people abandon sandboxed setups.
One correction that matters if you were about to write “just use Docker”. A plain container is not level three. Containers share the host kernel. A Docker container is a partition inside your house, drywall instead of a foundation, and a kernel exploit goes through it. Docker the company now ships actual microVM sandboxes precisely because the container alone was never the boundary people assumed.
Axis two, rule precision
Wall strength is the axis everyone argues about. Rule precision is the axis almost nobody labels, and for the realistic threat it matters more.
Most sandboxes give the agent’s whole session one permission set. This folder, these destinations, this credential, for the entire run. OpenShell works this way, and it is fine, until you notice that the agent’s session includes every tool the agent calls. git, gh, curl, your package manager, all running with the same badge the agent has.
nono’s answer is the most interesting idea in the field. Its supervisor brokers every tool call, and each call gets an ephemeral micro-sandbox built for exactly that invocation. Walk through what happens when the agent runs gh issue view.
First the supervisor checks the command shape against policy, is “issue view” allowed, is “pr merge” not. Then it verifies the executable and builds a fresh sandbox around just this call, read-only workspace, bounded output, network reachable only through nono’s proxy. The sandbox receives a phantom GH_TOKEN, a fake. The real token never enters the sandbox. When the tool talks to GitHub, it goes through the proxy, which checks the HTTP method and path against policy, swaps the phantom for the real credential, and forwards the request over TLS. When the call ends, the sandbox is destroyed. If a command matches no rule, the supervisor can pause and ask a human, approve or deny, and everything that happened lands in a tamper-evident audit log where each entry fingerprints the previous one.
Think about what that does to credential theft, the most realistic attack on any agent. An attacker who tricks the agent into dumping its environment gets a theater prop. The real secret lived one hop away the entire time, shown to nobody, wiped at exit.
That is why I keep repeating a line that sounds wrong at first. For the threat most of us actually face, rule precision beats wall strength. A locked room with a broker at the door defends your credentials better than a separate building with one keycard for everything.
The field, placed
With both axes in hand, here is the whole landscape.
| Tool | Wall | Rules | Hosting | The one-line verdict |
|---|---|---|---|---|
| nono | Landlock / Seatbelt | per session and per command | single binary, self-host | lightest setup, strongest credential story |
| OpenShell | Landlock + seccomp + egress proxy | per session | gateway, self-host | fleets, GPU work, live policy reload |
| GKE Agent Sandbox | gVisor | per session | any Kubernetes cluster | agent runtime as a K8s primitive, GA since May 2026 |
| microsandbox | libkrun microVM | per session | self-hosted server | the self-hosted E2B, strongest wall you own |
| Docker Sandboxes | microVM | per sandbox | Docker Desktop | least ceremony if you already live in Docker |
| E2B | Firecracker microVM | per sandbox | managed SaaS | the best SDK, if sending code to an API is acceptable |
Two placements deserve a sentence of explanation. OpenShell, from NVIDIA, announced at GTC 2026 and still alpha, is the most “platform” of the self-hosted options, a gateway control plane, declarative YAML policies, hot-reloadable network rules, and an experimental GPU path. If your question is ten agents with shared, auditable policy, it is built for that question. nono is the opposite bet, a single Rust binary from the team behind Sigstore, zero infrastructure, and a registry of signed per-agent profiles, including one for Hermes, the agent framework I run. It scales down better than anything else in the table.
A natural pairing, by the way. The two axes are not in competition. If you ever run genuinely hostile code, user-submitted snippets, scraped scripts, you want a microVM as the outer wall and per-command policy as the inner rules. The layers compose.
What I would run, and when
Honesty first. I do not run any of these in anger yet. This is a shopping list built from a threat model, not a war story, and working through it convinced me the honest conclusion is not “tool X wins”. It is that each workload, and each condition around it, picks a different tool. Choosing once and defending the choice is how you end up either unprotected or over-engineered.
Start from the threat model, which for me, and probably for you, is accidents and exfiltration. An agent that misreads a task, follows an injected instruction, or helpfully pastes a secret into the wrong place. It is not a funded attacker with a fresh kernel zero-day. That baseline narrows things:
- Level one walls are sufficient. The kernel refuses the bad file read and the bad connection regardless of how the agent feels about it.
- Per-command brokering is worth more than any additional wall, because credentials are the crown jewels and brokering means the agent never holds them.
- Friction decides adoption. A sandbox that is annoying gets switched off in week two, and then you are running
--yolowith none of the above. The tool that costs nothing to run is the one that stays on.
Then the conditions do the picking:
- A coding agent on my own laptop. nono, no contest. One binary, a profile per agent, read-only for the reviewers and read-write for the builders, brokering on for whatever touches secrets.
- The same agent moved to a small Linux VPS. Still nono. Nothing about a VPS changes the tier, Landlock is already in the kernel, and the zero-infrastructure property matters more on a box you also sleep next to.
- The day the workload turns hostile. User-submitted snippets, scraped scripts, anything where exploit-grade code is plausible. That is the day to put microsandbox underneath, microVM as the outer wall, policy as the inner rules.
- A fleet with shared policy, audit requirements, or GPUs. OpenShell or GKE Agent Sandbox. Now the gateway and the version-controlled YAML are earning their keep, and the decision between them is a real one, K8s affinity versus GPU path, not a default.
- Zero ops budget, and sending code to an API is acceptable. E2B, and stop feeling bad about it.
Your conditions will differ. Run hostile input, move up a wall level. Run a platform for other people’s agents, buy the gateway. The mistake to avoid is treating the choice as an identity. Pick per workload, and re-pick when the workload changes.
Sources worth your time, the nono docs (the tool-sandbox page is the best single read on brokered execution), the OpenShell overview, a solid practitioner walkthrough of nono profiles, and comparison writeups of E2B-style managed sandboxes and self-hosted microVMs.

