Session Isolation in Multi-Tenant Agent Deployments

Structural safeguards keep patient data isolated across tenants in healthcare agent deployments.

· 9 min read
Cover illustration for “Session Isolation in Multi-Tenant Agent Deployments”
PHI-Safe Agent Design · October 25, 2026 · 9 min read · 1,997 words

Session isolation in multi-tenant healthcare agent deployments keeps protected health information with the tenant it belongs to. It is not a performance feature or an architectural nicety. The requirement spans compute, memory, credentials, and audit trails, and it must hold throughout execution. A defensible deployment enforces those boundaries structurally and can show an auditor how they held.

Why multi-tenancy in healthcare agent deployments is a different compliance problem than in standard SaaS

Standard SaaS multi-tenancy separates customers through distinct database rows, scoped API keys, and role-based access controls. That model works within a controlled application because the vendor controls the code that runs against tenant data. Healthcare agents operate beyond that controlled surface. An agent perceives screen state, plans actions, calls tools, checks results, and repeats across EHRs, payer portals, and third-party systems. Its access boundary therefore cannot stop at the application that received the request.

The agentic loop continues until the goal is met or a guardrail stops it. Each step creates another enforcement point. Unlike a bounded API call, the loop can move between systems and keep the information it gathered earlier. A file-search tool illustrates the consequence of that movement. If the tool is not scoped to the tenant’s workspace, the agent can effectively gain administrative access to all tenants’ files despite correctly scoped permissions in the application that launched it.

Healthcare adds a proof obligation to this structural problem. HIPAA’s administrative, physical, and technical safeguards apply to the systems and organizational practices protecting electronic PHI, so an architecture must demonstrate its protections. Cross-tenant disclosure can occur while the agent appears to complete its task correctly, including when embeddings from one tenant influence reasoning about another tenant’s query.

The four surfaces where tenant isolation can break in a healthcare agent deployment

Diagram: The Four Surfaces Where Tenant Isolation Can Break. Visualizes: Visualize four distinct enforcement surfaces that must each independently hold to protect PHI in a healthcare agent deployment: (1) Compute — shared host kernel vulnerability…

Compute isolation sets the boundaries between the environments where agents run. Standard containers share the host kernel. A kernel exploit can expose neighboring tenants’ workloads on the same node. Container escape vulnerabilities, including runc CVE-2019-5736 and CVE-2024-21626, illustrate why the execution boundary needs scrutiny. Resource exhaustion creates a second failure path. A runaway process can degrade co-located workloads even without gaining access to their data.

MicroVMs use hardware virtualization to move that boundary below the guest kernel, so each workload has its own dedicated guest kernel in place of a shared host kernel. AWS Bedrock AgentCore runs each user session in a dedicated microVM with isolated CPU, memory, and filesystem. The boundary is stronger, but not sufficient alone. An isolated runtime can still receive another tenant’s data through a poorly scoped retrieval tool.

Memory and vector storage therefore need controls of their own. Semantic search is approximate by design, and correctly stored embeddings can still be returned to the wrong tenant if query filtering is enforced only in application code. Shared context windows and persistent agent memory can also expose one tenant’s information to another. Some frameworks share crew memory by default or have global stores that span isolation units. These defaults require active scoping rather than an assumption that every new session starts inside a private information boundary.

For healthcare tenants, the recommended storage pattern is separate vector indexes rather than metadata filtering alone, with tenant namespaces and a required filter on every query. Cloud object storage also needs tenant-scoped path isolation enforced by the storage layer. Credentials need an equally explicit boundary. Because agents often use staff-level access to EHRs and payer portals, credential exposure can directly expose PHI. Proxy-based credential injection should limit credentials to the tenant’s sandbox and record each use per request, in place of mounting them into shared execution environments.

The audit trail connects these controls to evidence. Every file access, memory retrieval, tool call, and credential use should have tenant attribution in immutable, tenant-segregated logs. Strong compute isolation cannot compensate for missing attribution. Google Cloud’s multi-tenant agentic AI reference architecture aggregates logs from isolated tenant projects into a central governance hub, preserving separation at the source while supporting centralized monitoring.

How tenant identity propagates through a live healthcare agent session

A live request starts with authenticated tenant identity. In AgentCore’s healthcare reference implementation, Amazon Cognito manages authentication and stores tenant metadata, including tier, clinic ID, and role, in JWT claims. A claim such as custom:clinic_id supplies the tenant identifier used downstream. Amazon API Gateway routes the request and enforces tier-based rate limiting, while AWS Lambda extracts tenant context before invoking the agent. Authentication establishes the origin of that context.

The agent then needs tenant context for every tool invocation. For a file-reading task, the orchestrator must pass the tenant’s workspace scope instead of calling a tool with unrestricted file access. MCP tools, or their equivalents, should be bound to the tenant’s root directory so that the agent cannot invoke an unscoped alternative. The same execution path must restrict credential use to the tenant’s sandbox when a tool reaches an EHR or payer portal.

Retrieval introduces another independent check before tool results enter the agent’s reasoning. A namespace attached during ingestion does not protect a later query that omits its namespace filter. Storage must enforce the boundary at query time. The healthcare implementation applies tenant identity across the knowledge base, memory store, and database rather than assuming that enforcement at one component protects the others. Session scope also belongs in tenant configuration, together with the model, system persona, active skills, and token limits.

Google Cloud’s hub-and-spoke architecture places authentication, prompt inspection, and routing in a central hub while giving each tenant project its own runtime, data store, and access policies. Identity-Aware Proxy checks identity and context before requests reach the application, and VPC Service Controls set boundaries around projects and service perimeters. Model Armor screens payloads for prompt injection through an application-layer API callout. That addresses a separate risk, such as an adversarial prior authorization document attempting to redirect an agent whose tenant identity is otherwise valid.

