Inside the Hardware Wall Built for Agentic AI

The hardware boundary that sits between every AI agent and your systems.

Cloud Infrastructure · AI Security · Computer Science · AI Agents
The Sandbox: Firecracker and the MicroVM Revolution
When AI agents started writing and executing code in continuous loops, the software industry discovered that its thirty-year-old answer to untrusted code was no longer good enough. The replacement came from an unexpected direction: a fifty-thousand-line virtual machine built inside Amazon to run serverless functions at a scale most people cannot picture.
2026

The problem of running code you do not fully trust is as old as operating systems, and for decades the working answer was containers. Docker wrapped Linux’s isolation primitives into a usable interface and persuaded most of the software industry that containers were the mature, production-ready answer to running untrusted workloads.

01 The Trust Boundary
Container vs microVM isolation side by side. On the left, three processes share one kernel: one CVE affects every tenant. On the right, each guest runs its own kernel behind a hardware-enforced boundary. The structural difference explains why Leaky Vessels hit Docker and Kubernetes but left Lambda untouched.
The Trust Boundary Why shared-kernel isolation fails for untrusted code CONTAINER ISOLATION App A App B App C process process process namespace boundary · software only Shared Linux Kernel ~30M lines of C Host Hardware Leaky Vessels · CVE-2024-21626 one kernel bug exposes every tenant MICROVM ISOLATION App A App B App C guest kernel guest kernel guest kernel hardware-enforced boundary · KVM Firecracker VMM + KVM 50K lines of Rust Host Hardware 96% attack surface reduction escape requires breaking hardware virtualization In one model an escape is an architectural consequence; in the other it requires breaking the CPU.
Container (shared kernel)
MicroVM (hardware isolated)
I. The Wall That Containers Could Not Hold

They were an answer. They were not the answer.

In January 2024, a vulnerability disclosed under the name “Leaky Vessels” made that distinction concrete. CVE-2024-21626, a flaw in runc, the low-level container runtime that underpins Docker, Kubernetes, and nearly all production container infrastructure, let a malicious container image reach the host filesystem through a file descriptor that runc failed to close before spawning the container process. Patches shipped within days, but the structural lesson was harder to patch.

Containers share the host kernel. Every container on a machine is separated from every other container by roughly thirty million lines of C, and from the host itself by exactly the same boundary. A container escape is not a product defect that can be fixed permanently; it is an architectural consequence that will keep producing new CVEs. That trade was tolerable when containers held your own tested software. It became a different problem when containers started holding code written by a machine.

II. Fifty Thousand Lines of Rust

Firecracker is a virtual machine monitor, not a container runtime. It was built by teams at Amazon Web Services and open-sourced in 2018. Rather than emulating a general-purpose PC the way conventional hypervisors do, it uses the Linux Kernel-based Virtual Machine subsystem but exposes the smallest device surface a serverless function or a code interpreter actually needs: a paravirtualized network interface, a block device, a serial console, an interval timer, a KVM clock, and a stub keyboard for reset. There is no BIOS, no PCI bus, no USB stack, no graphics adapter.

This austerity is what produces Firecracker’s headline numbers. A microVM boots to userspace in roughly 125 milliseconds, runs under five megabytes of memory overhead, and can be created at up to 150 instances per second on a single host. The comparison that explains those numbers is with QEMU, the general-purpose emulator that conventional virtual machines depend on. QEMU weighs in at more than 1.4 million lines of code. Firecracker contains roughly 50,000 lines of Rust, a language chosen for its memory-safety guarantees at system-programming latencies. That is a 96 percent reduction in attack surface by line count. The VMM process runs unprivileged, wrapped by a companion process called the jailer in Linux cgroups, namespaces, and a tight seccomp-BPF system-call allowlist, so that even a successful escape would find itself contained a second time.

The scale at which this infrastructure now operates is difficult to absorb. AWS Lambda processes more than 15 trillion requests each month, and nearly every one begins inside a Firecracker microVM.

02 Inside a Firecracker MicroVM
Five layers from guest workload to Linux KVM, with everything that was deliberately removed. Performance stats on the left show what the stripped-down architecture achieves. The right column shows what was cut relative to QEMU, with the 28× size reduction by line count as the summary metric.
Inside a Firecracker MicroVM The minimal stack that boots in 125 milliseconds Guest Workload user code + minimal Linux kernel VIRTUAL HARDWARE virtio-net · virtio-block · serial console KVM clock · interval timer Firecracker VMM 50,000 lines of Rust · unprivileged Jailer cgroups · namespaces · seccomp-BPF allowlist Linux KVM · Host Kernel hardware virtualization · CPU extensions PERFORMANCE 125 ms boot to userspace < 5 MiB memory overhead 150 / sec creation rate per host ~28 ms snapshot restore PRODUCTION SCALE 15 trillion Lambda requests / month 1.7 trillion Prime Day invocations STRIPPED AWAY BIOS firmware PCI bus USB controller graphics adapter sound card floppy controller CD-ROM emulation most of what QEMU emulates is simply absent VS QEMU 1.4M lines general-purpose emulator 28× smaller codebase, by line count Smaller attack surface and faster boot are both consequences of removing what serverless functions never needed.
Firecracker VMM + KVM
Jailer (defense in depth)
Virtual hardware layer
III. When the Model Writes the Weapon

The cloud operations argument for microVM isolation was compelling on its own terms. The reason the rest of the software world started paying close attention is what happens when large language models grow capable enough to write syntactically correct programs and the tool-augmented reasoning paradigm becomes standard practice: give a model an interpreter, let it write a snippet, run the snippet, observe the output, and repeat. Modern coding agents like Claude Code follow this architecture, and a single session with a frontier model can fire thousands of tool calls, each one a shell command or a Python expression on whatever substrate is underneath.

