---
title: "Did the user ask for this? Securing AI agents against intent hijacking with Semantic governance policies"
description: "AI agents act on user requests but also process untrusted content from tools, creating an attack surface for indirect prompt injection that hijacks user intent. Semantic governance policies intercept each proposed tool call before execution and check it against the user’s original request and natural-language policies. In the AgentDojo benchmark, this user intent matching alone reduced the attack success rate from 48.7% to 0.9% across six runs, with a utility cost of 2.6 percentage points on benign tasks. The policy engine treats tool results and messages as data, not instructions, so it denies actions triggered by injected commands even when the agent reads them. No tool-call-based attack succeeded in any of the 929 attacked runs that required a tool call."
---

# Did the user ask for this? Securing AI agents against intent hijacking with Semantic governance policies

[Google](https://yomu.fyi/company/google) · Ritika Nigam, Deepti Sehrawat, Pranav Bhagwat · Nov 23, 2026

**Type:** Problem & solution

## Summary

AI agents act on user requests but also process untrusted content from tools, creating an attack surface for indirect prompt injection that hijacks user intent. Semantic governance policies intercept each proposed tool call before execution and check it against the user’s original request and natural-language policies. In the AgentDojo benchmark, this user intent matching alone reduced the attack success rate from 48.7% to 0.9% across six runs, with a utility cost of 2.6 percentage points on benign tasks. The policy engine treats tool results and messages as data, not instructions, so it denies actions triggered by injected commands even when the agent reads them. No tool-call-based attack succeeded in any of the 929 attacked runs that required a tool call.

## Context

AI agents read untrusted content from tools such as web pages, documents, messages, and API responses. This content can contain hidden instructions that hijack the agent’s intent, causing it to act on an attacker’s behalf instead of the user’s. The post uses the AgentDojo benchmark (NeurIPS 2024) to measure attack success rate and utility, running a gemini-2.5-flash agent on simulated banking, Slack, travel, and workspace apps.

## Approach / What changed

Semantic governance policies intercept each tool call the agent proposes before it executes. An LLM judge evaluates the call against the user’s original request and natural-language policies, treating the user’s request and system instructions as trusted context and tool results, files, and messages as untrusted data. User intent matching is on by default and checks whether the user asked for the proposed action, without needing to recognize specific attack phrasings.

## Takeaways

- Semantic governance policies reduced attack success rate on AgentDojo from 48.7% to 0.9% using only default user intent matching, without any custom policies.
- The policy engine evaluates actions rather than text, so it does not need to recognize specific attack phrasings; it asks whether the user asked for the proposed action.
- In six runs, none of the 929 attacks that required a tool call succeeded, though text-only response manipulation (e.g., recommending a hotel) is not prevented by this mechanism.

## FAQ

### How does Semantic governance policies distinguish between user intent and injected instructions?

The policy engine treats the user's request and system instructions as trusted context, while tool results, files, and messages are treated as untrusted data, never as instructions. It evaluates each proposed tool call against the user's original request, denying actions that were triggered by content in untrusted context.

### What was the utility cost of using Semantic governance policies on benign tasks?

Utility on benign tasks fell by 2.6 percentage points on average across six runs. Most of the cost came from two Slack tasks where the agent was asked to follow instructions from an external web page that contradicted the agent's configuration, which the policy correctly identified as suspicious.

### Can Semantic governance policies be bypassed by adaptive attacks?

The post notes that AgentDojo's attacks are fixed and not adapted to Semantic governance policies, so these results do not measure adaptive attacks. It cites NIST CAISI evaluations where red-teaming raised attack success rates from 11% to 81%, indicating adaptive attacks can be much stronger.

**Tags:** [AI Agents](https://yomu.fyi/topic/ai-agents), [Prompt Injection](https://yomu.fyi/topic/prompt-injection), [Security](https://yomu.fyi/topic/security)

- Source: [Google](https://developers.googleblog.com/did-the-user-ask-for-this-securing-ai-agents-against-intent-hijacking-with-semantic-governance-policies)
- Source URL: https://developers.googleblog.com/did-the-user-ask-for-this-securing-ai-agents-against-intent-hijacking-with-semantic-governance-policies
- Ingested by Yomu: 2026-11-23T18:01:15.534Z

[Read original post](https://developers.googleblog.com/did-the-user-ask-for-this-securing-ai-agents-against-intent-hijacking-with-semantic-governance-policies)
