Governance Policies 101
Cadreen evaluates every tool call against governance policies before execution. This guide shows how to create policies, evaluate actions, and understand the approval flow.
How governance works
When the model proposes a tool call, Cadreen evaluates it. You don't need to build this. It happens automatically on every request.
Create a policy
curl -X POST https://accomplishanything.today/api/v1/cadreen/policies \
-H "Authorization: Bearer sk_cadreen_..." \
-H "Content-Type: application/json" \
-d '{
"name": "Refund Policy",
"rules": [
{
"condition": "Require manager approval for refunds over $100",
"effect": "require_human_approval"
},
{
"condition": "Auto-approve refunds of $100 or less",
"effect": "auto_approve"
}
]
}'Policy fields and rule effects
Evaluate a tool call
Test a policy against an action before it happens in production:
curl -X POST https://accomplishanything.today/api/v1/cadreen/policies/evaluate \
-H "Authorization: Bearer sk_cadreen_..." \
-H "Content-Type: application/json" \
-d '{
"action": "process_refund",
"context": {
"amount": 250,
"customer_tier": "enterprise"
}
}'{
"decision_id": "dec_01abc",
"action": "approve",
"policy_triggered": "Refund Policy",
"checks": [
{"rule": "Max auto-approval", "result": "exceeds", "detail": "$250 > $100 threshold"},
{"rule": "Account age", "result": "pass", "detail": "Customer since 2023"}
],
"reason": "Requires manual review due to amount threshold"
}The approval flow
When governance blocks a tool call, you see it in the chat response:
I need your approval before I can process_refund.
Say "yes" to proceed or "no" to skip.You can respond with:
yes / y / confirm / approveConfirm all pendingno / n / skip / cancelCancel all pending1,3 / 1 3Confirm specific items by numberall / everythingConfirm allWhat gets audited
Every governance decision is logged. These appear in intelligence traces and are available for compliance reporting.
How governance works for all tools
Every tool call goes through governance — both Cadreen tools and client tools. The difference is where they execute: Cadreen tools run server-side after approval, client tools are returned to you for local execution. If governance blocks a client tool, it becomes a conversation just like a blocked Cadreen tool.