System prompt
Describes the rule. Can't independently stop execution if the model emits the prohibited call anyway.
A primer on Microsoft Foundry agent controls, in public preview
Let agents decide how to do the work. Let policy decide which actions they may take.
Agent controls is a managed policy service. Your agent host pauses at key moments, asks the service "may I?", and enforces the answer: allow, deny, or transform.
Built on the open-source Agent Control Spec (ACS) and Agent Hooks. Policies are a manifest plus Rego. Updated November 2026.
1The problem
A support agent can look up customers, process refunds and update accounts. It's told "no refunds over $100." A persuasive customer asks for $500. What actually stops the tool call?
Describes the rule. Can't independently stop execution if the model emits the prohibited call anyway.
Knows if text is harmful or sensitive. Doesn't know your financial limits, so a polite $500 refund passes.
Safe, but slow. It removes the efficiency and autonomy you deployed the agent for.
An explicit, executable rule checked at the moment of action, outside the model. The agent stays free inside the boundary.
2The stack
Microsoft splits runtime governance into separate layers so it works across frameworks, models and clouds. The agent doesn't need to run in Foundry.
3Intervention points
Agent Hooks spans the full lifecycle. A policy manifest maps rules to the points your app actually calls. Pre-call points decide whether something may proceed; post-call points govern how a result may be used.
4Runtime flow
5Anatomy of a policy
A policy has two parts. The manifest (JSON, often authored in YAML) binds an intervention point to a Rego query, selects the target, declares tools and annotators. One or more Rego modules are uploaded as separate resources and hold the decision logic.
agent_control_specification_version: "0.4.0-alpha.1"
metadata:
name: refund-guard
policies:
refund-guard:
type: rego
query: data.refund_guard.verdict
intervention_points:
pre_tool_call:
policy_target: "$snap.tool_call.args"
policy_target_kind: tool_args
tool_name_from: "$snap.tool_call.name"
policy: { id: refund-guard }
tools:
refund_order:
type: write
security_labels: [financial_write]
package refund_guard
import rego.v1
default verdict := {
"decision": "deny",
"reason": "refund_not_permitted" }
verdict := {"decision": "allow"} if {
input.intervention_point == "pre_tool_call"
input.snapshot.tool_call.name == "refund_order"
amount := input.policy_target.value.amount
is_number(amount)
amount > 0
amount <= 100
}
raiPolicies/refund-guard-v1, raiRegos/refund-guard-v1), the manifest's logical policy ID (refund-guard), and the Rego query (data.refund_guard.verdict).6Try it
This mimics the documented refund policy locally in your browser, so you can see how the default-deny Rego behaves. It doesn't call Azure.
7Verdicts
Run the action or release the content exactly as evaluated.
Block the action or withhold the content. May carry an approval request for your own review workflow; it stays blocked until that workflow approves.
The service already applied the change (e.g. redacting a field). Validate and use the returned content; don't apply it again. Not supported on the LLM-judge path.
// HTTP 200 means evaluation completed, not that the action is allowed
{
"verdict": "blocked",
"reason": "refund_not_permitted",
"acsVerdict": { "decision": "deny", "reason": "refund_not_permitted",
"message": "...", "warnings": [], "approval": null }
}
verdict (allowed / blocked) and acsVerdict.decision. Warnings add information without changing the decision.8Annotators in practice
Exact conditions: thresholds, approved-tool lists, argument shapes.
Jailbreak, indirect prompt injection, harms (severity 0–7), protected material, task adherence, groundedness, PII where enabled.
Business rubrics, e.g. "is this reply a definite refund promise?" Returns informational / commitment / uncertain plus a score.
A third Rego module requires both the classifier policy and judge policy to allow before output is released.
LLM judges run on your Azure OpenAI deployment. The serving Content Safety account's managed identity needs Cognitive Services OpenAI User on the model account. Judge timeouts, refusals or malformed output keep the action blocked.
9Choosing a mode
| Capability | Open-source, in-process ACS | Hosted agent controls |
|---|---|---|
| Policy language | ACS manifest + Rego | ACS manifest + Rego |
| Where evaluation runs | Open-source SDK in your app | Microsoft-managed service |
| Publishing and updates | Your files or custom infra | Shared ARM policy + Rego resources |
| Observations | Annotators you configure | Content Safety classifiers + enabled LLM judges |
| Reuse across apps | Custom distribution | Reference central policies by ID |
| Interception and enforcement | Agent host | Agent host |
They're complementary: use open-source for local development and app integration, and the hosted service for shared enterprise policies across hundreds of agents and teams.
10APIs and setup
An Azure AI Content Safety resource in a region enabled for the preview. Creating the resource alone doesn't enable agent controls.
content ≈ 10,000 chars. Manifest up to 256 KiB, Rego 512 KiB, ARM body 1 MiB. Some deployments enforce 48 KiB / 200 KiB.
Publish a new named version (refund-guard-v2), test, then switch the app's policyId. In-place updates need If-Match ETags.
You pay only for Content Safety classifier usage and LLM-judge model usage triggered by evaluation.
11The enforcement boundary
It doesn't run your agent, execute tools, or control any path that bypasses your interception code.
Agent IDs, session IDs and identity claims in the request don't grant access. Keep permissions and business data in trusted systems.
Binding a point in a manifest doesn't add interception to your app. Unchecked points are unprotected.
12Next steps
deny + approval into your existing review process before relying on it.Sources. Agent controls is a preview service; versions and limits may change.