Firecracker vs gVisor vs Kata Containers for Agent Sandboxing
Compares how three sandbox runtimes handle syscalls from untrusted agent code.

A post-install hook from a typosquatted package, dropped into an agent's sandbox during a routine pip install, can start scanning the local network before anyone notices the package name was misspelled on purpose. The question that decides whether that scan goes anywhere is where the syscall that triggers the scan gets serviced and how much of the host kernel sits behind that boundary once the hook starts running, not which vendor's logo is on the sandbox. That is the single architectural fact this comparison is built around, and it applies specifically to one workload shape: model-generated code, arbitrary dependency installs, and outbound network access, running on nodes that also carry other tenants' work.
The isolation boundary as the architectural decision for agent sandboxing
Firecracker, gVisor, and Kata Containers differ in device models, in language, in how they plug into Kubernetes, and in dollars per idle sandbox per month. Kata Containers and Firecracker both answer by giving the workload its own guest kernel, so the host never sees raw syscalls at all, only KVM ioctls and the virtio device models the VMM exposes, while gVisor instead terminates most syscalls in the Sentry, a Linux-compatible kernel written in Go, forwarding only a narrow seccomp-filtered subset to the host. Cold-start time, memory cost per sandbox, how far a compromise spreads, and the monthly bill all follow from that one decision rather than from any feature checklist layered on top of it.
This question stopped being a niche concern for CI/CD pipelines somewhere in the 2025-2026 run of agent deployments and became a mainstream infrastructure decision. Microsoft's security team published research documenting prompt injection chains that escalated into remote code execution inside AI agent frameworks, with Microsoft Semantic Kernel named as the specific target. AWS, Azure, and GCP have all moved toward hardware-enforced isolation, Firecracker, gVisor, Hyper-V, for their highest-risk serverless and sandboxed workloads, even as runc continues to run elsewhere in their fleets, which reads as the clearest signal available that the industry has already settled this argument in practice.
How plain containers fail the agent threat model
Standard containers fall short here for a structural reason, not because someone misconfigured a policy: every syscall an agent makes travels straight to the host kernel. Namespaces and cgroups scope what a process can see and how much of the machine it can consume, but neither one stands between a syscall and the kernel that services it, so a kernel vulnerability reachable from inside one container is reachable from every container sharing that node. CVE-2024-21626 in runc, and CVE-2025-59528, which carries a CVSS score of 10.0, are not theoretical concerns but documented escape routes through exactly that shared surface. The realistic danger for agent workloads is rarely an elegant kernel exploit. It is an agent running code an LLM generated in response to hostile input, a post-install hook buried in a typosquatted package, a shell command smuggled in through a prompt injection, executing with the same permissions as the process that launched it. Containers that share a kernel remain the right tool for code a human wrote and a CI/CD pipeline reviewed; they stop being the right tool the moment the code in question came from a model responding to input nobody vetted. None of the three runtimes discussed here solve the network half of the problem on their own: egress filtering and knowing which tenant's traffic is which remain the operator's job no matter which isolation layer runs beneath it.
How gVisor's user-space kernel shrinks the syscall surface

