Google's AgentDojo Test Cuts Prompt-Injection Success to 0.9%

Google's semantic governance policies put an LLM judge in Agent Gateway that blocks tool calls the user never asked for. In Google's AgentDojo test, attack success fell from 48.7% to 0.9%, but streamed and text-only replies go unchecked and adaptive attacks were not tested.

By Rajesh Beri·November 24, 2026·10 min read
Share:
A security guard at a glass checkpoint desk inspecting a stack of paper instruction slips passed up from an office worker's desk, holding one slip back while waving others through.

Illustration generated using AI

Google's new semantic governance policies put an LLM judge in front of every tool call your agent proposes, and in Google's own benchmark that judge cut successful prompt-injection hijacks from 48.7% to 0.9%. Pilot it in dry-run mode as one layer of defense. Google says itself that the judge is not a hard boundary, and nobody has yet tested it against attacks built to fool it.

The feature went to Preview on November 20, 2026, in a Google Developers Blog launch post. Three days later Google published the AgentDojo results. It matters beyond Gemini shops, because the judge sits in Agent Gateway and checks traffic to Claude, OpenAI-compatible endpoints and self-hosted vLLM servers as well.

What Semantic Governance Policies Check

A semantic governance policy is a plain-language rule that an LLM judge applies to each tool call before the call runs. When your agent's model returns a tool call, Agent Gateway sends it to the policy engine, and the judge weighs it against the conversation so far, the agent's system instructions and tool descriptions, and your policies. If the call passes, the response reaches the agent unchanged. If it fails, the engine replaces the whole response with a configurable denial message and the call never executes.

Two checks run, and both must pass:

  1. User intent alignment is on by default and needs no policy. The judge asks whether the user requested this action. Tool results, files and messages count as untrusted data; the user's request and the system instructions are trusted.
  2. Constraint adherence checks your own rules, written the way a compliance team writes them. Google's examples include sharing quarterly results only with company addresses before the earnings release, submitting invoices only after every approval is in, and accepting refunds of $80 or less.

The worked example in the launch post shows both checks working on one finance agent. Emailing preliminary Q3 results to the controller was allowed. Emailing them to an investor with a personal Gmail on copy was denied by the policy. A deletion triggered by hidden text in a planning document was denied by the intent check, because nobody asked for it.

Supported model paths, per Google's documentation, are the Gemini API and Gemini models on the platform, the Anthropic Messages API, Claude models on the platform, and OpenAI Chat Completions, Mistral AI and self-hosted OpenAI-compatible servers such as vLLM. An agent built on Claude can be covered too, as long as its model traffic runs through Agent Gateway.

Google positions it next to its other controls. IAM and gateway access policies decide which tools and MCP servers an agent can reach. Model Armor screens prompts and responses. Semantic governance is the inline check on whether a specific action should happen at all. The Agent Identity, Registry and Gateway layers Google showed at Cloud Next settled who an agent is and what it can reach; this adds a judgment on each individual call.

What Google's AgentDojo Numbers Show

On Google's test, the intent check blocked every attack that needed a tool call. AgentDojo is an ETH Zurich benchmark of simulated banking, Slack, travel and workspace apps, where success is scored by deterministic code checks on the app state and the agent's output rather than by a model. Google ran AgentDojo v1.2.2 with gemini-2.5-flash, 97 user tasks and 949 attacked runs, six times per configuration, with intent matching on and no custom policies.

The results Google reported:

Metric No guardrail With intent check
Attack success rate 48.7% 0.9%
Utility under attack 35.1% 25.8%
Task done and attack failed 22.7% 25.1%
Benign utility change n/a -2.6 points on average

None of the 929 attacks that required a tool call succeeded in any of the six runs. Banking, Slack and workspace had zero successful attacks. The remaining 0.9% came from travel, where the attack only changed the text of the reply, such as recommending a particular hotel. No tool call meant nothing for the judge to evaluate.

