Skip to content
Sentynel

#technical6 min readBy Sentynel

Did the user ask for this? How to write the policies that check every agent action

Google now checks each agent tool call against the user's request and plain-language policies. Here is how to write those policies from your operation.

Share

On 23 November 2026 Google described Semantic governance policies, in Preview on its Gemini platform: a check that looks at "each tool call an agent proposes, before it runs", compares it with the user's request and with "your natural-language policies", and replaces a failing call with a denial so it "never runs." The intent check is on by default. The policies are not: someone has to write them. A judge can only enforce rules that exist in writing, so the useful work starts in the operation, not in the console.

Two questions, two different owners

Google's check asks two things about every proposed action.

  1. Did the user ask for this? Google calls the attack it targets intent hijacking: "getting the agent to act on an attacker's intent instead of yours", usually through instructions hidden in a file, an email or a web page. The judge treats the user's request and the agent's system instructions as trusted, and tool results, files and messages as untrusted, "treated as data, never as instructions."
  2. Does it break a company rule? That is the policy layer, and it is the part that is empty until you fill it.

The first question comes for free. The second needs an owner, because only the business knows that a refund above a certain amount needs a second person, that a supplier's bank details are never changed from an email, or that a customer in a dispute is not sent a promotional message. Security can run the checkpoint. The rules it checks belong to whoever owns the process.

Where a policy check sits in an agent action
  1. 01Agent proposes callTool, arguments, case context
  2. 02Intent checkDid the user ask for this?
  3. 03Policy checkDoes it break a written rule?
  4. 04Run or denyDenied calls never run
  5. 05Record the verdictAgainst the case, with the rule ID

Every denial is reviewed: a real attack, a missing permission, or a rule written too broadly.

What the numbers say, and what they do not

Google tested the mechanism on AgentDojo, a public benchmark of prompt-injection attacks, with a gemini-2.5-flash agent. It reports that the check "cut the attack success rate on AgentDojo from 48.7% to 0.9%", and that "none of the 929 attacks that needed a tool call succeeded in any of the six runs."

Attack success on AgentDojo
48.7%Gemini 2.5 Flash agent without the check
0.9%With Semantic governance policies

Source: Google Developers Blog, 23 November 2026

The same post is clear about the cost and the limits, and those are the parts to design around:

  • Blocks have a price. "Utility on benign tasks fell by 2.6 percentage points on average." Some legitimate work gets stopped.
  • The attacks were fixed. "AgentDojo's attacks are fixed and weren't adapted to Semantic governance policies", and "adaptive attacks can be much stronger."
  • The judge is a model. The separation between trusted and untrusted input "is enforced by how the judge is instructed, not by a hard technical boundary." Verdicts can vary from run to run.
  • Text is not covered by a tool-call check. Google recommends complementary controls, "such as response filtering", for manipulation that only produces words.

So treat the check as one strong layer, not as the control. The policies you write, and what happens after a denial, decide whether it helps the operation or just stops it.

How to write a policy a judge can apply

A policy written for a judge model is closer to a procedure line than to a security slogan. "Be careful with customer data" cannot be checked. "Never send a customer's order history to an address that is not the customer's email on file" can. Five fields make a policy usable:

Field What to write
Rule ID and owner A short ID and the person who owns the process it protects
Action it covers The tool or tool family: "send email", "update supplier record", "issue refund"
Condition The observable fact that makes the action wrong, stated in the terms the agent sees
Verdict Deny, or deny and route to a named person with the case attached
Why One sentence on the risk, so a reviewer can tell a good block from a bad one

Three writing rules keep the set healthy:

  • One rule, one action. A rule that covers "anything financial" will block too much and get switched off. Start from the tools the agent can actually call and write the rules per tool.
  • Use the words in the record. If the CRM calls it "account status: disputed", write that, not "unhappy customers." A judge compares text with text; vague words produce vague verdicts.
  • Keep hard limits out of the judge. Amounts, allowed recipients and permissions that can be checked by code should be checked by code. Give the judge the rules that need reading: whether a request matches what the user asked, whether content looks like an instruction smuggled into data.

Dry run first, and read every verdict

Google's own rollout advice is to start in dry run, "review its verdicts in Cloud Logging, then switch to enforcement." The principle holds on any platform. A dry run is how you learn which of your rules are wrong before they stop real work.

During the dry run, sort every would-be denial into one of three buckets:

  1. A real problem. The agent was about to do something nobody asked for. Keep the rule, and look at where the instruction came from.
  2. A rule written too broadly. Legitimate work would have been blocked. Narrow the condition, or add the missing context to what the judge sees.
  3. A gap in the operation. The action was legitimate but no rule or permission described it. That is a missing step in the process map, not a security event, and it goes to the process owner.

The third bucket is where most of the value sits. Every time a policy check surprises you, it shows a place where the operation was never written down.

Design the denial as a step, not a dead end

Google notes that in production the denial "replaces the model's entire response", so the agent's turn ends there. For security that is the right default. For the customer waiting on the case it is a stop in the middle of their request. Decide in advance what a denial does to the case:

  • It moves the case to a named queue with the rule ID, the proposed action and the source of the instruction.
  • It tells the customer, in a fixed message, that a person will follow up, without exposing why.
  • It counts. Denials per rule per week is the signal that a rule needs rewriting or that an attack is under way.

An operation with clear stages makes this simple, because a denied action is just a case moving to a different stage with an owner. Without stages, it becomes an error in a log that nobody reads.

A first step for this week

Take one agent that already calls tools in production. List the tools it can call. For each one, ask the process owner a single question: what is the one thing this action must never do, even if the request looks reasonable? Write the answers as rules with the five fields above, run them in dry run for two weeks, and sort every verdict into the three buckets. You will end up with a better policy set and, more usefully, with a list of the steps your operation never wrote down.

Sources

  1. https://developers.googleblog.com/did-the-user-ask-for-this-securing-ai-agents-against-intent-hijacking-with-semantic-governance-policies/
Share
← All sygnals