Service differentiation can operate within these boundaries. In the AgentCore example, the Basic Tier has document search and retrieval, and the Premium Tier also has advanced reasoning and access to web search tools. Capabilities differ without abandoning tenant scope. The request’s tier determines which features are available, while its tenant identity determines which data and credentials those features may use.

Why conflicting compliance regimes make shared control planes harder to defend

Runtime enforcement answers how the system restricts access. An external review asks for proof that those limits meet the rules each tenant must follow. When a platform serves a HIPAA-covered practice and a financial services client that must follow payment card security standards, the evidence must show that their environments are kept separate. Shared control planes complicate that demonstration. Logical isolation in a shared Kubernetes cluster requires extensive documentation where a separate architectural boundary would make the distinction more directly demonstrable.

Within the healthcare tenant, isolation must also keep access to the minimum necessary. An agent should retrieve only the PHI fields required for its task, even when the underlying API permits access to an entire record. Broad API scopes undermine that constraint. Persistent conversation memory can also accumulate PHI across sessions beyond the original task’s purpose, even when no other tenant receives it. Keeping tenants separate and limiting access to what a task needs thus prove different parts of compliance.

Prior authorization makes that distinction concrete because diagnoses, procedure codes, clinical notes, and payer identifiers travel to outside payers. The agent must retrieve what the specific authorization requires rather than everything available in the patient record. An audit must be able to connect the accessed information to the task as well as to the tenant. A technically valid credential is only one part of that account.

PHI embedded in model weights during fine-tuning on clinical notes can be reproduced verbatim under adversarial prompting, even if access controls later protect the source records. Source restrictions do not remove learned information. If a shared model is fine-tuned on pooled tenant data without rigorous de-identification, one tenant’s clinical notes can influence another tenant’s session in ways not visible in ordinary access logs. The isolation argument must therefore cover both the shared model and its runtime connections to protected storage.

The objection that strict per-tenant isolation is operationally out of reach for most practices

Cost is a serious concern for smaller practices and mid-market groups. Fully siloed deployments need separate compute, vector databases, and storage for each tenant, which makes them the most costly and the hardest to run. Complexity can prevent adoption even when the security case is sound. A fully siloed architecture is therefore not an appropriate default for every deployment. Sharing resources requires preserving the boundaries that protect PHI.

Pool and hybrid models allow some resources to be shared. The AgentCore healthcare architecture shares underlying infrastructure while enforcing isolation through scoped identifiers, access policies, and data partitioning. Hybrid compute also distinguishes workloads by execution risk. Agents that run arbitrary or AI-generated code can use microVMs, while trusted, platform-written background jobs stay in containers. The orchestration layer sends each workload to the isolation tier it needs, so the most expensive setup is used only where needed.

Firecracker reduces the historical cost of VM-based isolation with sub-125-millisecond boot time and sub-five-MiB per-VM overhead. That makes dedicated execution boundaries more practical at scale without the resource footprint of full hardware VMs. Practices need not operate these mechanisms themselves. A well-designed platform handles namespaces, JWT propagation, and vector index partitioning before staff interact with the agent. In a pool model, defensible logical isolation still requires storage-level namespace and path enforcement, tenant-attributed request logs, and proxy-based credential injection.

Computer-use agents provide another way to deploy agents, using an existing staff login to read screens, click, type, and navigate. Because they use that established access path rather than a new integration layer, existing EHR permissions, access controls, and audit logging remain in effect. The isolation work centers on correctly scoping the agent’s session within systems the practice already governs. This path does not resolve the remaining gap in agentic data loss prevention, where no established consensus yet defines how to detect and block PHI exfiltration at the output layer in real time.

What a session isolation audit in a healthcare agent deployment should actually examine

A session isolation audit examines whether the boundaries hold under realistic failures and whether the evidence can demonstrate that to an external reviewer. It is not simply a penetration test or feature review. For an administrator evaluating a vendor, the first inquiry concerns the actual kernel-level execution boundary and its CVE history. The vendor should explain whether agent sessions have dedicated execution boundaries or container separation. Evidence should also address whether failure or resource exhaustion in one tenant’s session can expose or degrade another’s.

An administrator should ask whether vector indexes are tenant-isolated, where namespace filtering is enforced, and whether an application bug can bypass that enforcement. Session endings deserve explicit examination as well. The vendor should explain whether PHI in memory is cleared or remains available to later sessions, including sessions for another tenant. A documented response process for a patient’s right-of-deletion request should cover vector embeddings and structured records.

Credential review should establish how access reaches the sandbox. The vendor should show how it uses per-session proxy injection in place of shared credential mounts and logs each credential use with the request and tenant. The administrator should ask whether immutable, tenant-segregated records identify the agent, tenant, patient record, time, and task for each action on PHI throughout the required retention period. Without that attribution, a shared log cannot support the tenant-specific account needed for a breach investigation.

For platforms that serve tenants under different compliance regimes, the final check asks for written proof that data cannot pass from either tenant’s governed environment into the other’s. A general statement of logical separation is insufficient. The architecture must explain where compute, storage, credentials, and audit records enforce the boundary independently of application behavior. Application bugs are inevitable, so a defect in one layer must not become permission to cross another.

Sources

  1. Shared infrastructure, isolated tenants: Pool model multi-tenancy with Amazon Bedrock AgentCore
  2. Multi-tenant agentic AI system  |  Cloud Architecture Center  |  Google Cloud Documentation

More in PHI-Safe Agent Design