A bill that tries to pay itself
Here's a simple way to break a finance agent. A user asks it to pay a bill. Somewhere in the bill file, an attacker has hidden a line telling the agent to send money to a different account. If the agent treats that line as an order, it has been hijacked. It's now working for whoever wrote the file.
Google's answer is a feature called semantic governance policies, which runs on its Gemini Enterprise Agent Platform. On 23 November 2026, Google engineers Ritika Nigam, Deepti Sehrawat and Pranav Bhagwat posted test results for it on the Google Developers Blog. The post's title puts the core question plainly: did the user ask for this? We went through the post, the two product documentation pages and an independent review to see what holds up and where the gaps are.
Where the check happens
The feature sits in Agent Gateway, Google's managed proxy for traffic between an agent, its model and any remote tools. The model may reply with a request to call a tool. The gateway catches that reply before the agent sees it. It sends the proposed call to a separate policy engine, along with the user's prompt, the chat history, the list of tools the agent can use and any rules you've written. The engine hands back ALLOW or DENY.
Allowed calls go through untouched. A denied call is stripped from the model's reply and swapped for a denial message, so the tool never runs. The denial comes with a written rationale the agent can show the user.
Two tests run on every call, and both have to pass:
- Intent check. This is on by default, even if you haven't written a single rule. It asks whether the action fits what the user actually requested. You can switch it off, but Google's configuration guide warns that it's the part that catches calls planted by emails, web pages and other untrusted content.
- Constraint check. These are plain-English business rules of up to 5,000 characters each. A rule can cover every tool an agent has, or just one tool on a named MCP server. In a September 2026 post, Google's example blocked refunds over $30 on opened digital goods and sent them to a human manager. It caught a "Workplace User License" refund that a keyword filter would likely have missed.
The judge is itself a language model. It's told to trust the user's request and the developer's system instructions, and to treat files, tool outputs, messages and web content as data. In the bill example, reading the bill and checking past transactions passed, since the user had asked for both. The transfer to the attacker failed because its only origin was text inside the file. If the user had typed the same transfer themselves, it would have been allowed.
The benchmark numbers
Google tested with AgentDojo, an open-source, MIT-licensed benchmark from ETH Zurich and Invariant Labs that was presented at NeurIPS 2024. It puts agents in simulated banking, Slack, travel and workspace apps and plants injections in the data they read. The setup was AgentDojo v1.2.2 with a gemini-2.5-flash agent, 97 user tasks, 949 attacked runs and the "important_instructions" attack. The policy engine ran on default settings with no custom rules, and every figure is an average of six full runs.
- Attack success dropped from 48.7% to 0.9%. Across the six runs it stayed between 0.84% and 0.95%.
- Banking, Slack and workspace had zero successful attacks in every run. Of the 929 attacks that needed a tool call, none got through.
- Everything left over came from travel attacks that only changed the agent's reply text, like steering a user to a particular hotel. No tool call means nothing for the judge to inspect.
- On clean tasks, utility fell 2.6 points on average. Single runs ranged from a 1.0-point gain to a 7.2-point loss.
- Utility under attack went from 35.1% to 25.8%. Google says about 12.4 points of the unprotected score came from runs where the agent finished the job and also did what the attacker wanted.
- Runs that finished the task with the attack blocked rose from 22.7% to 25.1%.
Most of the utility cost landed in Slack. Two benign tasks failed every time. One told the agent to follow instructions from an outside web page, and the other asked it to accept an identity that clashed with its setup. Google notes that both look a lot like prompt injection. Over-blocking hit 1 of the 97 benign tasks, about 1%. If your agents are meant to act on instructions they fetch, expect the same friction.
What the results can't tell us
Google is open about the limits. The trust split lives in the judge's instructions, with no hard technical wall behind it. An injection built to look like the user's own request could get through. AgentDojo's attacks are fixed and weren't tuned against this system, so the results say nothing about adaptive attackers. The post cites red-teaming by NIST's Center for AI Standards and Innovation, where purpose-built attacks lifted hijack success against one agent from 11% to 81%. Google also says its test harness handled denials a little differently from production in a few edge cases.
An independent analysis on beri.net adds a fair point: all the numbers come from Google, using one model, one attack and one benchmark. It compares the judge with CaMeL, a research design from Google, Google DeepMind and ETH Zurich that keeps untrusted data out of control flow. CaMeL offers provable security and solved 77% of AgentDojo tasks, against 84% for an undefended system. The semantic judge's protection depends on how a model behaves, though it doesn't require rewriting the agent.
The documentation lists more gaps:
- Streamed model responses aren't evaluated, so a tool call inside one might not be blocked. Agents have to call models without streaming.
- Verdicts are probabilistic and can be wrong.
- Rationales can quote your rules back to users. Keep confidential details out of constraints, or set a fixed denial message of up to 1,000 characters.
- If the judge denies a call because of one policy, it may skip checking the others.
Price, regions and setup
Google hasn't published a price or a per-call latency figure. The feature is Pre-GA, supplied "as is" with possibly limited support. Cloud Logging records token use for each turn, so a trial can at least measure what the judge consumes.
It's offered in eight regions: us-central1, us-east1, us-east4 and us-west1, plus europe-southwest1, europe-west1, europe-west4 and europe-west8. None are in Asia Pacific. A New Zealand team hosting in Sydney or Melbourne would have its model responses judged in the US or Europe, which raises latency and data residency questions worth asking before any production use.
Setup takes some work. Agents need agent identity and an Agent Gateway configuration, and both settings are fixed at deployment, so older agents may need redeploying. You then provision the engine (usually 2 to 3 minutes, up to 20 when demand is high), wire private networking to the gateway, and create an authorisation extension and policy. That policy should match only the model inference paths: :generateContent, :rawPredict, /v1/messages and /chat/completions. Gemini, Anthropic and OpenAI-compatible APIs are all supported. Hub-and-spoke setups can govern agents across several projects from one management project.
What builders can do now
- Start in dry run. Setting
sgpEnforcementModetoDRY_RUNin the extension metadata lets every call through and logs the verdicts. Be careful: a metadata update replaces the whole map, so a sloppy patch can quietly drop other settings, including a disabled intent check. - Measure on your own traffic. Run your real task suite for a week, count the false denials and weigh token spend against the value of the actions being protected.
- Aim it at consequential tools. Payments, outbound messages, deletions and data sharing benefit most. Keep least-privilege tool scopes as the boundary that still holds when the judge gets it wrong, and add response filtering for text-only manipulation.
- Test it yourself. AgentDojo installs with
pip install agentdojo, so teams can rerun comparable tests with their own models and publish the results.
Sources
- Did the user ask for this? Securing AI agents against intent hijacking with Semantic governance policies (Google Developers Blog)
- Semantic governance policy overview (Google Cloud documentation)
- Configure semantic governance policies (Google Cloud documentation)
- Build zero-trust AI agents that judge intent, not just syntax (Google Developers Blog)
- AgentDojo repository (ETH Zurich SPY Lab, GitHub)
- Google semantic governance policies analysis (beri.net)
Build with people working on the same things
Join the Auckland Society for AI: NZ$599 a year with a ForgeBox and the members' projects area. Our Auckland meetups are open to everyone.