From Shared Process Tree to Dedicated Guest Kernel What the Container-to-Micro-VM Transition Means for Agent State

Micro-VMs let agents keep their state without keeping compute.

· 8 min read
Cover illustration for “From Shared Process Tree to Dedicated Guest Kernel What the Container-to-Micro-VM Transition Means for Agent State”
Agent Isolation · November 9, 2026 · 8 min read · 1,737 words

Firecracker micro-VM isolation gives each AI agent its own guest kernel, while a container shares the host kernel. That boundary changes what an agent can safely own, while snapshot-restore lets it keep its environment across sessions without keeping compute running. The container-to-micro-VM transition is therefore more than a security upgrade. It makes an agent that stays with each user a building block for the architecture.

Why containers cannot be the foundation for real agent state

Linux namespaces give a container its own view of process IDs, mount points, and network interfaces, but its system calls still enter the host’s shared kernel. That kernel remains the authority over files, processes, and memory. For trusted, stateless workloads, this is an acceptable trade because the application does not need to preserve a working environment between interactions. Containers remain appropriate for that job.

Agents place different demands on the boundary. A coding agent installs dependencies and runs package scripts, while a browser agent holds cookies and maintains logged-in sessions. Both accumulate context that needs to survive beyond a single execution. At the same time, AI-generated code must be treated as untrusted because a probabilistic text generator is not an authority that can be trusted with the host kernel.

CVE-2019-5736 illustrates a concrete container escape path. A process running as root, UID 0, inside a container could overwrite the host’s container runtime binary and obtain host-root execution on its next invocation. Standard namespace and capability protections did not prevent the attack, although running as a non-root user inside the container was a direct mitigation. This was a runtime escape. Its relevance is the consequence of crossing the boundary, where credentials and long-lived context belonging to neighboring tenants can become exposed.

How do you give each AI agent its own isolated kernel?

Firecracker uses Linux KVM, with hardware virtualization through Intel VT-x / AMD-V, to give each micro-VM its own guest kernel and virtual address space. Firecracker’s documentation describes how a user-space virtual machine monitor uses KVM to make these machines. Guest code does not gain access to host memory or another VM’s memory through its own address space. The agent can be root inside its guest. That authority is confined to its machine.

Firecracker combines KVM isolation with per-thread seccomp filters, cgroups and namespaces for resource controls, and a jailer process. The jailer sets up privileged resources, including cgroups, namespaces, and a chroot, then drops privileges and executes Firecracker as an unprivileged process. These layers constrain what a compromised virtual machine monitor could reach. Firecracker also uses one process per micro-VM, giving each agent a distinct execution unit whose termination does not require terminating its neighbors.

This changes the permissions an agent can receive. It can install packages, spawn subprocesses, modify its filesystem, and maintain browser sessions inside an environment it is allowed to break and rebuild. Package manager scripts and tool servers with subprocess access no longer run against a kernel shared directly with other agents. An agent can have more freedom inside the guest without getting the same authority over the platform, though access outside the guest still needs policy.

How the kernel boundary enables persistent state across sleep and redeploy

A filesystem capture preserves files, but it does not preserve a running machine. Open file handles, partial computations, background processes, and device state are also part of the execution environment. A container filesystem snapshot leaves that distinction unresolved because the kernel is shared and sits outside the captured filesystem. A guest of its own gives the agent a whole machine within one boundary. Snapshot-restore can then preserve the guest’s execution state together with the filesystem state needed to resume it.

An agent can sleep between interactions and return with its in-memory context intact and its background processes ready to continue. It can return to its working environment without rebuilding it from saved messages and downloaded files. In a human-in-the-loop workflow, that means an agent waiting for approval can remain snapshotted for hours without occupying CPU or RAM. While it waits, its environment is kept as snapshot artifacts on disk.

With copy-on-write restoration, concurrent VMs restored from the same snapshot can share underlying physical memory pages until they modify them. Each instance needs more RAM for the pages it writes. This makes a pattern such as trying five fixes from the same starting state economically plausible.

Why idle agents should pay for storage, not compute

