AWS and Skyflow published a walkthrough on November 19, 2026 showing how to keep sensitive data out of AI agent tool calls. The idea is to attach Skyflow Detect to Amazon Bedrock AgentCore Gateway as a request and response interceptor. In the AWS Machine Learning Blog post, the authors say the interceptor "de-identifies data before it reaches a tool, restores it before the agent reads the result, and replaces documents with clean copies before the agent opens them," and that "your agents and tools don't change."
This is a vendor and partner post, so treat it as a design pattern with a reference implementation, not as a measured result. It gives no latency, cost or accuracy numbers. What it does give is a clear threat model and an open-source starting point. This post explains the problem, the three modes, how to deploy it and where the limits are.
TL;DR: what the interceptor does
| Question | Answer |
|---|---|
| What is it? | One Lambda function on AgentCore Gateway's request and response interception points |
| What does it protect? | Tool arguments, tool results, model prompts and documents |
| How? | Skyflow Detect finds entities and swaps them for tokens; Skyflow Vault stores originals |
| Code changes? | None to agents or tools, per AWS |
| License | MIT for the interceptor on GitHub; Skyflow is a Marketplace product |
| Fails how? | Closed: the call is withheld if de-identification cannot complete |
| Preview parts | Document de-identification (Skyflow Detect v2) |
| Measured results | None published |
The problem: agents act through tools, and tools move data
The post argues that most enterprise controls cover what goes into and out of the model, and far fewer cover what an agent sends to its tools or what the tools send back. It names three leaks:
- Sensitive data leaves through tool arguments. The model writes arguments from everything in its context. Ask about a customer, and the name, account number or email can go straight into a query to a third-party server outside your compliance scope.
- Sensitive data comes back in tool results. Scraped pages, CRM records and case notes land in model context, memory, traces and logs, even when the task did not need them.
- Documents bypass text inspection. Tools for Amazon S3, Box and Google Drive return a signed URL, not text. A filter that inspects strings sees a link and lets it pass, and the agent then opens the original file.
The first leak is the one builders underestimate. A model builds a search query from its whole context, so a harmless-looking lookup can carry personal data to a vendor. Our post on MCP tool provider misbinding covers a related trust problem on the tool side.
Why the gateway is the control point
AgentCore Gateway fronts every tool an agent uses, whatever framework or model the agent runs on. With gateway interceptors you can run your own code, as an AWS Lambda function, on every call: a request interceptor sees each call before it reaches a tool, and a response interceptor sees each result before it reaches the agent. Either can inspect, rewrite or block the payload. Attached once, it covers every agent and tool behind the gateway. AWS's AgentCore product page describes the wider platform.
We have written about the same interceptor point for access control in Bedrock Knowledge Base ACLs on AgentCore Gateway, where the lesson was not to let the model choose the user. The Skyflow pattern uses the same hook for data instead of identity.
Agents that act on your behalf need rules. See how explainx helps secure your agents →
The worked example: a bank dispute agent
AWS uses a large European bank with strict data-residency duties. An analyst asks an agent to investigate a disputed card transaction. The agent searches the web for the merchant, then pulls the case note from Amazon S3.
Without protection, the search provider receives a query containing the customer's name, scraped pages bring unrelated personal data into the model's context, and the agent reads the original case note with the full name, email, phone number and card details.
With the interceptor, the provider receives a query where the name is a reversible vault token such as [NAME_AJbrIud], merchant results come back the same, web content reaches the model already de-identified, and the agent only receives a link to a de-identified copy of the case note. The analyst still sees the real name in the final answer.
The three modes
| Mode | What happens | Who sees real data | Typical use |
|---|---|---|---|
| Shield the tool | Sensitive values stripped from arguments, restored in results | Agent and user, not the tool | Web search, enrichment, third-party APIs |
| Shield the model | Prompts, history, files and tool results de-identified before the model; answer re-identified after | Agent and user, not the model | Customer chats, scraped content, cross-Region or third-party models |
| Shield the document | The signed URL is swapped for a link to a de-identified copy | No one on the agent side | Case notes, statements, contracts in S3, Box, Google Drive |
For model calls, the agent points its model client at the gateway's inference endpoint. On the way back, only the tokens minted for that call are restored, tracked in a short-lived Amazon DynamoDB record that holds no original values. For documents, Skyflow Detect fetches the file through a presigned URL, so the bytes never pass through Lambda and payload limits do not cap file size.
Two token types exist: a vault token like [NAME_AJbrIud], which an authorized user can reverse through Skyflow, and a one-way counter like [NAME_1], which nothing can reverse.
What stays the same, and what is configurable
AWS lists four production properties:
- No change to agents or tools. Agents discover the gateway and sign requests with their IAM role.
- Configuration without redeploys. The policy sets direction, entity types and token type per server and per tool. It lives in AWS Systems Manager Parameter Store.
- Fail closed. If de-identification cannot complete, the call is withheld. Files are fetched only from allowlisted locations, and uninspectable traffic is blocked.
- Operations on AWS. The Skyflow API key sits in AWS Secrets Manager, decisions go to Amazon CloudWatch, and the interceptor never logs credentials or original values.
Entity types include names, email addresses, phone numbers, government IDs, card numbers, dates of birth and locations.
How to deploy it
AWS gives these steps for a gateway you already run:
- Subscribe to Skyflow in AWS Marketplace, create a vault and store its API key in Secrets Manager.
- Deploy the interceptor stack from the repository with the AWS CDK. It creates the Lambda function, its policy parameter, a DynamoDB table for model-call records and the CloudWatch metrics and alarms.
- Attach the interceptor to both interception points. A script in the repository does this and grants the gateway role permission to invoke only that function.
- To shield the model, add an inference target and point the agent's model client at the gateway's inference endpoint.
For MCP servers outside AWS, front them as gateway MCP server targets so their traffic passes the interceptor. For document stores, add their location to the policy allowlist. Skyflow offers several vault deployment models and Region choices for residency.
How it fits with Policy and Guardrails
The post positions the interceptor next to existing controls. AgentCore Policy decides what an agent may do and can stop specific arguments from going to specific tools. Amazon Bedrock Guardrails handle content safety and sensitive information redaction for model interactions. Skyflow adds vault-backed tokenization and document de-identification. AWS's framing: "Policy decides what an agent may do, and Skyflow controls how sensitive data is handled when it does." AgentCore Identity and IAM stay unchanged. For identity on the agent side see AgentCore Identity with private CA.
Limits and open questions
- Formats. Text and Office formats (TXT, JSON, CSV, XML, JSONL, DOCX, XLSX, PPTX) keep reversible vault tokens. PDFs and images are fully de-identified but get one-way tokens, so originals cannot be restored from those files.
- Preview. Document de-identification uses Skyflow Detect v2, in preview. String handling is generally available.
- Region. AgentCore Gateway availability varies by AWS Region; check the documentation before deploying.
- Latency. De-identification time scales with document size. The interceptor refuses files above a configured limit. AWS says to validate latency on your own workloads during a pilot.
- No numbers. The post publishes no detection accuracy, miss rate, latency or cost. Detection of "sensitive entities" is only as good as the detector; a missed entity goes through. Measure recall on your own data.
- Vendor lock-in. The interceptor is MIT-licensed, but the detection and vault are Skyflow's service.
Where to start
AWS suggests one workflow that touches customer data and calls at least one tool outside your account. List the entity types that must never leave and the tools allowed to see them. Deploy the interceptor, start with Shield the tool, then add the document and model modes. Watch the CloudWatch metrics for a week before widening the rollout.
A good test is to plant known fake identifiers in a test case, run the agent end to end, and check the third-party tool's logs for any real value. That tells you what the detector misses. It also shows whether the pattern fits agents that reach into customer systems, as in our report on Credit Nirvana's agentic debt collection flaw.
Bottom line
The pattern is sound: put data protection where every tool call already passes. The open-source interceptor lowers the cost of trying it. The evidence is thin, because the post is a vendor walkthrough with no measurements. Pilot it, measure misses, and keep the fail-closed setting on.
Related reading
- Bedrock Knowledge Base ACLs on AgentCore Gateway
- Bedrock AgentCore Identity with private CA
- MCP tool provider misbinding and agent security
- Gemini API Tool Retrieval and deferred tools
- Credit Nirvana agentic debt collection flaw
- What is MCP? The complete guide
Details reflect the AWS post of November 19, 2026. Preview features may change.