The threat model this creates is unlike anything in the prior history of sandboxing. The adversary is not the user attacking the platform. The adversary is the platform’s own model, manipulated through a prompt-injected webpage or a poisoned dataset, attacking whatever execution environment it was handed. A namespace container is not enough.

The commercial response has been rapid, and one company illustrates the trajectory. E2B, the startup that emerged as a dedicated sandbox infrastructure provider for AI agents, runs each session in a dedicated Firecracker microVM with its own kernel and network namespace. By the time it closed a $21 million Series A in July 2025, it had launched hundreds of millions of cloud sandboxes and reported adoption across more than half of Fortune 500 companies. Other infrastructure providers, including Fly.io and AWS itself with Bedrock AgentCore, have built directly on the same foundation.

MicroVM sandbox infrastructure for AI agents

A high tech city diorama rendered as a tilt-shift aerial photograph, each illuminated district representing a stage in the agent sandbox loop. The amber viaduct connecting districts acts as its own light source, casting warm reflections onto the obsidian plazas below. Labels identify each stage: Golden Snapshot, Clone, Agent Executes, Output Capture, Dissolution. Daice Labs.

IV. Freeze, Copy, Resume

The architectural feature that transformed Firecracker from a Lambda backend into practical infrastructure for continuous agent loops is snapshot-and-restore. A running Firecracker microVM can serialize its complete memory, CPU register state, and device state to disk, then resume from that file in a new process. Cold-booting a microVM takes 125 to 200 milliseconds. Restoring from a snapshot takes single-digit to low-double-digit milliseconds. Memory pages load copy-on-write, so 50 sandboxes restored from the same snapshot share most of their physical RAM.

AWS brought this technique to production as Lambda SnapStart in 2022, and independent load tests of a Spring Boot application found that median cold-start time dropped from 6.58 seconds to 0.42 seconds, a reduction of more than 92 percent.

For AI agent workloads, the same primitive is what makes per-request isolation economically viable. A platform can maintain a single golden snapshot of a fully provisioned Python environment, with the interpreter loaded, dependencies cached, and library state warm, then stamp out a fresh isolated copy in milliseconds every time the model decides to run code. When the agent turn ends, the VM is destroyed. There is no leftover process, no residual filesystem state, and no channel through which one session’s data can reach the next.

03 The Agent Sandbox Loop
Five stages from golden snapshot to controlled dissolution and back. Stage 3 is the focus: LLM-written code executing inside a fully isolated guest. The dashed violet loop arrow shows how the same warm snapshot powers every subsequent tool call without any residual state carrying forward.
The Agent Sandbox Loop How snapshot-and-restore makes per-turn isolation economical STAGE 1 Golden Snapshot Python loaded deps cached memory warm STAGE 2 Clone MicroVM ~28 ms copy-on-write restore STAGE 3 Agent Executes LLM-written code runs inside isolated guest STAGE 4 Return Output stdout, errors, artifacts back to the model STAGE 5 Destroy MicroVM no state kept no leakage to next session next tool call · same warm snapshot · fresh clone Why this matters for agentic AI HARDWARE ISOLATION Prompt-injected code cannot reach the host INSTANT WARM START 28 ms restore beats 125 ms cold boot by 4× CLEAN STATE PER TURN Every clone begins from a verified snapshot E2B, Fly.io Sprites, and AWS Bedrock AgentCore all run on this loop.
Golden Snapshot (preserved state)
Active execution
Destroy (clean teardown)
V. The Outer Limits

Firecracker is not the only sandboxing model competing for this territory. WebAssembly runtimes like Wasmtime and V8 isolates start in microseconds rather than milliseconds because they skip the Linux kernel entirely, which is why Cloudflare Workers and Fastly’s Compute@Edge are built on this approach. The trade-off is compatibility. A WebAssembly module can only access what its host explicitly exports, so it cannot, in general, run an arbitrary pip-installed data-science stack or spawn arbitrary subprocesses. MicroVMs run actual Linux binaries inside a real kernel. That is their advantage and their overhead. Other approaches, including Google’s gVisor and the Kata Containers project, occupy adjacent positions in the same landscape, each trading isolation strength against compatibility and runtime cost in different ways.

The boundary that none of these approaches has moved is the cloud operator itself. A microVM protects tenants from one another, but the hypervisor host retains access to guest memory. AMD SEV-SNP and Intel TDX change that by encrypting VM memory so that even the host cannot read it, placing trust in hardware rather than software. As AI models handle increasingly sensitive data and make increasingly consequential decisions, the combination of microVM isolation with hardware-encrypted memory is likely to become the standard architecture for trustworthy execution, not a specialized option for security-conscious teams.

The sandbox, after four decades, is finally catching up to what the code inside it can do.

Key references: Agache, A. et al., “Firecracker: Lightweight Virtualization for Serverless Applications,” USENIX NSDI 2020. AWS Security Bulletin AWS-2024-001, January 2024. Palo Alto Networks Unit 42, “Leaky Vessels: Container Escape Vulnerabilities,” January 2024. E2B Series A announcement, July 2025. AWS re:Invent 2025, session CNS423: Lambda at scale. AWS Bedrock AgentCore documentation, July 2025. Northflank benchmark report, Cloud Hypervisor vs gVisor, 2026. Cloud Hypervisor v52.0 release notes, May 2026. NVIDIA security guidance for agentic AI workflows, 2025. AWS research, “Restoring Uniqueness in MicroVM Snapshots,” arXiv 2021. AWS Lambda SnapStart documentation. Aurora DSQL announcement, AWS re:Invent 2024.