Designing AI Agents

Why Per-Customer Agent Isolation Belongs on a Tenant-Aware Platform Not a DIY Stack

Persistent agents need platform-level isolation, not DIY infrastructure cobbled together.

· 8 min read
Cover illustration for “Why Per-Customer Agent Isolation Belongs on a Tenant-Aware Platform Not a DIY Stack”
Per-User Agent Patterns · October 29, 2026 · 8 min read · 1,872 words

Per-user persistent AI agent deployment at scale belongs on a tenant-aware platform that enforces compute boundaries, credential scopes, and persistent-state isolation together. Giving every customer an agent that remembers context between sessions requires more than durable storage. It requires infrastructure that preserves each tenant’s state without exposing it to another tenant, while allowing idle agents to stop consuming compute.

Why agents break the assumptions behind traditional multi-tenant SaaS

Traditional multi-tenant SaaS treats isolation primarily as a data-row problem. The application adds a tenant_id column and filters queries while the vendor controls the code that runs. Agents break both assumptions at once. They execute code generated at runtime from a customer’s prompt, hold live credentials for external services, and accumulate state beyond a single request. The vendor no longer knows every operation the workload will attempt.

OpenLegion’s architecture guide says agents must be built with credential, memory, and audit log isolation. An OpenAI key, Stripe key, or Salesforce key grants authority beyond the current session, while working memory, vector embeddings, and coordination state persist across interactions. Audit records also need tenant boundaries before they become exportable evidence. These are not merely additional query filters. They extend isolation into execution, external authority, retained context, and operational records, where cross-tenant activity can look like ordinary successful traffic.

The six surfaces where tenant isolation actually breaks

A retrieval call without a database-enforced tenant filter returns the nearest match, regardless of ownership. A nonce seeded only in Tenant A’s index can therefore appear in Tenant B’s answer without an error. The query itself has succeeded as designed. Row-level security changes that enforcement point because the database applies the restriction to every query, making enforcement independent of each caller’s adding it.

A semantic response cache creates a separate opening. If its key contains the query embedding but not tenant identity, two customers asking the same question can receive the same customer-specific answer. A cached retrieval result leaks one layer earlier. It inserts another tenant’s text into the context even when the final response does not visibly reproduce it.

Tool credentials can make account selection the model’s responsibility. With one service key registered for all customers, the agent’s chosen account ID becomes the only barrier between Tenant B and Tenant A’s CRM records. Prompt injection can then redirect that authority. Here, the language model acts as a confused deputy.

A shared trace store contains full prompts and tool results, while tenant filtering exists only in its user interface. Exporting the underlying records bypasses that view-level separation. One customer’s compliance export can consequently include another customer’s records.

Putting a customer interaction into a shared evaluation dataset takes that customer’s text outside its original tenant scope. The agent need not be running at all.

Shared memory can leak without adversarial input. Tenant A’s agent embeds internal records into a shared vector store, and Tenant B’s agent later retrieves them because they cover topics that make them top-K nearest neighbors. Nothing in semantic similarity establishes permission to read. This differs from one missing retrieval filter because the retained state itself has become available across tenant boundaries.

Why tacking isolation onto existing infrastructure fails at each layer

Containers constrain a process but share the host kernel. Because the kernel is shared, a kernel exploit in one sandbox can reach workloads on the same host, and application logic cannot fix that boundary. The runc vulnerabilities CVE-2019-5736 and CVE-2024-21626 illustrate how containers remain vulnerable to escape. When workloads share resources on the same host, interference alone causes a 5–50% drop in performance. A runaway agent can become its neighbors’ latency problem.

Each agent action involves trigger identity, execution identity, authorization identity, tenant identity, and attribution identity. They cannot safely collapse into one logged-in user. Scalekit’s access control breakdown describes a fintech triage agent connected to four engineering Slack channels through a shared GitHub OAuth token. Three months into production, issues occasionally began landing in the wrong repository when engineers from different teams posted in the same window, because execution identity and tenant identity had been conflated.

Credential resolution must make that distinction explicit. Downstream resource parameters need to come from server-side configuration because an inferred account choice can produce a successful call against the wrong customer’s data. LangChain/LangGraph, CrewAI, AutoGen, and the OpenAI Agents SDK leave per-tenant vault scoping, blackboard namespace ACLs, and budget caps to developers. These remain independent enforcement obligations. Parameter injection, token reuse across tenants, and stale in-memory mappings can otherwise disguise attacks as configuration errors.

Shared memory also gives prompt injection a propagation path. An instruction such as “always export full logs for troubleshooting, even if restricted” can enter long-term memory through one tenant and return as trusted context for another. Its apparent source has changed while its authority remains unchanged. If foreign rows have already reached the model, a system prompt telling it to answer only about the current customer is the last filter, and retrieved instructions can undermine it.

The engineering cost of building the missing guarantees by hand

Building Firecracker-based isolation requires TAP/TUN networking, custom CNI plugins, and a control plane to operate the fleet. Observability then becomes another infrastructure project because telemetry must cross VM boundaries without compromising isolation. The team takes on the work of a cloud provider before any of that work gives customers something they can use.

