Designing AI Agents

Tenant-Scoped Execution Boundaries as the Architectural Foundation for User-Level Agent Isolation

Hardware VM boundaries per tenant prevent agent code from compromising shared infrastructure.

· 8 min read
Cover illustration for “Tenant-Scoped Execution Boundaries as the Architectural Foundation for User-Level Agent Isolation”
Per-User Agent Patterns · November 5, 2026 · 8 min read · 1,869 words

Per-user persistent AI agent deployment at scale requires a dedicated micro-VM boundary, with identity, credentials, and state scoped to the same tenant. Snapshot-restore scheduling makes that separation practical because idle agents incur storage charges alone.

Why shared execution environments cannot contain agentic workloads

A shared-pool failure can start when one tenant’s agent gets stuck in an excessive automation loop and the workloads next to it lose throughput. The postmortem must examine why the execution environment let the agent’s misbehavior affect another tenant. Traditional SaaS controls, including separate database rows, role-based access controls, and scoped API keys, assume that the vendor controls the code that runs. Agents executing arbitrary, AI-generated code invert that assumption.

Three distinct failure modes follow from shared execution. Blast radius describes a failure or exploit propagating through a shared kernel or resource pool. State contamination occurs when conversation histories, intermediate artifacts, or credentials become observable across sessions because isolation stops at the process level. Noisy-neighbor interference needs no malicious intent at all. Measurements of co-located workloads show 5–50% performance degradation from interference alone, making resource contention a containment problem as well as a performance problem.

The damage can also reach the control plane. LoginRadius’s engineering breakdown describes how prompt injection, memory poisoning, excessive automation loops, and misconfiguration can escalate privileges, manipulate memory layers, and provision unauthorized identities. These are not merely slow requests. When the execution boundary sits above a shared kernel, application-level permissions cannot by themselves contain everything the workload can do.

Why containers set a ceiling on isolation that hardware virtualization breaks through

Containers give each workload its own process tree and its own views of the network and filesystem, but every container on a node still shares the host kernel. That kernel remains the common attack surface. Namespace separation changes what a process can see without giving each tenant an independent kernel boundary. Kubernetes’ documentation describes containers as offering “a weaker isolation boundary” than hardware-based virtual machines. This limit belongs to the design.

gVisor presents a meaningful objection to this comparison. Its user-space kernel interception layer narrows the shared kernel surface without the operational cost of full VMs, making it defensible when the threat model is limited to session leakage. The distinction is the enforcement mechanism. The interception layer becomes the boundary, but it does not provide hardware-enforced memory separation between tenants. For arbitrary, AI-generated code, moving the software attack surface is not equivalent to placing a hardware boundary below the kernel.

How a dedicated guest kernel per tenant removes the shared surface that software cannot protect

A micro-VM gives a tenant its own guest kernel, with hardware virtualization enforcing the boundary beneath it. With that boundary in place, a guest-kernel compromise alone does not breach the host or other tenants. The kernel is no longer shared tenant infrastructure. The remaining attack surface is the hypervisor’s virtual machine monitor, or VMM, rather than the host kernel exposed to every workload. Firecracker narrows that surface with a VMM written in Rust and a deliberately small device model.

This changes how the three failure modes are contained. A compromised guest is bounded by its VM rather than sharing a kernel with neighboring workloads. State held inside that boundary is not exposed through a common guest kernel. Resource contention still requires enforcement, but CPU and memory pressure can be controlled at the hypervisor layer independently of application behavior. Hardware isolation supplies the foundation for those controls. It does not replace them.

AWS Bedrock AgentCore runs each agent session in a dedicated micro-VM with isolated CPU, memory, and filesystem, providing tenant-level compute isolation. Vercel Sandbox, generally available January 30, 2026, uses “Hive,” its internal platform for orchestrating Firecracker micro-VM clusters across regions, to run untrusted or AI-generated code. These implementations support the architectural choice. They demonstrate adoption of the mechanism, while the reason for choosing it remains the boundary beneath the guest kernel.

How identity, credentials, and state must be scoped to the VM boundary to make it hold

Compute isolation is incomplete if an agent can use identity tokens outside its tenant domain. The VM must set the scope of what runs inside it and the authority that workload has. LoginRadius’s framework makes tenant context a primary identity attribute, requiring authorization to validate both the agent and the tenant resources it may access. Any validation outside that tenant domain must fail automatically. Short-lived, tenant-bound tokens limit cross-tenant reuse, while sender-constrained tokens prevent replay from a different VM context.

Every API invocation, memory access, tool execution, and delegation request must validate tenant context when the action executes. The framework requires denial when agent identity, tenant association, delegation source, resource ownership, and policy scope conflict. Enforcement cannot depend on developer discipline. Policy engines must enforce the same boundary even when an agent takes a series of actions that no one expected.

A separate kernel cannot protect conversation history that an external storage path exposes to another tenant. The persistent filesystem should therefore scope session artifacts, intermediate computations, and conversation history to the VM. With storage-level path isolation, that separation does not depend on the application filtering access. AgentCore’s architecture applies the same rule through a Tier → Tenant → User hierarchy for knowledge-base documents, memory, model access, and cost tracking.

