Memory Governance For Multi-Tenant Agent Hosts: The Three Isolation Modes That Matter
When one host runs agents for many organizations, memory isolation is the load-bearing primitive. Three modes exist; choosing wrong is irrecoverable.
Continue the reading path
Topic hub
Agent TrustThis page is routed through Armalo's metadata-defined agent trust hub rather than a loose category bucket.
Turn this trust model into a scored agent.
Start with a 14-day Pro trial, register a starter agent, and get a measurable score before you wire a production endpoint.
TL;DR
If you host agents for more than one organization, memory isolation is not a feature; it is the spine of your platform. There are exactly three architectural modes: hard isolation (separate physical stores per tenant), tagged isolation (single store with namespace tags), and shared isolation (entries co-mingle, with cryptographic gating controlling access). Each has a different cost profile, different failure modes, different compliance posture, and different ceiling on tenant count. Most platforms pick one mode early without thinking about which is right and live with the consequences for years. This post defines the three modes, walks through where each one is the right choice, and provides a Multi-Tenant Isolation Selector that matches workload characteristics to the correct mode.
Intro: The cross-tenant retrieval that almost ended a contract
A platform we audited last year hosts agents for about four hundred mid-market companies. The platform's memory layer was a single shared vector store with a tenant_id field on every entry; queries filtered by tenant_id at retrieval time. The architecture had been chosen for cost reasons; running four hundred separate stores would have been expensive, and the platform's engineers reasoned that a single store with a simple filter would scale better.
A bug shipped to production on a Tuesday afternoon. A change to the retrieval logic had subtly broken the tenant_id filter for one specific query path. For about six hours, agents on tenant A could occasionally retrieve memory entries belonging to tenants B, C, and D. The retrieval was non-deterministic and only fired on a specific query shape, so it took the team's monitoring a while to notice. By the time the bug was caught, three customers had received responses that referenced data they should never have seen. One of them was a healthcare-adjacent company. The platform's compliance team spent the next two months managing the disclosure and the contract renegotiation. The platform's incident report concluded that the architecture had been the wrong choice for the workload, and the team began a multi-quarter project to migrate to a different isolation mode.
This incident is not unusual. The pattern is universal: a platform launches with shared infrastructure, scales to enough tenants that the engineering team cannot keep all the cross-cutting risks in mind, ships a regression that crosses an isolation boundary, and discovers in the worst possible way that the chosen mode was wrong for the workload. The fix is always expensive because changing isolation modes after a platform has scaled is essentially a rebuild.
The rest of this piece argues that isolation mode is one of the most consequential architectural choices a multi-tenant platform makes, and that most teams pick poorly because they treat it as a cost question rather than a risk question. We will define the three modes precisely, name the failure modes each one exposes you to, walk through the workload characteristics that should drive the choice, and provide a selector that turns the choice into a small set of yes-no questions you can answer before writing code.
Mode one: hard isolation
Hard isolation means each tenant's memory lives in its own physical store. When a query is issued for tenant A, it is routed to tenant A's store; tenant B's data is in a different process, on a different network, behind different credentials. Cross-tenant retrieval is not possible because the stores are not connected; an attacker who compromises the agent runtime for tenant A cannot reach tenant B's data without compromising additional infrastructure.
Hard isolation is the strongest defense against cross-tenant data leaks because the defense is physical, not logical. A bug in the retrieval logic cannot cross an isolation boundary that does not exist at the logical level. A misconfigured tenant_id filter cannot fail open because there is no shared store to fail into. The compliance posture is correspondingly clean: most regulators understand 'separate physical stores per regulated tenant' immediately; they have to think harder about logical isolation schemes, and their default posture toward complexity is skepticism.
The cost of hard isolation is operational. Every tenant requires its own store provisioning, monitoring, backup, scaling, and lifecycle management. For a platform with ten tenants, this is manageable. For a platform with ten thousand, it is brutal. The economics typically place a soft ceiling around a few hundred tenants for hard isolation; beyond that, the operational burden starts to dominate the engineering team's bandwidth.
The other cost is workload coupling. Some agent workflows naturally want to share context across tenants (a platform-level skills library, a shared anomaly detection model, a cross-tenant search for compliance investigations). Hard isolation makes these workflows expensive because they require explicit cross-store synchronization rather than just a query. Platforms that need a lot of cross-tenant features usually find hard isolation makes those features harder to build.
The right use cases for hard isolation are: regulated workloads where compliance posture is the load-bearing concern (healthcare, financial services, defense), small-tenant-count platforms where operational cost is manageable, and high-stakes workloads where a single cross-tenant leak would be catastrophic. If your tenants would each treat a cross-tenant leak as a contract-breaking event, hard isolation is the right answer almost regardless of cost.
Mode two: tagged isolation
Tagged isolation means a single shared store with every memory entry tagged by tenant identifier, and queries filtered by tag at retrieval time. This is the most common mode in practice because it scales operationally; one store covers any number of tenants, and adding a new tenant is just adding a new tag.
The defense against cross-tenant leakage in tagged isolation is logical: the retrieval logic must enforce the tag filter on every query. This logical defense is only as strong as the discipline of the team that writes and maintains the retrieval code. Every code path that touches memory has to enforce the filter. Every developer who writes a new code path has to remember to enforce it. Every refactor that touches the retrieval layer has to preserve the filter. The number of opportunities to fail open grows with the size of the codebase and the team.
The failure modes of tagged isolation are varied and well-known. The most common is the bug class above: a regression to the retrieval logic that drops or misapplies the tag filter. Another is misconfigured tagging at insertion: an entry written with the wrong tenant tag is forever associated with the wrong tenant. A third is debugging mode escapes: developers temporarily disable the tag filter in development environments and accidentally ship the disabled filter. A fourth is administrative queries: maintenance scripts that sweep across all tenants for legitimate reasons are usually exempted from the filter, and the exemption logic is itself a source of bugs.
The operational benefits of tagged isolation are substantial. One store, one set of credentials, one monitoring dashboard, one backup strategy, one scaling profile. Adding a tenant is a write operation, not a provisioning event. Cross-tenant features (within the constraints of what your privacy and compliance posture allows) are cheap because the data is already co-located. The platform engineering team's bandwidth is dramatically lower than under hard isolation.
The right use cases for tagged isolation are: medium-stakes workloads where the cost of an occasional leak is recoverable rather than catastrophic, large tenant counts where hard isolation is operationally infeasible, and platforms whose workload includes significant cross-tenant features. Most B2B SaaS platforms in non-regulated verticals are run on tagged isolation; the model fits the risk profile.
The additional engineering investment that makes tagged isolation safer is centralized retrieval middleware that enforces the tag filter as a non-bypassable concern, combined with rigorous integration tests that probe the boundary on every change. The middleware is the architectural lever; without it, the team is relying on every developer to remember the filter, and that scales poorly.
Mode three: shared isolation with cryptographic gating
Shared isolation means memory entries from multiple tenants co-mingle in a single store with no tag-based filtering at retrieval time; instead, every entry is encrypted under a per-tenant key, and the retrieval system has access only to the keys for the tenant whose query is currently being executed. An attacker who compromises the retrieval system for tenant A still cannot read tenant B's data because the encryption key for B is not present.
This mode is the strongest logical defense possible without going to physical separation. The defense is mathematical: even if the retrieval logic has a bug that causes it to surface tenant B's entries to tenant A, those entries are ciphertext that A cannot decrypt. The bug becomes visible (the agent receives garbage and likely errors) without becoming a leak. The compliance posture, while requiring more explanation than hard isolation, is defensible because the proof of isolation reduces to standard cryptographic guarantees.
The cost of shared isolation is the cryptographic infrastructure. Per-tenant key management, key rotation policies, performance overhead from per-entry encryption, and the architectural complexity of routing keys to the right place at the right time. None of these are insurmountable; many are solved by existing infrastructure (KMS, envelope encryption); but the operational burden is real and the team needs cryptographic literacy.
The failure modes of shared isolation are different from the other two. The dominant risk is key management: if a tenant's key is leaked, that tenant's data is exposed even though the store has not been breached. If a key is lost, that tenant's data is unrecoverable. If key rotation is mishandled, ongoing access can break or stale ciphertext can become unreadable. The discipline shifts from query-path enforcement to key-path enforcement, which is a different skill set.
The right use cases for shared isolation are: workloads with very high tenant counts where hard isolation is infeasible but tagged isolation feels too risky, workloads with significant cross-tenant infrastructure (shared embedding models, shared similarity computations) where physical separation is expensive, and workloads where the tenants themselves want cryptographic proof of isolation rather than operational assurance. The last condition is becoming more common as sophisticated tenants begin asking for verifiable isolation rather than promised isolation.
Shared isolation is also the only mode that supports a specific use case: tenant-controlled memory portability. If the tenant holds the key, the tenant can decrypt their entries on their own infrastructure and move them to another platform. The other modes either prevent this (hard isolation makes export an operational task that requires platform cooperation) or do not protect against it (tagged isolation gives the platform plaintext access to the tenant's data regardless). Some platforms use this property as a competitive feature.
The Multi-Tenant Isolation Selector
Choosing among the three modes is a decision that should be driven by workload characteristics, not by which architecture the engineering team is most comfortable with. The Multi-Tenant Isolation Selector is a small set of yes-no questions that map workload characteristics to a recommended mode.
Question one: do any of your tenants operate in a regulated vertical where a single cross-tenant leak would constitute a reportable incident? If yes, the answer is hard isolation. The cost of operational complexity is recoverable; the cost of a regulator-reportable incident is often not.
Question two: will your tenant count exceed five hundred within the next two years? If yes, hard isolation is operationally infeasible by then; you are choosing between tagged and shared isolation. If your tenant count will stay under five hundred and question one is no, hard isolation is still on the table.
Question three: are your tenants sophisticated enough to ask for cryptographic isolation rather than promised isolation? If yes, shared isolation is the answer that matches their expectations and gives you a positioning advantage. If no, tagged isolation may be sufficient and is operationally cheaper.
Question four: does your workload depend on significant cross-tenant infrastructure (shared embedding models, shared similarity computations, platform-level analytics)? If yes, hard isolation is expensive to combine with these features; shared isolation handles them naturally; tagged isolation is in between. The right answer depends on how dominant the cross-tenant features are in your roadmap.
Question five: does your engineering team have cryptographic literacy and operational discipline around key management? If yes, shared isolation is viable. If no, shared isolation is a foot-gun; pick tagged or hard. The honest answer to this question is harder than it sounds because most teams overestimate their cryptographic discipline.
The selector is not exhaustive; real workloads often have nuances that require deeper analysis. But the five questions catch about ninety percent of the meaningful variation. A team that can answer them honestly will land on the right mode for the workload most of the time.
We also recommend re-running the selector annually. Workloads change. Tenant counts grow. Compliance postures shift. A platform that picked tagged isolation at fifty tenants may need to revisit the choice at five hundred. A platform that started in a non-regulated vertical may onboard a regulated tenant who needs hard isolation. The annual revisit catches these shifts before they become incidents.
Hybrid architectures: when mixing modes is right
The three modes are not mutually exclusive at the platform level. Many platforms run hybrid architectures where different tenants or different workloads use different modes. Understanding when hybrid is the right answer matters because the wrong hybrid is worse than committing to a single mode.
The most common hybrid is hard isolation for regulated tenants and tagged isolation for the rest. This pattern is correct when the platform serves a small number of high-stakes tenants alongside a large number of standard ones; the operational cost of hard isolation is borne only for the tenants that warrant it. The architecture is not as clean as a single mode, but the trade-off is usually worth it. The discipline required is to keep the boundary between the two paths well-defined: a regulated tenant should never accidentally land on the tagged path because of a misconfiguration.
A second common hybrid is tagged isolation for the agent's main memory and shared isolation for the agent's auxiliary structures (shared embedding models, similarity-based retrieval shortcuts, platform-level analytics). The main memory is small enough per tenant that tagged isolation handles it; the auxiliary structures benefit from cross-tenant aggregation that shared isolation makes safe. This is an unusual hybrid but a useful one for platforms whose value depends on cross-tenant patterns.
A third hybrid is shared isolation by default with hard isolation as an opt-in for tenants who pay for it. This pattern monetizes the isolation choice, making the more expensive architecture available to the tenants who want it. It works well in B2B platforms where some tenants have stronger compliance needs and are willing to pay; it does not work well in consumer platforms where the homogeneous experience is itself a feature.
What does not work as a hybrid is mixing tagged and shared isolation in the same store with the same tenants. The combination produces a dual defense that is harder to reason about than either alone, and the failure modes overlap in ways that obscure where the bugs actually are. Pick one logical defense per code path; do not try to layer.
Operational discipline that makes any mode work better
Independent of which mode you pick, certain operational disciplines reduce the failure rate of every mode. They are worth listing because they are cheap to adopt and their absence is the dominant factor in real-world cross-tenant incidents.
The first discipline is centralized retrieval middleware. Every memory access goes through a single layer that enforces tenant isolation, regardless of which mode the platform uses. The middleware is the architectural lever that makes isolation a non-bypassable concern. Without it, isolation is enforced by every individual code path that touches memory, and the failure rate scales with the number of paths.
The second discipline is automated cross-tenant probing. A test suite that probes the isolation boundary on every change, attempting to retrieve cross-tenant data through every retrieval surface, catches regressions before they ship. The probes should be adversarial: try to confuse the retrieval logic, try to inject misleading tenant identifiers, try to exploit edge cases in the filtering. A probe suite of two hundred test cases is small enough to run on every PR and large enough to catch most realistic regressions.
The third discipline is cross-tenant blast radius monitoring. Every production retrieval is logged with both the requested tenant and the actual tenants represented in the response. A regression that crosses a tenant boundary is detectable in this log within minutes. The monitoring is cheap to implement and the alerting threshold can be very tight (anything other than the requested tenant in the response is an alert).
The fourth discipline is incident drill on cross-tenant scenarios. The team should periodically drill the response to a cross-tenant leak: how is it detected, who is notified, how is the scope determined, how are affected tenants informed, what does the disclosure look like. Most teams have not drilled this and are improvising in the moment, which is exactly the worst time to be improvising. A quarterly drill takes a couple of hours and pays back hugely the first time a real incident happens.
Counter-argument: 'Logical isolation is fine if the team is good'
The most sophisticated objection to this framing is that logical isolation (tagged mode, in particular) is fine for any team that maintains discipline around it. The argument: large public-cloud platforms run many of their internal services on shared infrastructure with logical isolation; they manage to do this without leaks; therefore the same approach should work for any team that hires the right engineers.
The argument has merit and we want to engage with it seriously. It is true that logical isolation can be made very safe by sufficiently disciplined teams; the major cloud providers are existence proofs of this. The dominant factor in their success is not a magic architecture but a sustained investment in middleware, automated probing, monitoring, and process. The cost of that investment is invisible from outside but enormous from inside.
The rebuttal is that most teams do not have the bandwidth to make the same investment, and the failure mode of logical isolation is asymmetric: a single regression can produce a major leak that affects many tenants, and the leak is often detected late. The asymmetry favors physical or cryptographic isolation for any team that is not at major-cloud scale, because those modes constrain the failure mode in ways that logical isolation does not.
The practical advice is to honestly assess your team's capacity to invest in the operational discipline that makes logical isolation safe. If you can sustain centralized middleware, automated probes, and tight monitoring, tagged isolation is viable. If you cannot, the failure rate will catch up with you eventually, and the cost of the catch-up is much higher than the cost of starting with a stronger isolation mode.
What Armalo does
Armalo's Cortex memory layer (hot, warm, cold tiers) supports all three isolation modes natively and lets each operator configure the mode appropriate to their workload. Hard isolation provisions per-organization stores with separate credentials and routing; tagged isolation runs against the organization's shared store with non-bypassable middleware that enforces the orgId filter on every retrieval; shared isolation routes memory entries through per-organization envelope encryption with keys held in the operator's KMS surface.
For platforms hosting agents on behalf of other organizations, Armalo's hosting primitives include a Multi-Tenant Isolation Selector that maps workload characteristics to a recommended mode and supports hybrid configurations where different tenants run under different modes. Cross-tenant blast radius monitoring is part of the standard observability layer; any retrieval whose response contains entries from organizations other than the requesting one fires an immediate alert and is preserved for forensic analysis.
Memory entries that influence pact compliance evidence are protected by the same isolation mode that protects the rest of the agent's memory; the trust oracle at /api/v1/trust/ surfaces an agent's certification tier (Bronze, Silver, Gold, Platinum) and isolation posture so counterparties can reason about both. The multi-LLM jury, with top and bottom 20% outlier trimming, evaluates isolation incidents when they occur and feeds the agent's composite score in the safety dimension; score decay (one point per week) ensures isolated incidents do not permanently mark an agent, while patterns of isolation failures compound naturally.
FAQ
Can I migrate from tagged isolation to hard isolation later?
Yes, but it is expensive. The migration is essentially provisioning a per-tenant store for each tenant and copying their entries into it. For a platform with thousands of tenants this is a multi-quarter project. Plan accordingly; do not assume it is cheap.
Is hard isolation overkill if my tenants do not actually compete?
The competition is not the only risk. Compliance, contractual confidentiality, and accidental disclosure are all real risks even between non-competitors. The right question is whether a cross-tenant leak would damage the relationship; for almost any commercial relationship, the answer is yes.
How do shared isolation keys interact with key rotation?
Key rotation is the operational subtlety of shared isolation. The standard pattern is envelope encryption: per-entry data keys encrypted under a per-tenant key-encryption key. Rotating the key-encryption key requires re-wrapping all data keys but not re-encrypting the data itself. The cost is bounded; the discipline required is sustained.
Does the choice of mode affect the trust oracle's verifiability?
No. The trust oracle works against the agent's externally visible behavior, not the internal architecture of its memory. All three modes can produce equivalent verifiability of the agent's outputs. The choice of mode is a platform engineering concern, not a trust concern.
Can I do hard isolation with shared embedding model infrastructure?
Yes, if you decouple the embedding model from the storage. The model produces vectors; the vectors are stored per-tenant in separate stores. The model itself can be a single shared piece of infrastructure. The decoupling is straightforward but worth thinking through explicitly.
What happens if a tenant requests data deletion?
Under hard isolation, deletion is a tenant-local operation; trivial. Under tagged isolation, deletion is a tagged-row delete plus index update; straightforward but requires care to ensure all auxiliary structures are also updated. Under shared isolation, deletion can be implemented as key destruction (cryptoshredding) which makes the underlying ciphertext permanently unreadable; this is sometimes preferable to physical deletion for compliance reporting.
Is there a fourth mode I am missing?
Not meaningfully. Variations within each of the three modes are common (sharded hard isolation, multi-store tagged isolation, hierarchical key gating in shared isolation), but the three categories cover the architectural space. If you think you have invented a fourth, you are probably about to discover that it is one of the three with extra complexity.
Bottom line
Multi-tenant agent hosting forces an isolation mode choice and the choice is consequential for years. Hard isolation is the safest and the most operationally expensive. Tagged isolation is the most operationally efficient and requires sustained engineering discipline to keep safe. Shared isolation with cryptographic gating is the strongest logical defense and requires cryptographic literacy. The Multi-Tenant Isolation Selector matches workload characteristics to the right mode in five questions; running it honestly is the prerequisite to picking well. Hybrid architectures are valid when the boundaries are kept clean. Operational disciplines (centralized middleware, automated probing, blast-radius monitoring, incident drills) reduce the failure rate of any mode. The cost of picking poorly is paid in the worst possible way, late and publicly; pick deliberately and revisit annually.
The Trust Score Readiness Checklist
A 30-point checklist for getting an agent from prototype to a defensible trust score. No fluff.
- 12-dimension scoring readiness — what you need before evals run
- Common reasons agents score under 70 (and how to fix them)
- A reusable pact template you can fork
- Pre-launch audit sheet you can hand to your security team
Turn this trust model into a scored agent.
Start with a 14-day Pro trial, register a starter agent, and get a measurable score before you wire a production endpoint.
Put the trust layer to work
Explore the docs, register an agent, or start shaping a pact that turns these trust ideas into production evidence.
Comments
Loading comments…