The cost shows up in two places. Benign utility fell 2.6 points on average, with individual runs ranging from -1.0 to 7.2 points. Most of that came from two Slack tasks that told the agent to follow instructions from an external web page while claiming a user identity that contradicted the agent's configuration. Utility under attack fell from 35.1% to 25.8%, because when the judge denies an injected action the agent usually stops rather than finishing the user's task. About 12.4 points of the unguarded 35.1% were runs where the agent completed the task and also carried out the attacker's instruction.

Where the Judge Does Not Reach

The judge covers non-streamed tool calls from routed traffic and nothing else. The documentation lists the gaps plainly.

  • The policy engine does not support streamed responses, including :streamGenerateContent, :streamRawPredict or any request with "stream": true. In Google's words, a tool call in a streamed response "might not be blocked."
  • Text-only replies (answers, plans, questions back to the user) are not evaluated. The residual 0.9% in the benchmark came from these.
  • Agent Gateway is the only supported enforcement point, and all agent egress has to pass through it.
  • Google writes that the separation between trusted and untrusted content "is enforced by how the judge is instructed, not by a hard technical boundary." An attacker could try to disguise an injected request as the user's.
  • AgentDojo used one fixed attack, important_instructions, which was not adapted to the guardrail. Google says its results "don't measure that."
  • AgentDojo called the model directly, so Google ran its production policy engine through a test harness that it says handles denials "slightly differently from production in a few edge cases."
  • Tool descriptions are truncated past 1,000 characters at the tool level (750 for an action, 300 for a parameter), and the judge is instructed to deny calls to tools that have no description.

Verdicts are probabilistic. Google software engineer Deepti Sehrawat wrote in the launch post, as Help Net Security reported, that "Because verdicts come from an LLM, which is probabilistic, they may vary," and the docs carry the same caution.

What It Costs and What You Have to Rebuild

Neither the launch post nor the documentation gives a price or a per-call latency. The overview says the service logs "exact per-turn LLM token consumption in Cloud Logging," which tells you the judge burns tokens but not at what rate. The only timing figure is provisioning: about 2 to 3 minutes, up to 20 when the warmup pool is refilling.

The setup work is larger than the launch post suggests. According to the configuration guide:

  • Agents must be deployed with identity_type=AGENT_IDENTITY and agent_gateway_config. Both fields are immutable, so an existing agent without them "must be redeployed."
  • Regions are limited to four in the Americas (us-central1, us-east1, us-east4, us-west1) and four in Europe (europe-southwest1, europe-west1, europe-west4, europe-west8).
  • A constraint can be up to 5,000 characters and a denial message up to 1,000.
  • Dry run is a metadata flag, sgpEnforcementMode: DRY_RUN, under which every call is allowed and verdicts are logged. Enforce is the default.
  • The sample authorization extension sets failOpen: false. Decide with your SRE team what an unavailable judge should do to a production agent before you copy it.
  • Google warns against broadening the traffic match, because other traffic such as MCP tool calls "isn't evaluated but still adds latency."

One more line belongs in front of your legal team: policies are Service Data, and Google tells you not to put sensitive, confidential or proprietary information in your constraints. A rule like "never disclose Project X results before March 3" may be exactly what you cannot write. Denial rationales can also quote your policy back to an end user unless you set your own message.


The Case Against Relying on It

The strongest objection comes from Google's own researchers. In 2025, a team from Google, Google DeepMind and ETH Zurich published CaMeL, a design that pulls control flow out of the trusted query so that untrusted data "can never impact the program flow." The authors wrote that heuristic defenses such as delimiters, prompt sandwiching and fine-tuning offer no guarantee of security. CaMeL solved 77% of AgentDojo tasks with provable security, against 84% for an undefended system. Its security does not depend on how a model behaves, and the semantic governance judge depends on exactly that. What the judge offers in exchange is that you can deploy it without rewriting your agent.

The history of this benchmark also argues for caution. When NIST's CAISI red-teamed agents on AgentDojo, new attacks raised success against Claude 3.5 Sonnet from 11% for the strongest baseline attack to 81%, and repeated attempts raised the average success rate on its chosen injection tasks from 57% to 80%. Google cites the 11%-to-81% figure in its own post.

