AivexaNewsSearch
AI news for builders and product teamsChecked every hour

Protect agent tool calls with Skyflow and Amazon Bedrock AgentCore Gateway

Collected Nov 19, 2026

Skyflow and AWS published a walkthrough of an open-source interceptor that adds data de-identification to Amazon Bedrock AgentCore Gateway, the component that fronts the tools an AI agent calls. The interceptor is a single AWS Lambda function attached to both gateway interception points: REQUEST, which runs before the gateway calls a tool, and RESPONSE, which runs after a tool answers and before the agent sees the result. The code lives in the agentcore-skyflow repository on GitHub under the MIT license, and Skyflow is sold through AWS Marketplace.

The design targets a gap the post describes between controls on model input and output and the traffic in between. When a model writes tool arguments, it draws on everything in its context, so details a tool does not need can travel to third-party servers outside the customer's AWS account. Results flowing back — scraped pages, CRM records, case notes — land in the model's context, memory, traces and logs. Document tools complicate this further because tools over Amazon S3, Box and Google Drive typically return a signed URL rather than text, so a string filter sees a link and lets it through while the agent opens the original file. Putting controls in each agent does not scale across teams and frameworks, and cannot reach third-party tools.

At each interception point the Lambda calls Skyflow Detect to find entities such as names, email addresses, phone numbers, government IDs, card numbers, dates of birth and locations, then replaces them with tokens or restores originals. Skyflow Vault holds the underlying values. A per-tool configuration chooses one of three modes. Shield the tool strips sensitive values from outgoing arguments and restores them in results, aimed at web search, enrichment and third-party APIs that do not need customer identity. Shield the model de-identifies prompts, history, files and tool results before the model reads them and re-identifies the answer on the way back; the agent's model client points at the gateway's inference endpoint for this. Shield the document swaps a file's signed URL for one pointing to a de-identified copy, with Skyflow Detect v2 (preview) fetching, cleaning and storing the copy in an approved Region.

The post's example is a dispute-resolution agent at a large European bank. An analyst asks it to investigate a disputed card transaction; the agent searches the web for the merchant and pulls a case note from Amazon S3. Unprotected, the search provider would receive a query containing the customer's name, scraped pages would drag unrelated personal data into context, and the agent would read the full case note with name, email, phone and card details. With the interceptor, the provider receives a query where the name is replaced by a vault token such as [NAME_AJbrIud], web content arrives de-identified, and the agent gets a link to a cleaned copy of the note. Tokens come in two kinds: vault tokens that an authorized user can reverse through Skyflow, and one-way counters such as [NAME_1] that nothing can reverse.

Several production behaviours are spelled out. Agents keep discovering the gateway and signing requests with their IAM role, and the interceptor adds no credentials for them to manage. Policy lives in AWS Systems Manager Parameter Store and sets direction, entity types and token type per server and per tool, with changes taking effect without redeployment. The interceptor fails closed: if de-identification cannot complete, the call is withheld rather than sent in the clear, and it fetches files only from allowlisted locations. The Skyflow API key sits in AWS Secrets Manager, and decisions are logged to Amazon CloudWatch with metrics and alarms; credentials and original values are not logged.

Under the hood, the interceptor reads policy from Parameter Store and its key from Secrets Manager, and calls Skyflow Detect and Vault in an approved Region. For model calls it keeps a short-lived Amazon DynamoDB record of which tokens each call minted, so only those are restored; the record holds no original values. For documents, Skyflow Detect fetches the file directly through a presigned URL, so file bytes never pass through Lambda — which is why Lambda payload limits do not cap file size. Documents are checked against an allowlist and a configured size limit before submission, so oversized files are refused immediately rather than timing out.

The interceptor is positioned as complementary to existing AgentCore controls. Policy, built on Cedar and Dogwood, authorizes what agents may do, can reason over earlier steps in a trajectory, and can block specific arguments from reaching specific tools; Skyflow then handles how sensitive data is treated once a call is allowed. Amazon Bedrock Guardrails cover content safety and redaction for model interactions. AgentCore Identity and IAM are unchanged, and AgentCore Observability and CloudWatch record interceptor decisions alongside gateway traces.

Deployment uses the AWS CDK: a stack creates the Lambda function, its policy parameter, the DynamoDB table and CloudWatch metrics and alarms, and a repository script attaches the interceptor at both points and grants the gateway role permission to invoke only that function. Teams managing gateways with CloudFormation or CDK are advised to declare the interceptor there instead so later stack updates keep it. Adding an inference target and repointing the model client enables model shielding, and the repository includes a full reference deployment runnable with the AgentCore CLI. The post lists entry points for existing gateways, new agents, MCP servers outside AWS fronted as gateway targets, document stores added to the policy allowlist, and model calls routed through an inference target.

Limitations are stated. TXT, JSON, CSV, XML, JSONL, DOCX, XLSX and PPTX keep reversible vault tokens, but PDFs and images are fully de-identified with one-way tokens, so originals cannot be restored from those files. String de-identification and re-identification are generally available, while document handling via signed URLs relies on Skyflow Detect v2 in preview. AgentCore Gateway availability varies by AWS Region and should be checked against the AgentCore documentation before deployment. De-identification time scales with document size, so the size limit should match the documents in use, and latency should be validated against real workloads and Region during a pilot.

Why it matters: teams running agents against third-party tools now have a drop-in way to keep customer identifiers out of outbound queries and out of model context without rewriting agent code, which is the kind of control regulated industries tend to require before widening agent rollouts. The main trade-offs are operational: a preview-stage dependency for documents, one-way tokenization for PDFs and images that forecloses later re-identification, and added latency proportional to file size. A reasonable reading is that the gateway, rather than individual agents, becomes the natural enforcement point for data protection policy as MCP-based tool use spreads.

Read at AWS Machine Learning Blog

Based on reporting from the original publisher. Visit the source for full context and later updates.

Publisher excerpt

Learn how Skyflow and Amazon Bedrock AgentCore Gateway keep sensitive data out of the tools your AI agents call. Added as a gateway interceptor, Skyflow de-identifies data before any tool, model, or log sees it, and restores it for authorized callers, with no change to your agent code.