Diagram: Why Idle Agents Should Pay for Storage, Not Compute. Visualizes: Illustrate the contrast between two cost models for a fleet of agents: the 'always-on' model where vCPU and RAM are allocated continuously (costs scale with agents…

In a fleet with an agent for each user, many agents are waiting. They may be waiting for a user, a tool call, or another process. Keeping vCPU and RAM allocated while agents wait makes costs depend on how many agents are provisioned. That is the wrong unit for this product model. A persistent relationship with a user does not require continuously running compute.

Snapshot-restore separates those two obligations. The platform retains the agent’s environment as storage while allocating compute when the agent is active. A scheduler built around that lifecycle can make a fleet of thousands of agents consume compute according to active concurrency. Utilization becomes the central operating measure. With pricing per active CPU-second, the compute bill can then track work.

If each wake required rebuilding the workspace or discarding an interrupted task, lower idle costs would come at the expense of the product’s continuity. Lossless snapshot-restore removes that trade within the captured machine state. Sleeping releases compute while retaining the agent’s working context, and waking restores that context. Idle agents still incur storage costs, but they do not need a standing allocation of CPU and RAM.

Where the industry has already landed: micro-VM isolation as the production baseline for agent workloads

AWS’s use of Firecracker for Lambda and AWS Fargate established the underlying rationale before the current agent platforms. Firecracker was built to run millions of untrusted customer functions on shared fleets with a virtual machine barrier between workloads. Containers alone were not the chosen boundary between strangers’ execution environments. Agent workloads extend that reasoning to generated code that also accumulates sensitive state.

LangSmith Sandboxes brought hardware-virtualized microVMs with snapshots and forks into preview on March 17, 2026, and reached general availability on May 13, 2026. The combination is significant because it pairs isolation with lifecycle operations rather than treating the VM solely as a disposable execution box. Snapshots preserve a working environment, while forks create separate branches from it. Those capabilities address the agent state model directly.

DigitalOcean MicroVMs entered public preview in October 2026 and named per-tenant tool servers and MCP servers as a main use case. Each customer’s tools run in their own VM, applying the same tenant isolation boundary to the services agents invoke. Taken together, these choices show convergence across infrastructure and developer platforms on dedicated guest kernels for untrusted workloads. The shared criterion is tenant isolation, with snapshot and lifecycle capabilities turning that boundary into a foundation for persistent agents.

What agents can own once the kernel boundary is the primitive: a practical inventory

A persistent filesystem gives an agent somewhere to accumulate work. Source files, build artifacts, downloaded assets, and installed packages can survive sleep when the rootfs is retained with the snapshot. An agent can run apt install, pip install, or npm install and return to those packages in its next session. Compilers, language runtimes, and browser dependencies become part of its workspace.

API keys, session tokens, cookies, downloads, and browser profiles can be held separately inside each agent’s guest. A browser agent can therefore retain a logged-in context through a multi-step task without rebuilding its profile at every interaction. Isolation defines which agent owns that context. Secrets still need to be injected with care because a VM boundary cannot fix credentials given to the wrong guest.

Running processes are another part of the inventory. A local server, build watcher, or background job can pause with the machine and resume on wake. The RAM snapshot preserves working memory, including open file handles, partial computations, and the guest-side state of in-progress tool calls. This is more than retaining task history. The product can offer a persistent collaborator whose workspace develops across sessions and whose long-running work can be interrupted without discarding its local execution context.

What the kernel boundary does not solve on its own

Network reachability still needs an explicit decision. Firecracker does not choose which public domains, internal metadata services, or private APIs an agent may call, so egress controls remain necessary. Tool and MCP server permissions also need their own allowlists, particularly where tools expose subprocess execution or external API calls. Isolation does not judge intent or correctness. A bad script can still harm the agent’s own environment or misuse the authority it has been given outside the guest.

The platform must choose which directories are mounted, which are writable, and which outputs are retained. Secrets must be injected with care and kept separate for each agent. Observability also needs to be designed to work across VM boundaries, with structured log export, audit records, and resource metrics. The kernel boundary establishes the scope within which these policies operate, but it does not choose the policies or make generated code compliant.

Building agent products on the kernel boundary as a first-class primitive

Infrastructure that exposes the kernel boundary as an explicit, manageable primitive provides a practical starting point. Developers can then design the agent’s state model, permissions, and lifecycle around what its guest should own. This changes the central design question. Instead of compensating for stateless infrastructure, the product defines which context belongs to an agent and how long that ownership should last. Persistence becomes a property of the environment rather than an application-level attempt to reconstruct it.

Tool integration follows the same ownership model. An agent’s tool server can run inside its guest, with subprocess access, credentials, and permissions scoped to that environment. Network and tool policies then govern the authority that extends beyond it. The infrastructure layer can also handle snapshot-based sleep and wake, so developers do not need to build that lifecycle themselves. This separates product decisions about retained context from the mechanics of scheduling execution.

Unlike a stateless API, this foundation lets each user have an agent that retains a workspace and resumes unfinished work, while compute allocation follows active execution. For products built around persistent collaborators, the kernel boundary is therefore not an isolation feature added after the state model is complete. It is the primitive around which ownership, continuity, and the economics of the fleet are designed.

Sources

  1. Firecracker
Filed underAgent Isolation

More in Agent Isolation