Credentials require their own scoped delivery mechanism because shared secrets can bypass otherwise isolated compute and storage. Secrets injected into an agent VM must belong to its tenant and remain inaccessible to neighboring VMs or the hypervisor layer. Delivery is part of the security boundary. A tenant-scoped proxy provides credentials without using environment variables that host processes can see. Identity, state, and credentials thus each require enforcement at the point where they could otherwise cross the VM boundary.

How MCP tool calls and the agent gateway propagate or break tenant scope at the protocol layer

MCP standardizes tool connectivity, but standard connectivity is not tenant isolation. A tool server receiving a request without tenant context can break the boundary even when the originating VM and identity token are correctly scoped. The request must preserve its authorization context. Otherwise, the tool has to act on information that the protocol exchange has dropped, and each implementation must use its own filtering logic to keep tenants apart.

AgentCore’s architecture initializes its MCP Gateway client with tenant-scoped headers, including X-Tier, X-Clinic-ID, and X-S3-Prefix. Those headers carry tenant context in every call through the gateway, so each tool does not have to copy the filtering logic. The gateway becomes an enforcement point. It can restrict a tool such as read_file to a tenant’s root directory and assign different capabilities by tier, including code execution for one tier and read-only search for another. Routing, rate limiting, access control, and observability belong at this shared control point.

MCP’s stateless protocol revision of July 28, 2026, makes each request self-contained so that any server instance can handle it. This removes sticky sessions and shared session stores that had put horizontally deployed systems at risk of contamination. Statelessness does not replace tenant authorization, however. Gateway-enforced scoping makes the tenant boundary a property of request handling rather than a convention that every tool developer must remember.

Why persistent, snapshot-restored VMs resolve the economic tension between isolation and idle cost

The cost objection to per-user VMs is legitimate. Most agents are idle most of the time, so reserving live compute for each one produces capacity far beyond actual demand. Snapshot-restore scheduling separates the cost of preserving an agent from the cost of executing it. An idle VM can be frozen to disk, priced as storage, and resumed in under a second when a request arrives. The isolation boundary stays in place even when compute stops running.

Files, credentials, browser sessions, and in-progress computations survive the freeze-thaw cycle, allowing the agent to continue where it stopped. Its accumulated context remains available across sessions. Unlike a cold-start serverless model that requires state reconstruction, snapshot restoration preserves the execution environment itself. The scheduler can therefore suspend activity without discarding the agent’s working state.

SpecBox, published in July 2026 by researchers from Beihang University, University of Leeds, and University of Sydney, addresses startup delay through speculative sandbox prewarming. It identifies pending tool execution demands during LLM token generation and overlaps sandbox bootstrapping with model inference, allowing the vast majority of tool calls to avoid a cold start. Workload classification offers another cost control. Trusted background jobs written by the platform can run in containers, while arbitrary, user-generated agentic code stays in micro-VMs. That hybrid model reduces unnecessary overhead without weakening the boundary around untrusted execution.

How the multi-tenant VM architecture structures into a deployable hierarchy of enforcement layers

The deployable architecture begins at ingress, where the gateway establishes tenant scope and applies routing, rate limits, and access control. Identity evaluation then binds the request to the appropriate tier, tenant, user, and resource permissions. Orchestration operates within that established scope. Google Cloud’s reference architecture for multi-tenant agentic AI, last reviewed 2026-06-18, follows this layered model for organizations that need different levels of tool access and have rules for sensitive data.

The scheduler turns that authorized work into execution. It manages the corresponding VM’s live, frozen, or warming state and must preserve tenant context so that restoration cannot cross tenant scope. The sandbox then supplies the hardware-enforced execution boundary. State storage preserves the same ownership rules for memory and filesystem access, while tool requests return through gateway enforcement. Ingress, orchestration, scheduling, state, and sandbox responsibilities can be scaled, deployed, and debugged independently.

Observability must retain the ownership established at ingress. LoginRadius’s framework requires tenant identifiers in authentication telemetry so that cross-tenant access attempts can be correlated and detected automatically. Cost records provide another enforcement signal. Tagging compute, storage, and model API usage to the tenant makes unexplained allocation spikes visible as potential anomalies. Because any weak layer can reopen access that another layer closed, each boundary must hold independently.

How do builders choose a platform for thousands of persistent agents, one per customer?

For builders seeking deployment without rebuilding the infrastructure, the first selection criterion is the execution primitive. Each agent session running arbitrary, AI-generated code needs a micro-VM with a dedicated guest kernel. Product terminology is not sufficient evidence of separation. The platform must also provide tenant-scoped credential injection and an MCP gateway that enforces tenant context through every tool call.

The filesystem, credentials, and session context must survive sleep, and evaluation should establish whether they also survive redeploy intact. Sub-second snapshot resumption is a requirement for responsive agent products. Firecracker microVMs boot in approximately 125 milliseconds, but boot time and restoration of a persistent agent are distinct platform capabilities. Buyers should establish whether snapshot restoration is native and preserves the context the product depends on.

A platform charging live-compute rates throughout idle periods undermines the economics of a large, mostly idle fleet, while storage-priced idle agents support the per-user model. Each agent should be a first-class resident. With its own persistent disk, real kernel, package installation privileges, and the ability to wake in sub-second time, a dedicated agent becomes something a product can build on without an infrastructure project. The per-user agent model is the right foundation for the next generation of software products, and VM-level isolation is what makes that foundation hold.

More in Per-User Agent Patterns