To secure enterprise AI applications and agents against data leakage, tokenize sensitive data before each model request and decide where copies and original values can go. One protection layer then covers hosted APIs and self-hosted models alike.
Few enterprises run a single model anymore, and every extra provider arrives with its own settings and logs but no shared policy. Each time a team adds or switches a model, customer data protection gets rebuilt from scratch and records slip through the gaps. One protection layer around the models you already run closes those gaps. It doesn't matter which AI agent you use, because Enigma AI Vault works as the underlying infrastructure that protects your data.
Why Enterprise AI Applications and Agents Leak Data Across Model Providers
AI agents leak data across model providers because customer records move through every stage of a task, and each provider adds another path out of your boundary. Copies then settle in logs and agent memory long after the task has ended.
Agents behave differently from a chatbot answering one question. Within a single task, an agent may pull a customer record and build context around it, then call a payment service before updating the case. Every one of those moves carries customer data somewhere new, and the four stages below show where it can escape.
| Stage | What happens | Where customer data can escape |
|---|---|---|
| Retrieve | Connectors and APIs pull CRM records and payment history | Tool responses carry the full record when the task needs one field |
| Assemble | Retrieved data is packed into prompts and RAG context | System prompts and context windows hold raw values |
| Reason | The request travels to a model and a response comes back | Requests leave your network for provider infrastructure |
| Act | The agent calls tools and saves facts to memory | Tool arguments and stored memory keep what the model saw |
How One Customer Record Ends Up in Three Model Paths
Take a billing dispute for a customer named Sofia Grant. Her personally identifiable information travels further than most teams expect:
| Model path | What it does with Sofia's record | Rules it follows |
|---|---|---|
| Support agent on Anthropic | Pulls her profile and card history from the CRM to resolve the dispute | Anthropic account settings plus the agent's own logs |
| Document assistant on OpenAI | Drafts her refund letter from the same case notes | A separate integration with its own OpenAI settings |
| Internal model on company servers | Summarizes the case for a monthly reporting dashboard | Whatever the platform team configured |
No single team can say where every copy of Sofia's record now sits.
Why More Providers Mean More Exposure
Multi-model setups rarely grow by design. Teams pick the model that suits their use case, and protection follows whatever each team happened to build.
- Separate integrations: each team wires its own SDK, and protection added to one integration rarely carries over to the next
- Uneven logging defaults: one gateway records full request bodies while another records nothing at all
- Model experiments: test traffic sent to a new release often skips the controls production traffic has
- Agent handoffs: one agent passes context to another agent running on a different provider
Where Copies Collect Outside the Model
Model calls are one part of the exposure. Information spreads through the stack, and copies gather in places that rarely get a security review:
- Application logs: request bodies written at debug level during an incident
- Traces and observability: full prompts captured to help engineers troubleshoot
- Agent memory: facts saved so the next conversation feels continuous
- Vector stores: embeddings of documents that still contain customer details
- Caches and retries: repeated requests holding the same payload
- Connected vendors: third-party services the agent calls with customer fields
How much of this happens depends on how each framework and connector is configured, along with your logging and retention settings. Few teams can answer that question for every model they run.
OpenAI and Anthropic APIs Versus Self-Hosted Models: Where Data Leakage Happens
With OpenAI and Anthropic APIs, data leaks as requests leave your boundary and fall under provider retention terms, whereas self-hosted models keep requests inside your network but leak through server logs and broad internal access.
Neither option is safe by default. Hosted APIs move the risk outside your network, while self-hosted models move it onto infrastructure your own teams have to lock down.
| Factor | Hosted APIs such as OpenAI and Anthropic | Self-hosted models |
|---|---|---|
| Where requests go | Provider infrastructure outside your network | Servers in your cloud account or data center |
| Who sets retention | Provider terms combined with your account settings | Your own engineering and security teams |
| Main leak points | Raw values in prompts and tool results, plus copies in your own logs | Inference logs on shared GPU hosts that many engineers can open |
| Common blind spot | Assuming the provider contract covers your logs and memory | Assuming internal automatically means private |
| Who fixes a leak | You handle everything outside the API call | Every layer falls to you |
What Provider Settings Can and Can't Do
Provider settings matter, but they govern the provider's side of the connection. Here is how the responsibility splits:
| Covered by provider settings | Left to your team |
|---|---|
| How long the provider keeps requests | Prompts your app logged before sending |
| Training use of your requests | Tool results stored in agent memory |
| Access controls on the provider's infrastructure | Copies in traces and vector stores |
Those settings also vary between providers and account tiers. Teams that learn to keep PII out of OpenAI requests often see the same gap reopen when a second provider arrives with a different SDK and nobody carries the protection over.
Why Self-Hosted Models Still Leak
Self-hosted models feel private because nothing crosses the public internet, yet customer data still spreads inside your own environment. What changes is who can reach it.
| Internal leak point | Who ends up with access |
|---|---|
| Inference server logs written for debugging | Anyone with access to the cluster |
| Shared GPU hosts running several workloads | Teams that never needed customer data |
| Fine-tuning sets built from customer records | Every user of the model, since records can resurface in outputs |
| Prompt samples kept for quality review | Analysts checking model performance |
Running the model yourself changes who can see the data without changing whether it needs protection.
Hybrid Setups Carry Both Risk Profiles
Many enterprises run hosted and self-hosted models side by side, which means managing both sets of leak points at once. A typical split looks like this:
- Internal servers: sensitive analytics and reporting that teams prefer to keep in-house
- Hosted APIs: customer-facing agents that call OpenAI or Anthropic for reasoning and drafting
The riskiest moment is the handoff between them. Context produced on an internal model often flows into a request bound for a hosted provider, and protection that exists on one side rarely follows it across. Sofia's case summary, written internally, could end up inside the next prompt a support agent sends to Anthropic.
What a Data Protection Layer Needs to Cover on Every Model Provider
A data protection layer for AI agents should sit outside the model and tokenize every part of a request, including tool calls. It also needs to fail closed and keep one audit log whose policy holds steady when you change providers.
Protection that lives inside one SDK integration breaks the moment a team adds a model, because the next integration starts without it. A layer in the request path between your applications and every provider avoids that problem, since the model behind it can change while the rules stay put. Use these requirements as a checklist when you assess any approach:
- Coverage of the whole request: user messages and system prompts carry customer data, and so do tool call arguments along with the results tools send back. Protection that scans the user message alone misses most of what an agent sends.
- Deterministic tokens: the same value always maps to the same token, so the model can tell that two mentions refer to one customer. Tokenization keeps the meaning of a value while hiding the value itself.
- Neutral labels: field names leak context too, so "Social security number" becomes "ID number" before the request leaves. The model still knows a value is an identifier without learning which kind.
- Secret detection: API keys and database connection strings end up in prompts more often than teams expect. They need the same treatment as PII because a leaked credential opens far more than one record.
- Fail-closed behavior: if a request can't be tokenized, it gets blocked before raw values reach the model. A protection layer that sends the original request on failure protects nothing during an outage.
- Streaming support: agents stream responses as they generate, so restoration has to work chunk by chunk without breaking the user experience.
- Controlled restoration: original values come back only for an authorized application that needs them, such as the system sending Sofia's refund confirmation.
- One audit log: every provider writes to the same record of what was tokenized and when, which gives security teams one place to answer an auditor.
- Stable policy across providers: switching models should leave your privacy controls exactly where they were.
Why Redaction and Masking Fall Short Across Providers
Redaction and masking are common first attempts. Both hide values, yet they break the agent or the business process in ways tokenization avoids.
| Approach | What the model receives | Can an authorized app recover the value? | Effect on agent reasoning |
|---|---|---|---|
| Redaction | Blank spaces or [REDACTED] markers | No, the value is gone | Loses track of who is who in a multi-customer case |
| Static masking | Partial values such as ****1111 | Only the visible digits, never the full number | Confuses records that share masked digits |
| Deterministic tokenization | Consistent tokens such as [NAME: Ry0Ixd1] | Yes, through controlled restoration | Follows each customer accurately across the conversation |
How to Secure Enterprise AI Applications and Agents With Scoped Access and Controlled Release
Start by mapping one agent path and scoping what it can reach. Tokenize data before every model call, then release original values to approved destinations once outputs pass an evidence check against the sources the agent was allowed to use.
These eight steps work for hosted and self-hosted models. Run them on one agent first, then repeat the pattern as more agents come online.
Step 1: Map One Agent Path Before Changing Anything
Pick one agent that handles real customer data, such as the support agent working on Sofia's dispute. Write down five things about it:
- Identities and permissions it acts under
- Data it touches, from CRM records to payment details
- Tools it can invoke during a task
- Destinations that need original values, such as a payment gateway
- Evidence that should back its answers
Note which model provider each part of the path calls. Sofia's support agent might reason on Anthropic, while the letter it triggers gets drafted on OpenAI.
This map shows where protection belongs. It also keeps the first rollout small enough to test properly.
Step 2: Scope Access to What the Task Needs
Access often exceeds the task. Broad connector credentials let an agent reach records and files that have nothing to do with the request in front of it.
For Sofia's dispute, the refund policy and her submitted evidence are relevant. Records belonging to other customers stay out of scope, even if the CRM connector can return them.
Decide which records and files each agent may read, and which tools or actions it may trigger. Align those decisions with your existing identity and application policy so agent access follows the same rules as the rest of your stack.
Step 3: Tokenize Sensitive Fields Before Every Model Call
Replace sensitive values with tokens before the request reaches any provider. The model still understands the case because the structure of the request stays intact.
| What your application sends | What the model receives |
|---|---|
| Sofia Grant disputes a charge on credit card 4111 1111 1111 1111 | [NAME: Ry0Ixd1] disputes a charge on account number [ACCOUNT: k82Hq4P] |
| Contact her at sofia.grant@example.com | Contact her at [EMAIL: p3Xw91L] |
The same rule applies to every provider in the path. Your OpenAI and Anthropic calls should receive tokens for Sofia's details, and so should your internal model.
If tokenization fails for any reason, block the request. A blocked request costs one retry, while a leaked one can't be pulled back from a provider's logs.
Step 4: Protect Tool Calls and Tool Results
Agents leak through tools as often as through prompts. A lookup tool returns a full customer record, and that result flows into the next model call untouched unless something scans it.
Cover tool call arguments going out and tool results coming back. That includes function calls on interfaces such as the OpenAI Responses API and Anthropic tool use, since agents on both providers use them to call tools.
Streamed tool calls need care as well. Arguments should be held until the call completes so a value split across chunks can't slip past detection.
Step 5: Limit Copies Across Logs and Agent Memory
When values are tokenized in the request path, downstream systems record tokens. Logs and traces stay useful for debugging, and a breach of your observability stack exposes references with no values behind them.
Some copies need their own controls:
- Vector stores: embed documents after sensitive fields are tokenized
- Agent memory: set retention limits so saved facts expire on schedule
- Caches: keep retry payloads short-lived and out of long-term storage
- Connected vendors: send third parties tokens unless they are an approved destination for the real value
Step 6: Release Original Values Only to Approved Destinations
Some systems need the real value. A payment gateway needs the card number, and a notification service needs the email address to send Sofia's refund confirmation.
Keep originals inside a protected boundary until one of those approved destinations asks for them. Typical destinations include enterprise APIs and payment gateways, plus the approved caller that started the task.
This design limits the damage if an agent is manipulated through prompt injection:
- Separate the value: the agent handles a reference, so its context never holds the original
- Authorize outside the model: release decisions follow application policy, so instructions inside a prompt can't unlock raw data
- Limit exposure: an approved destination receives the value through a logged path
For payments, the agent can hold a card token while the vault sends the real number to the processor. The agent completes the purchase without ever seeing the card.
These controls reduce the consequences of a compromised agent. They don't remove every prompt injection or tool security risk, so keep your other agent defenses in place.
Step 7: Check Outputs Against Approved Evidence
Data leakage is one risk. Wrong answers are another, because agent outputs turn into customer responses and case updates that people act on.
An answer can sound convincing while resting on missing evidence or an outdated policy. Check each claim in a response against the evidence the agent was allowed to use.
Claim-level verification marks which claims hold up. Your policy then decides whether refused or conflicted content gets held for review or revised before release.
| Claim in Sofia's refund response | Evidence check | Next action |
|---|---|---|
| Her charge falls inside the dispute window | Supported by the current refund policy | Release to Sofia |
| She qualifies for an expedited refund | Conflicted by an older policy version | Hold for agent review |
| A goodwill credit was approved | Refused with no evidence on file | Remove before sending |
Step 8: Keep the Same Policy When You Add or Switch Models
A model switch is where most gaps appear. Write the policy once and apply it to every provider, including internal models.
The file below is a generic illustration of what such a policy captures. Field names and syntax will differ depending on the protection layer you use.
policy: customer-data-v3
providers:
- openai
- anthropic
- internal-llm
tokenize:
- customer_name
- email
- card_number
- account_id
on_tokenize_failure: block
release:
card_number: payment_gateway
email: notification_service
logging: tokens_only
Retest whenever a model changes, using the same sample records each time. Before a new model goes live, confirm these points:
- Requests to the new model contain tokens for every sensitive field
- Tool calls and tool results are covered on its interface
- Audit entries for the new provider land in the same log
- Release rules behave exactly as they did on the previous model
Hosted or Self-Hosted Deployment: Choosing Where Your Data Protection Layer Runs
A hosted protection proxy is quick to adopt and needs no infrastructure of your own, whereas a self-hosted deployment runs inside your environment and suits regulated data or strict residency rules. Many enterprises start hosted and move later.
The protection layer handles sensitive values itself, so where it runs matters as much as what it does. Compare the two options on the factors your security and platform teams care about.
| Factor | Hosted proxy | Self-hosted deployment |
|---|---|---|
| Setup effort | Change the base URL and register provider keys | Deploy containers and plan for upgrades |
| Data residency | Depends on the vendor's available regions | Stays in the region you choose |
| Regulated workloads | Suits teams whose auditors accept vendor attestations | Fits teams that need the vault inside their boundary |
| Operations | Vendor handles scaling and uptime | Your platform team owns availability |
| Self-hosted models | Internal traffic may leave your network to reach the proxy | Protection sits next to your internal models |
A hosted proxy is often the fastest way to prove the approach on one agent. Teams with strict residency rules or a heavy self-hosted footprint usually move the layer in-house once the pilot succeeds.
Payment data often settles the question early. Teams that handle cards tend to keep card vault tokenization inside a certified boundary from day one.
Protecting Self-Hosted Models in Practice
Self-hosted models need the same request-path discipline as hosted APIs. The servers themselves add a few controls of their own:
- Inference logging: turn off prompt logging in production, or write tokenized payloads to disk
- Server access: limit who can open model hosts and GPU nodes
- Retention: set expiry on prompt caches and stored conversations
- Fine-tuning data: tokenize records before they enter training sets
- Network egress: block model servers from calling external services they don't need
How Enigma AI Vault Protects Sensitive Data and Verifies Outputs on Every Model Provider
It doesn't matter which AI agent or model your teams use. Enigma AI Vault is the underlying infrastructure that secures and protects your data around the models and frameworks you already run, and it verifies outputs without rebuilding your agent stack.
AI Vault is a data protection and output verification layer for the agents you already run, and it doesn't build or orchestrate agents. It combines The Vault and Triplets with NoPII at the points where information is retrieved and released.
NoPII is the model-facing layer of AI Vault. One proxy fronts nine model providers, including OpenAI and Anthropic, and your privacy controls don't reset when your model choice changes.
| What you need across providers | AI Vault component | How it works |
|---|---|---|
| Tokenization before model calls | NoPII tokenization | Tokenizes supported sensitive values before requests reach the model, including tool call arguments and results |
| Protection that fails safely | NoPII fail-closed mode | Blocks any protected request that can't be tokenized |
| One record across providers | NoPII provider accounts | Registers multiple providers under one account with a shared audit log |
| Controlled release of originals | The Vault | Holds protected customer records and files, releasing values to approved destinations |
| Payments without card numbers in the agent | Vault payment proxy | Sends cards through an HMAC-signed proxy on supported gateways and purges CVV within 30 minutes |
| Verified outputs | Triplets | Checks each claim against approved evidence and traces it to source and version |
| Deployment inside your environment | Self-hosted containers | Runs NoPII and Data Vault in your environment, with purchase through AWS Marketplace or direct enterprise agreements |
On protected paths, an agent holds a reference without automatically gaining access to the value behind it. Requests to use protected information are checked outside the model and logged.
Enigma Vault holds PCI DSS Level 1 and SOC 2 Type II, with sub-100ms vault operations. Coverage depends on the configured model and tool paths, which is why every evaluation starts with a single agent.
Bring one agent path to our team and we'll show how AI Vault protects it across the models you run today.