How Purpose-Built Multi-Tenant Platforms Enforce Agent State Boundaries That General Infrastructure Cannot
Giving each agent its own microVM moves tenant isolation below the model's decisions.

Per-user persistent AI agent deployment at scale needs more than a memory store and a tenant identifier. A purpose-built platform gives each agent an isolated machine, preserves its state between sessions, and releases compute when it sleeps. The central distinction is structural isolation rather than a software convention that depends on the model choosing the right customer’s data.
Why application-layer boundaries collapse under agent load
Two agents use one shared state store. One retrieves a history that belongs to the other customer because a request arrives with the wrong tenant scope. This is the concrete failure that multi-tenant agent systems must prevent, even when the model itself issues the wrong request. The history did not need to leave the platform. A boundary failed inside it.
The underlying mismatch is between stateless request-response infrastructure and work that unfolds across many steps. An agent retrieves context, calls tools, writes results, and starts further actions, generating far more backend activity per user interaction than a standard prompt-response system. Tenant scope can be lost at each step. Concurrent agents add cross-agent writes to that problem, while hostile retrieved content can push a model toward restricted resources without a person ever navigating through a constrained interface.
A tenant_id passed through a prompt or supplied as a model-generated argument is therefore not an isolation boundary. It is a value the model can get wrong. Tenant scope has to come from authenticated context and remain intact through tools, databases, queues, caches, artifacts, credentials, and logs. Otherwise, two resources with the same friendly name, such as production or orders, can become an authorization problem.
How stateful memory makes the boundary problem self-compounding over time
An agent’s memory is useful because later sessions can act on what earlier sessions learned. But keeping state also lets malicious state live on after the original input is gone. A fresh conversation does not necessarily mean a clean agent. The stored state can connect otherwise separate opportunities.
The Stateful Agent Backdoor paper demonstrates this through cross-session attack programs. In the experiment, the team fine-tunes models to learn local attack behaviors, then uses a single trigger injection and persistent memory to link those behaviors across sessions. The control structures include sequential execution with conditional waiting, branching and merging, looping, and condition accumulation. An attack can wait until it has the tools or permissions it needs, then go on without the attacker doing anything more.
That finding is narrower than a claim that conversation histories leak between customers, but it establishes a serious persistence risk. The attack does not need one uninterrupted session. Memory lets it keep the progress it has made toward a later action, including multi-step exfiltration.
Filtering, rate limiting, and prompt hardening may constrain inputs or activity, while the isolation model still requires an independent execution boundary around that state to withstand a model attempting to retrieve or manipulate restricted data.
Why the database layer alone cannot substitute for compute-layer isolation
Database isolation addresses a real part of this risk. Shared tables with row-level security, schema-per-tenant designs, and database-per-tenant designs place progressively different boundaries around stored data. Row-level security can be strong when the application role cannot bypass it and tenant context is set server-side. The distinction is where enforcement happens. A database that rejects an out-of-bounds query does not depend on a developer remembering to append a filter.
That distinction also applies to retrieval beyond ordinary table queries. Vector similarity searches and graph traversals need storage-level pre-filters outside the generative model’s control. Authorization must be checked before a query runs, including when it comes from background workers or internal tool calls. Being inside the platform should not by itself give something broad access.
However, the primary database is only one shared subsystem. Cache keys, queue messages, object storage namespaces, vector collections, browser sessions, sandboxes, credentials, and logs all need consistent tenant ownership. Even when a query has the right tenant scope, it cannot fix a queue message with the wrong scope or a browser session shared across tenants. The boundary has to survive each handoff.
Generated code exposes the remaining gap most clearly. It runs in a process, a container, or a virtual machine. A vulnerability in unprotected code execution can escalate to remote code execution on the host. Database isolation is still needed, but it cannot control that compute surface or take the place of a boundary around execution.
What compute-layer isolation actually means and how microVMs deliver it

