Skip to main content

Policies

Policies are governance rules that control what your AI agents can do — which models and tools they can use, how much they can spend, how fast they can call, and how sensitive data is handled. Each policy defines match criteria and an enforcement action.

Key Concepts

Policy types

Six policy types are available:

model_accessMatch by model name (glob patterns) or provider. Use it to allow or block specific models for the matched agents.
tool_permissionAllow or block specific MCP tools. Use match_criteria to target by server, tool name (glob patterns), or trust tier.
spend_limitSet a maximum spend limit per agent, user, or organization over a rolling window (hourly, daily, monthly).
data_handlingControl how sensitive data is treated — redact PII in outputs, block tool responses containing secrets, or require scanning before forwarding.
content_safetyContent-safety rules evaluated during content scanning; the policy's match criteria are applied to the scanned traffic.
rate_limitCap request rate. Use match_criteria to scope the limit to specific MCP servers.

Enforcement modes

Each policy has an enforcement mode that controls what happens when the rule matches:

log_onlyThe event is recorded in the audit log but the agent is not interrupted. Good for building visibility before enforcing.
require_approvalThe matching call is refused and surfaced for review instead of executing; the agent gets an error saying the tool requires human approval, but its session is not killed.
blockThe action is hard-blocked and the agent receives an error. Use for compliance-critical rules.

Match criteria

The Match Criteria field accepts a JSON object that scopes which agents, users, tools, or data labels the policy applies to. An empty object {} matches everything.

Examples

{ "agent_id": "<uuid>" } — scope to one agent

{ "org_id": "<uuid>" } — scope to entire org

{ "tools": ["github__*"] } — match all GitHub tools

{ "scan_tool_responses": true } — enable tool response scanning

Priority

Lower numbers win. A policy with priority 10 overrides one with priority 100. The platform default policies (like the Default Tool Response Scanning rule) use priority 1000 so any user-created policy automatically takes precedence.

Tip
Start with log_only enforcement to understand impact before switching to block. You can always change enforcement mode on an existing policy without recreating it.
Note
Policies apply to all agents in your account by default. Use match_criteria to narrow scope to specific agents, orgs, or tool categories.