Kernel-Level Isolation as the Missing Requirement in Untrusted Agent Runtime Decisions
Micro-VM isolation provides the kernel boundary that containers cannot offer hostile agent code.

Firecracker micro-VM isolation for AI agents gives each workload its own guest kernel behind a hardware virtualization boundary. For agents executing arbitrary, potentially hostile code, that boundary is a runtime requirement. Shared-kernel containers cannot provide it through tighter configuration, while micro-VMs provide the containment layer that authorization, network policy, and tool security must build on.
Why agent runtimes are now trust infrastructure, not compute choices
A modern agent executes generated scripts, installs packages, reads files, accesses credentials, and calls APIs across production infrastructure. It can also manipulate databases and coordinate multi-step workflows. These are not merely different ways to generate text. Each capability opens a path from model output to an action against a real system, so a mistaken or manipulated instruction can become a destructive operation.
That changes the runtime’s job from running code efficiently to containing code it cannot trust before it runs. The gap between what an agent can do and what it should do requires authorization and containment. Before the Tool Call: Deterministic Pre-Action Authorization for Autonomous AI Agents describes this as a structural gap, with no standard enforcement mechanism at the individual tool call boundary. Yet narrowing permissions takes setup time and can slow development. Treating that work as optional leaves the production trust model subordinate to development convenience.
What the shared-kernel model actually exposes when agent code is hostile
Containers use Linux namespaces and cgroups to keep processes apart, but those processes still share the host kernel. The distinction becomes decisive when code is hostile. An agent that writes Python scripts, installs packages, and manipulates file descriptors exercises the kernel’s exposed interfaces through its container. A vulnerability in that shared kernel can turn a compromise of one workload into a compromise of the host and its other tenants. The container boundary does not supply an independent kernel between them.
Ambient authority creates a separate route to damage. Agent processes inherit credentials, filesystem permissions, and network access from their environment, even when a particular operation needs only a fraction of that authority. A manipulated agent can therefore become a confused deputy, using legitimate permissions on behalf of an attacker. Traditional RBAC evaluates the authorized role and its permissions regardless of whether an instruction came from a legitimate request or a hidden prompt injection. The destructive action can pass the identity check.
The OAP paper describes attack patterns including malicious MCP tools inheriting agent permissions, hidden document instructions leading to SSH key exfiltration, and compromised agents using inherited service mesh credentials for lateral movement. These attacks need not exploit the kernel. Narrower permissions can reduce misuse, but they cannot remove the shared kernel from the architecture.
What runtime isolation options exist for untrusted AI agents in production
Containers such as Docker and Podman use namespaces and cgroups to separate processes while retaining a shared host kernel. They fit trusted, internally authored workloads, but do not establish the kernel boundary required for hostile agent code. User-space kernels such as gVisor interpose another layer by intercepting and re-implementing system calls. Indirect access to the real kernel provides stronger separation than standard containers with less overhead than a full VM, but introduces syscall compatibility gaps and leaves the user-space kernel as an escape target.
Micro-VM approaches such as Firecracker and Kata Containers move the boundary into hardware virtualization. Each workload gets its own guest kernel, using KVM through Intel VT-x or AMD-V. A compromised guest kernel is therefore not itself a compromised host kernel. Reaching the host requires defeating the virtualization boundary as well. This is a change in architecture, rather than a stricter configuration of the same process boundary.
Confidential computing addresses a further trust requirement. AMD SEV-SNP and Intel TDX provide hardware-encrypted memory isolation that protects sandbox data even from the host OS and hypervisor. That protection is relevant when handling PII, financial data, or healthcare records under a threat model that includes the host. It answers a different question from whether hostile guest code can reach neighboring workloads.
How Firecracker's security architecture creates a layered hardware boundary
KVM places the guest kernel in a separate hardware domain through Intel VT-x or AMD-V. Per-thread seccomp filters then restrict the system calls available to the Firecracker process, limiting what a compromised VMM process could do on the host. Cgroups and namespaces add host-side resource isolation. These controls work together so that no single mechanism has to withstand every failure.
Namespaces and cgroups surround a VMM whose guest already has a hardware boundary, instead of providing the primary separation between hostile code and a shared kernel. Firecracker’s seccomp documentation states that filters apply per thread before guest code runs. The architecture therefore combines guest isolation with restrictions on the host process responsible for that guest.
Firecracker boots in milliseconds with approximately 5 MB of memory overhead, supporting thousands of micro-VMs on a single server. AWS Lambda demonstrates the density behind this approach. Amazon Bedrock AgentCore Runtime, generally available in 2025, applies the session-to-micro-VM pattern to Code Interpreter, Browser, and custom tools. These examples connect the architecture to agent execution rather than leaving it as a virtualization abstraction. The layered design also leaves room for domain-specific VMMs, rather than fixing every workload to one runtime shape.
What the trust boundary does and does not contain
A micro-VM contains a guest-kernel compromise behind the virtualization boundary; it does not make the whole system invulnerable. It separates tenant filesystems and memory, and removes the shared-host-kernel escape path that standard containers expose. Those are concrete protections against cross-workload compromise. They do not revoke valid credentials or decide whether a tool call serves an authorized purpose.
For example, an agent with permitted access to private APIs can misuse that access from inside its VM. Public internet access, internal metadata services, and arbitrary DNS also require explicit egress controls. An agent can still act as a confused deputy under virtualization because downstream systems still get requests made with legitimate credentials. A hardware boundary cannot infer the provenance of the instruction that caused them. Credential scope and pre-action authorization must address that threat.
The OAP paper distinguishes sandbox containment from authorization before execution. Its adversarial testbed reported social engineering success of 74.6% under a permissive policy, compared with zero under a restrictive OAP policy across a comparable population of attempts. Network policy, filesystem scope, package governance, secrets management, logging, and lifecycle controls still determine the system’s risk profile.
How snapshot-restore closes the latency and cost objections to micro-VM isolation
Micro-VM cold starts impose a real latency penalty relative to containers, particularly in interactive agent products. A runtime can boot a micro-VM once, capture its memory and block device state to local NVMe, and restore subsequent sandboxes from that prepared state. It no longer needs to repeat the full boot sequence for every new sandbox. Much of the apparent isolation penalty becomes an engineering problem in preparation and restoration.
Idle cost follows a different mechanism. Agents often compute briefly during a tool call and then wait while the model reasons, so an always-running VM spends much of its life holding resources without doing useful work. A snapshot-and-restore scheduler can retain state in storage and restore compute when needed. During the idle interval, storage replaces running compute as the cost driver. The objection based on always-on VMs therefore assumes a lifecycle that agent runtimes need not use.
A user waiting several seconds for an agent to wake experiences the infrastructure delay as a broken feature, regardless of the security benefit. Snapshot scheduling must therefore connect runtime lifecycle to user-visible responsiveness. This same mechanism makes it affordable to run per-user agent fleets because persistent state can be kept without keeping compute running.
Per-user agent fleets and why isolation must be structural, not policy-enforced
AWS Lambda provides a production-scale example of Firecracker-backed isolation for multi-tenant execution. The relevant property extends beyond density. Firecracker’s one-VMM-per-micro-VM design maps onto a product architecture in which each tenant gets an isolated VM and receives its identity at runtime. The base image need not know anything about a particular tenant.
A persistent agent adds a session lifecycle to that architecture. Each session can keep its micro-VM and state across multiple invocations, then terminate the VM with memory sanitization when the session ends. The kernel boundary exists throughout that session. A policy mistake cannot make separate guest kernels share a kernel, though mistakes in credentials or external data access can still put tenants at risk.
The concern is both whether a tenant can escape and whether a manipulated agent can reach another tenant’s data. Separate kernels provide the structural answer for runtime-local access, while authorization and credential scope govern access through services. For agent-native products, this separation makes the architecture defensible to enterprise buyers, regulators, and red teams. It is a foundation for the product pattern.
Where the tooling layer intersects the isolation boundary
The Model Context Protocol’s 2026-07-28 specification removed protocol-level sessions and the initialize handshake, so each request is self-contained. Requests can land on any server instance behind a plain round-robin load balancer without shared protocol state. This places state management on the infrastructure layer. A persistent micro-VM session and a stateless protocol request therefore occupy different layers of the system. Their trust boundaries must work together even though they have different lifecycles.
The OAP paper documents 492 or more MCP servers exposed without authentication or encryption in production. The attacker enters through an accessible tool interface. In the ClawHavoc supply-chain attack, attackers used another way in by placing malicious skills with prompt injection payloads, hidden reverse shells, and token exfiltration routines in a public skill registry. Runtime isolation can contain the code as it runs even when the supplied tool cannot be trusted.
The developer workflow must preserve these distinctions. A CLI or SDK that deploys code into an isolated micro-VM but exposes an unauthenticated MCP endpoint has moved the vulnerability. Going from code to a live API endpoint in a single push is safe only when the tooling enforces the runtime’s trust model. Authentication, scoped authority, and tool-call authorization belong on that path.
Making the runtime decision based on the trust model, not the benchmark
The first decision is how much trust the executed code deserves. Internally authored code that passed CI/CD presents a different threat model from generated scripts or user-supplied binaries installing unvetted packages. For LLM-generated or user-supplied code, the appropriate default is hostile. Shared-kernel containers do not satisfy the resulting kernel-containment requirement. Benchmark and cost comparisons become useful only after the required boundary has been established.
A team making this decision should answer four questions. What code will execute, and does each untrusted workload receive its own kernel. Can the runtime restore persistent state in under a second without keeping compute running while it is idle. Can egress controls and scoped credentials restrict the authority available inside that boundary. Do the protocol and tooling enforce authorization and produce a verifiable audit record at the tool call boundary.
Policy remains a binding constraint, but it cannot substitute for isolation. Policy determines what an agent is allowed to do, while containment limits what compromised execution can reach despite that policy. A runtime built around separate kernels, scoped identities, persistent snapshots, and controlled termination treats those responsibilities as architectural requirements.