Instead of relying on an agent framework to keep tenants apart inside a shared execution environment, a microVM gives the agent its own kernel, memory, and disk. The model can choose the wrong action without being entrusted with the machinery that separates its machine from another tenant’s. That is the architectural pivot. Isolation moves below the agent’s decisions.
Firecracker provides this microVM model, with Cloud Hypervisor as another implementation. Docker/runc containers, by contrast, share the host kernel, so a kernel vulnerability or sufficiently privileged container escape can cross the shared boundary. gVisor provides an intermediate approach by implementing the Linux system call interface in user space. It offers meaningful separation for internally trusted workloads without the operational cost of full virtual machines, but it is not the same boundary as a separate guest kernel.
MicroVM isolation’s value is that tenant separation no longer rests on the model, its prompt, or framework checks behaving correctly. The execution boundary exists beneath those components.
Firecracker restores a snapshot by memory-mapping the snapshot file, loading CPU state, and resuming execution from where it stopped. A checkpoint preserves guest RAM, including kernel and process state, together with device and vCPU state. The agent can therefore keep its execution state while its machine sleeps, with both persistence and isolation.
How the snapshot-fork pattern makes per-agent isolation economical at swarm scale
Giving each customer a machine is costly if it has to keep running while the customer is inactive. The snapshot-fork pattern removes that assumption. An orchestrator claims a pre-warmed sandbox from a pool or restores a snapshot keyed by session, and commands run through an in-guest agent. An egress proxy mediates outbound requests. At idle timeout, the orchestrator snapshots state and releases compute, so billing follows active time rather than the lifetime of the customer relationship.
Reusable snapshots also let a platform create many isolated sandboxes from one captured filesystem and memory state. That is useful for batch work as well as evaluation and reinforcement learning. A pre-configured environment can initialize thousands of parallel rollouts without rebuilding the environment for each one.
Computer-use training makes the need concrete. The model interacts with a virtual computer and receives feedback through screenshots, accessibility trees, or other environment signals. Those environments need to be isolated, deterministic, and cheaply forkable. Snapshot-fork supplies a common starting state and separate machines rather than asking concurrent rollouts to share a mutable desktop.
The same economics apply to customers who return intermittently. Pre-booted machines can be claimed in milliseconds from warm pools that scale to zero when idle, while sleeping machines can wake in roughly a second. This makes one machine per agent sustainable for thousands of cold tenants. Lower active-time cost is therefore not merely a pricing benefit, but part of what makes the isolation architecture deployable.
What production SDK architecture reveals about the gap between frameworks and infrastructure
The OpenHands Software Agent SDK paper, accepted at MLSys 2026, shows how much engineering production agent frameworks already handle. OpenHands V0 was monolithic, sandbox-centric, and tightly coupled, assuming that all execution occurred in a sandbox. Local execution consequently needed special-case handling and duplicated implementations. Security and flexibility had become entangled. The architecture made changing one harder without affecting the other.
V1 separates the system into four packages, namely SDK core, tool implementations, workspace implementations, and an agent API server. Sandboxing becomes opt-in rather than mandatory, and applications consume and extend the SDK. The paper reports substantially fewer system-attributable failures than V0 with negligible event-sourcing overhead. These are genuine gains in reliability and deployment flexibility, not merely a rearrangement of interfaces.
The SDK also integrates lifecycle control, model-agnostic multi-LLM routing, and built-in QA and security analysis. Yet its DockerWorkspace and KubernetesRuntime use container-based execution. OpenAI’s Agents SDK added native sandbox execution in April 2026, further showing why the word sandbox alone does not identify the underlying isolation model.
The Sema Code paper from Midea AIRC describes another substantial framework-level approach. It combines multi-tenant engine isolation, FIFO input queuing with safe session reconstruction, and four-layer asynchronous permission control. Those mechanisms improve separation inside the engine, but their correctness remains part of the security boundary. The residual gap is categorical rather than competitive, because software-enforced tenant separation and hardware-backed machine separation operate at different layers.
Where physical isolation becomes a compliance requirement, not just a design preference
Healthcare makes the consequences of that difference concrete. Legacy EHRs may have APIs that leave things out, charge high fees for access, or make only some of their functions available. Agents working with those systems may therefore have to use the UI, inside the same virtualized desktop environments that run the EHR. The desktop becomes the place where the agent does sensitive work. It is not merely a visual interface.
Traditional automation depends on fixed pixel locations or rigid selectors that can break when an interface changes. Visual AI computer-use agents address that brittleness by interpreting screens semantically. But the ability to work through a screen also puts patient information within the agent’s reach. An agent reading a record inside a Citrix session must not be able to write it into shared memory accessible to another tenant’s agent.
HIPAA and similar frameworks require demonstrable access controls, audit logs, and data boundaries. A tenant identifier in a prompt cannot establish those controls. Separate disks, credentials, and per-tenant network egress provide infrastructure boundaries on which enforceable controls can be built.
That does not make a microVM, by itself, proof of compliance or establish a universal legal requirement to use one. It makes compute separation a concrete way to support requirements that application conventions cannot satisfy alone. In healthcare, financial services, and other regulated environments, the isolation model must support evidence of enforcement rather than an expectation that the agent will respect instructions.
How do you deploy thousands of persistent agents without rebuilding infrastructure?
Each agent gets its own machine. Machines may run Linux, Windows, or Android, according to the environment the agent needs. Their boundaries sit below application logic. The platform’s job is to keep that ownership intact as machines start, sleep, resume, and end.
A customer’s dedicated agent can sleep with execution state preserved, while a disposable sandbox for untrusted or LLM-generated code is deleted with its disk when the task ends. Deleting the sandbox keeps its local state from living on in a later session. Keeping those lifecycles distinct is especially important when durable memory can also preserve hostile state.
Per-second billing without idle charges makes dedicated machines economically usable, while a per-tenant egress proxy places outbound control outside the agent’s application logic. A real, visible desktop also allows human takeover when needed. For regulated deployments, the platform can handle app setup, images, and network configuration for legacy environments including Citrix, EHR, LOS, and DMS. These capabilities must all agree on which tenant owns what and work together.
Kubernetes and container orchestration solve scaling, scheduling, and restart problems, but those primitives alone do not preserve a stateful agent’s work across suspension. Frameworks supply agent logic and lifecycle controls, while database policies protect stored records. Assembling these parts can work only if the resulting system closes the boundaries between them. Purpose-built infrastructure makes those connections part of the design, with a structural execution boundary underneath them rather than a contract that every model and software component must remember to honor.


