Skip to main content

Policies

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

Key Concepts

Policy types

Three types of governance rules are available:

Tool permissionAllow or block specific MCP tools or tool categories. Use match_criteria to target by tool name, prefix, or tag.
Spend capSet 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.

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.
warnThe agent receives a warning that the action is outside policy. Useful for low-risk nudges.
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

{ "tool_prefix": "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.