Semantic governance policies run inside Agent Gateway and check each tool call an agent proposes before it executes. The LLM judge asks whether the user requested the action, and it treats tool results, files and messages as data rather than instructions.
In tests on AgentDojo, a public benchmark for indirect prompt injection, Google ran a gemini-2.5-flash agent over 97 user tasks and 949 attacked runs, repeating the full benchmark six times per configuration. Attack success fell from 48.7% to 0.9%, while utility on benign tasks dropped 2.6 percentage points on average. None of the 929 attacks that needed a tool call succeeded in any run.
The authors say the approach does not cover attacks that only manipulate an agent's text, such as recommending a hotel in a travel task, and suggest response filtering for that case. They also note that the judge's separation of trusted and untrusted content is enforced through its instructions rather than a hard technical boundary. The AgentDojo attacks were not adapted to the system, and NIST CAISI found adaptive attacks raised success against another agent from 11% to 81%.
Why it matters if you build agents
Agents that read web pages, documents or tool output can be steered into sending money or sharing data by instructions hidden in that content, and a per-action check on whether the user asked for the call addresses that without needing to detect specific attack wording.
Developers relying on this kind of gateway check should still test against adaptive attacks and add separate controls for text-only manipulation of responses, since the reported results use fixed attacks.
Google says the product is in Preview and suggests starting in dry-run mode and reviewing verdicts in Cloud Logging before enforcement.
Get stories like this every weekday
One short email with the day's agent tooling news.