Technical Guide

Preventing an AI Agent from Sending One Customer's Records to Another Customer

Enforce isolation outside the model. Bind each request to a customer-scoped identity, partition retrieval and memory by tenant, check every tool call against policy before it runs, validate outbound recipients and content at egress, and log each decision. Prompt instructions can support these controls but cannot replace them.

Why this is an access control problem

Treat cross-tenant exposure as an access control problem. Identity, retrieval, tool-call, and egress controls need to be enforced outside the model, in components the model cannot modify.

Enforcement points between the model and the customer

Four enforcement points sit between the model and the customer. Each one addresses a different way a record can reach the wrong recipient.

Enforcement points and what each one controls
Enforcement pointWhat it controls
IdentityPer-request, customer-scoped credentials and permissions
Retrieval and memoryTenant-partitioned indexes and session-bound context
Tool callsPolicy checks on tenant, tool, and parameters before execution
EgressRecipient and content validation before anything is sent

Layered controls mapped to each failure mode

Each layer addresses a specific failure and should run in a component the model cannot modify.

01Identity layer

Issue short-lived credentials per request, scoped to one customer and to the minimum set of tools. Derive the customer from the authenticated session, never from model output. This addresses over-broad credentials.

02Retrieval and memory layer

Partition indexes by tenant, or enforce tenant filters inside the retrieval service rather than in a query the model writes. Key memory by tenant and session, and clear it at session boundaries.

Tool-call policy checks and egress validation

03Tool-call layer

Before execution, verify that tenant context is present, matches the request identity, and that the tool and parameters are permitted. Deny by default.

04Egress layer

Confirm the recipient belongs to the customer whose data is in the message. Inspect content for identifiers or records tied to other tenants. Hold uncertain cases for human approval.

What auditable evidence each control should produce

05Audit layer

Record every allow and deny decision from the enforcement point itself, so evidence does not depend on what the model reports.

Each record should include identity, tenant, tool, parameters, recipient, and policy version, and the logs should be exportable.

Where runtime governance fits, and how to test it

Runtime governance is the layer that enforces these controls outside the model. Use the questions below to evaluate whether a given layer does so.

Evaluating a runtime governance layer

  • Is the enforcement point outside the model, so a prompt injection or model error cannot bypass it?
  • Does each tool call carry a per-request, customer-scoped identity and permission set instead of a shared service credential?
  • Does the layer verify that tenant context is present and matches the authorized customer before a call executes?
  • Does it validate outbound recipients and the data in outbound messages against the customer they belong to?
  • Does it log each allow and deny decision with identity, tenant, tool, parameters, recipient, and policy version, and can those logs be exported?

Review your agent enforcement points

Discuss how runtime policy enforcement, agent identity, and audit logging can apply to your agents' tool calls and outbound messages.

Talk to an Expert