There is a fair case for the judge. It evaluates the proposed action, so it does not need a signature for each new injection phrasing. It runs on agents you already have without a rewrite of their logic. And it covers the attacks that do the most damage: a hijacked send, transfer or delete. Uber built a similar intent check in-house; most companies will not.

Detection products such as those in our runtime prompt-injection comparison screen text, and the semantic judge screens actions, so the two can run side by side. Keep tool scopes narrow either way, because the SalesBleed Agentforce leak showed what an over-scoped tool does once an injection gets through.

What to Do Before You Turn On Enforcement

This Week:

  1. List every agent on Gemini Enterprise Agent Platform that can send, pay, share or delete, and check whether each was deployed with agent identity and a gateway config. The ones that were not need a redeploy, so put that on the backlog now.
  2. Find out which agents stream. Any agent using a streaming endpoint is outside the judge's coverage until you turn streaming off.

This Month:

  1. Turn on dry run for one high-risk agent and read the semantic-governance-policy log entries for two weeks. Count the denials the judge would have issued on legitimate work, and record the token usage per turn so you can price it.
  2. Write two or three constraints for your riskiest actions, using the spending-limit and approval patterns from Google's examples, and have legal review them against the Service Data warning before they go in.
  3. Run your own injection tests through the gateway, including attacks written to look like the user's request. A red-team tool from our garak, PyRIT and Promptfoo comparison will get you started.

Before Enforcement:

  1. Agree with your SRE team on what happens when the judge is down, and test it.
  2. Keep response filtering in place for text-only manipulation, which this control does not see.
  3. Ask your Google account team for pricing and per-call latency in writing before you enforce on a customer-facing agent.

The Bottom Line

Semantic governance policies give Google Cloud customers a managed check on whether each agent action was requested, and on a fixed benchmark the check stopped every tool-call hijack. Security teams have seen this shape before with web application firewalls, which cut common attacks and then got probed by people who studied their rules. Google's numbers come from Google, on one model, against one attack, through a test harness. Run it in dry run, measure the false denials and the token bill on your own traffic, and keep least-privilege tools as the boundary that holds when the judge is wrong.

Start with the agent that can move money.

Continue Reading

Share:

Frequently Asked Questions

What are Google's semantic governance policies?

They are plain-language rules that an LLM judge in Agent Gateway applies to each tool call an agent's model proposes, before the call runs. A default user-intent check also asks whether the user requested the action. A call must pass both checks; a failed call is replaced with a denial message and never executes. The feature is in Preview on the Gemini Enterprise Agent Platform.

How well did semantic governance policies stop prompt injection on AgentDojo?

In Google's test with gemini-2.5-flash on AgentDojo v1.2.2, averaged over six runs, attack success fell from 48.7% to 0.9%. None of the 929 attacks that needed a tool call succeeded. Benign utility dropped 2.6 points on average. Google used one fixed attack and did not test attacks adapted to the judge.

Which models work with semantic governance policies?

Google's documentation lists the Gemini API and Gemini models on its platform, the Anthropic Messages API, Claude models on the platform, OpenAI Chat Completions, Mistral AI, and self-hosted OpenAI-compatible servers such as vLLM. Traffic must route through Agent Gateway, and streamed responses are not evaluated.

What do semantic governance policies cost?

Google's launch post and documentation give no price or per-call latency figure. The service logs the judge's token usage per turn in Cloud Logging. Provisioning the policy engine takes about 2 to 3 minutes, or up to 20 when the warmup pool is refilling.

Should I run semantic governance policies in dry run or enforce mode first?

Start in dry run. Google recommends it because LLM verdicts are probabilistic and may vary. In dry run every call is allowed and verdicts and rationales are logged, so you can count false denials and token usage on your own traffic before switching to enforcement.

Newsletter

More on Agentic AI, every Sunday

The week's enterprise AI news, Agentic AI included, in one Sunday email.

Weekly, free. Unsubscribe any time. Privacy

Latest Articles

View All →