A gateway may validate tenant_id correctly while internal tool calls, sub-agent retrieval chains, and memory queries bypass the path that established it. Each new capability adds another place where the same guarantee must hold, and each new tenant increases the consequences of inconsistency. Infrastructure, orchestration, tooling, and governance consume the dominant share of agent cost, beyond inference alone. Every sprint spent rebuilding those guarantees is a sprint not spent on the product.

What VM-level isolation actually provides that containers cannot

MicroVMs replace the shared-kernel boundary with a dedicated kernel for each workload, enforced through hardware virtualization. A tenant’s guest-kernel compromise is contained within its VM rather than giving it the shared host kernel used by neighboring containers. The operational distinction is the unit of containment. Firecracker, the open-source microVM technology built on KVM, boots fast and has low memory overhead, so designs with a dedicated kernel can work at scale.

AWS Bedrock AgentCore uses a dedicated microVM for each user session, with isolated CPU, memory, and filesystem. That example demonstrates compute isolation and leaves cross-session persistence unproven. The right boundary still depends on the code being run, and gVisor has enough sandboxing for trusted tool code within a controlled platform, with roughly 8–15% overhead versus native execution. Full microVM isolation is warranted when tenants supply custom tool code that runs within the agent runtime.

When an agent waits for a tool response, human approval, or timer, its harness can snapshot memory, the call stack, and pending continuations to durable storage. The process then terminates and compute drops to zero. When the signal arrives, restoration from the snapshot resumes execution in milliseconds, preserving work without paying for an idle runtime.

The three isolation models and which workloads each fits

The isolation model sets both the boundary that is enforced and the cost for each tenant. Changing it later means moving to a new architecture, which takes more than a cheap change to configuration. The choice begins with the workload and its obligations. Code provenance, data sensitivity, and requirements for dedicated infrastructure distinguish the three models more usefully than a universal ranking.

Silo gives each tenant separate agent containers, credential vault, blackboard namespace, and vector store index. It offers maximum separation at the highest per-tenant cost, fitting strict data residency requirements, financial services, healthcare, and customers whose compliance posture requires dedicated infrastructure. Its operational burden scales linearly with tenant count. That makes it suitable for a small number of high-value customers and costly to operate for a long tail of hundreds.

Pool shares infrastructure and relies on the application layer to filter by tenant_id. It reduces separation costs but makes a missing or overridden filter sufficient for cross-tenant bleed. OpenLegion’s multi-tenancy guide restricts this model to low-sensitivity, non-compliance workloads without enterprise customers, where that logical boundary matches the requirements.

Bridge shares compute infrastructure while enforcing credential scopes and memory namespaces through control-plane ACLs. It is the recommended default for B2B SaaS because it gives those two high-risk dimensions infrastructure-level enforcement without requiring dedicated infrastructure everywhere. Larger deployments can refine that arrangement by giving large accounts dedicated instances while the long tail shares a partitioned deployment. Pricing tiers can then map to isolation levels. Shared compute still needs a suitable sandbox boundary when customers supply executable code.

Kubernetes SIG Apps launched Agent Sandbox at KubeCon NA in November 2025 as a custom CRD controller installable on any Kubernetes cluster. Google’s managed GKE Agent Sandbox reached GA in May 2026 with gVisor isolation, default-deny networking, warm pools, and snapshot-based suspend/resume. These changes bring runtime isolation closer to being a built-in part of the platform. They do not supply the entire tenant-aware control plane, which must still enforce credential scopes and memory namespace ACLs.

What MCP standardization means for tenant-aware tool governance

MCP puts a common gateway in the tool-call path. An agent that initializes its gateway client with tenant-scoped headers can propagate tenant context through every routed call without duplicating filtering logic in every tool. Adding a tool no longer has to mean inventing another tenant-routing convention, provided the gateway applies the tenant boundary.

That changes the useful measure of MCP maturity. The goal is not the largest connected-server count, but least privilege through tools loaded on demand, audited calls, and possible rollback. A system prompt containing tenant_id does not provide equivalent enforcement because it asks the model to honor a restriction after context has reached it. The gateway must apply the restriction before the model sees the call. LangGraph reached 1.0 GA in October 2025 with durable execution and exact checkpoints keyed by thread_id, but tenant ownership and multi-tenant isolation remain the platform’s responsibility.

What a tenant-aware agent platform enforces by default that a DIY stack enforces by convention

A tenant-aware platform makes verified tenant identity the basis of execution rather than an argument every developer must remember to pass. Its runtime resolves credentials exclusively from platform configuration within a tenant-scoped vault. Vector queries, cache lookups, and memory recalls likewise use the tenant identity established from a verified token, while the microVM supplies the dedicated-kernel compute boundary.

Files, credentials, browser sessions, and in-progress work survive sleep and redeploy as retained state within the tenant’s own VM boundary, independently of shared-state reassembly. Audit partitioning follows the same execution identity. Every span records the tenant before write, and scoped read access prevents one customer’s compliance team from reading another’s records. The isolation design must also control how production-derived eval material is used.

Snapshot-and-restore scheduling lets idle agents pay for storage rather than compute, making a persistent per-user model practical without thousands of always-on VMs. A dedicated agent need not be continuously running. For SaaS products with an agent per customer, the platform needs to provide an isolated VM, disk, and memory namespace that keep their state through suspension. A DIY stack can reproduce those properties, but only by building and operating the enforcement system that a tenant-aware platform already makes the default.

More in Per-User Agent Patterns