gVisor's answer to the shared-kernel problem is to intercept syscalls before they reach Linux at all, which cuts the attack surface sharply without changing who ultimately owns that surface. The Sentry, the Linux-compatible kernel at the center of gVisor, is written in Go and runs as an unprivileged, heavily seccomp-filtered process in user space; a second process called the Gofer handles filesystem access on the host's behalf. Where a bare container can reach more than 400 raw syscalls on the host, gVisor narrows that to roughly 200 to 250 exposed to the agent, and the calls that matter most for an escape, kexec_load(), create_module(), raw socket operations, are implemented inside the Sentry but switched off by default, requiring an explicit --net-raw flag to enable, and none of them ever reach the host kernel directly. That narrowing is real and it is large, but it does not add a hardware wall: the host kernel underneath the Sentry is still the same kernel every other tenant on the node shares, so a vulnerability reachable through the Sentry's allowed syscall set is, in principle, reachable from any of them. GPU access is structurally constrained the same way: the Sentry's user-space interception sits at a point that blocks direct PCIe passthrough, so teams that need GPU inside the sandbox must look elsewhere.
The performance and density numbers follow from running a kernel in user space rather than in silicon. Teams running gVisor in production report sandbox creation times in the range of 200 to 600 milliseconds and Sentry overhead between roughly 18 and 50MB per sandbox, which makes gVisor the densest of the three options by a wide margin. The tradeoff is most visible in I/O-heavy and network-heavy work, where single-syscall interception adds a commonly cited 10 to 30 percent of overhead against native containers, and agent code that compiles projects and streams tool output back to the orchestrator sits closer to that syscall-heavy end of the spectrum than a typical web server does. What offsets the latency cost is how cheap gVisor is to adopt: it ships as an OCI runtime, runsc, that slots in behind a Kubernetes RuntimeClass, so a pod opts into isolation with a single field in its spec and keeps the same images, volumes, and kubectl workflow everyone already uses. Google runs it at genuine hyperscaler volume inside GKE Sandbox, and GKE Agent Sandbox reached general availability on May 20, 2026, after growing more than tenfold in sandbox volume on GKE in under five months following its KubeCon NA preview in November 2025. Scale at Google does not settle the shared-kernel question for every operator, either: GKE Sandbox's threat model is not automatically the same as a multi-tenant agent platform where the code running inside is actively hostile and any given tenant's session might already be compromised. While gVisor meaningfully reduces what the host kernel exposes, it still shares that kernel across every tenant on the node, a distinction that comes into sharper focus once set against Firecracker's approach, where each agent's guest kernel is walled off by the VMM and the shared-kernel surface disappears entirely, at the cost of carrying more memory per sandbox.
How Kata Containers adds a guest kernel per pod while staying compatible with the standard container orchestration interface
Kata Containers takes a different route to the same problem: instead of narrowing what a shared kernel exposes, it gives each pod a guest kernel of its own inside a lightweight VM, and because Kata is a pluggable interface rather than a single hypervisor, the numbers that matter depend far more on which backend runs underneath than on anything about Kata as a brand. Kata wraps Firecracker, Cloud Hypervisor, QEMU, or Dragonball behind a standard OCI runtime interface, and it is the only one of the three isolation layers covered here that functions as a first-class Kubernetes RuntimeClass, so the scheduler, the CNI, and kubectl all see what looks like an ordinary pod. That design means escaping a Kata sandbox requires breaking out of the guest kernel and then out of the hypervisor underneath it, a materially taller climb than defeating a single shared kernel, and one that demands a second, separate exploit before a compromise can reach any neighboring tenant.
The backend choice changes almost everything downstream. On QEMU, cold starts run from around half a second to a full second and guest overhead costs between 50 and 130MB per pod, the heaviest footprint among all the options compared here, bought in exchange for QEMU's maturity as a device model. Swap in the Firecracker backend and boot time drops toward roughly 125 milliseconds with overhead down in the tens of megabytes, but Firecracker has no native support for virtio-fs or 9p, so Kata-on-Firecracker needs the nydus snapshotter and a userspace nydusd daemon just to get a root filesystem into the microVM, an extra moving part in the storage path that Kata-on-QEMU simply doesn't carry. Cloud Hypervisor sits as a third option, and choosing it narrows the VMM's attack surface considerably compared to QEMU's sprawling C codebase.
Density is where the QEMU backend's weight becomes a real constraint rather than an abstract one: at 50 to 130MB per pod VM, a warm pool of a few hundred idle sandboxes can eat a substantial share of a node's memory, which pushes production Kata fleets toward cold-booting on every task or toward adopting the Firecracker backend instead. On a 16 vCPU, 64GB RAM node, Kata supports roughly 100 to 200 sandboxes, the lowest density of the three architectures at equivalent hardware. Kata does recover ground on GPU access, since its hardware virtualization path supports VFIO device passthrough and gives the sandbox real GPU access, something gVisor's architecture rules out. The case for Kata ultimately rests on where a team is starting from: an organization that already runs a Kubernetes platform can adopt Kata's RuntimeClass path at a fraction of the cost of standing up a Firecracker control plane from nothing.
Firecracker's minimal device model and jailer architecture

The architecture splits cleanly into two pieces: the jailer sandboxes and restricts the privileges of the VMM process itself with seccomp filters and Linux namespaces, limiting the impact of a VMM vulnerability, while the VMM, a roughly 50,000-line Rust codebase that earns its position through deliberate minimalism rather than feature breadth against QEMU's vast C codebase, interfaces with KVM and exposes its control surface as an HTTP API over a Unix socket, leaving a drastically smaller surface for the attacker to land on after escaping the guest kernel. Even in the worst case, a full guest compromise, the attacker lands somewhere with no host filesystem access, no network beyond whatever tap device was configured, and no path to privileged syscalls, because the jailer's seccomp filter holds regardless of whether the VMM itself has a flaw in it.
What makes this isolation affordable rather than merely secure is how little performance it costs and how cheap it is to keep idle. Guest CPU performance lands within a few percent of bare metal and added network latency is negligible, so the tax for hardware-level isolation is close to zero for compute-bound agent work. Cold boot runs around 125 milliseconds, and the snapshot-and-restore path brings a warm resume down into the tens of milliseconds, which is the mechanism that actually changes the economics of running a large, mostly-idle fleet of agent sandboxes rather than paying full cold-boot cost on every task. GPU workloads get the same VFIO passthrough path Kata offers, with near-native performance, though passthrough weakens the microVM's isolation boundary somewhat through DMA access, a tradeoff worth weighing rather than a reason to rule it out.
None of this comes free of operational work, and it would be dishonest to present Firecracker as a drop-in replacement for a managed runtime. Building directly on Firecracker means owning image distribution and caching, the TAP/TUN networking and routing layer, orchestration, warm pools, autoscaling, observability, and incident response, none of which Firecracker ships with on its own. That is a real cost, and it sits opposite Kata's RuntimeClass on-ramp: Kata lets a team already running Kubernetes adopt VM-level isolation by changing a field in a pod spec, while Firecracker demands a control plane built from scratch in exchange for the tightest boundary and the lowest idle cost of the three. AWS has made that trade at scale already: Lambda and Bedrock AgentCore Runtime both run AI agent tools, Code Interpreter and Browser among them, inside Firecracker, one session mapped to one microVM each time. Maritime operationalizes the same principle for persistent agent deployment: every agent runs inside its own Firecracker micro-VM with a dedicated guest kernel, so the isolation boundary is not something an operator configures after the fact but a structural property of the deployment itself, fixed before the first syscall is ever made.


