Write a policy in natural language. Cadreen stores it and enforces it across every surface — opencode, SDK scripts, CLI, dashboard, embedded SaaS. No DSL. No config files.
You describe the behavior you want in plain English. Cadreen stores the policy and enforces it on every tool call across your entire workspace.
Flow: natural language → store → enforcement → audit trail
One call. The condition is natural language — Cadreen interprets it and creates a structured policy under the hood.
const policy = await cadreen.policies.create({
name: "Refund Policy",
rules: [
{ condition: "Require manager approval for refunds over $500", effect: "require_human_approval" },
{ condition: "Auto-approve refunds of $100 or less", effect: "auto_approve" },
],
domain: "finance",
});
console.log(policy.id); // "pol_01abc..."
console.log(policy.status); // "draft"
console.log(policy.interpreted); // { requires_human: true, match: {...} }policy = await cadreen.policies.create(
name="Refund Policy",
rules=[
{"condition": "Require manager approval for refunds over $500", "effect": "require_human_approval"},
{"condition": "Auto-approve refunds of $100 or less", "effect": "auto_approve"},
],
)
print(policy.id) # "pol_01abc..."
print(policy.status) # "draft"
print(policy.interpreted) # {"requires_human": true, "match": {...}}The policy appears immediately in the dashboard at /infra/dashboard/policies. Every team member can see what rules are active.
The same policy governs tool calls from opencode, SDK scripts, CLI commands, and embedded SaaS — automatically. No per-surface configuration.
> Deploy the staging app to production
I can't do that right now. Your workspace policy says no production deploys
after 5pm on Fridays. It's currently 6:30pm on Friday.
Say "override" to request an exception (requires approval).try {
const result = await cadreen.intent.invoke({
messages: [{ role: "user", content: "Deploy to production" }],
});
// result.type === "answered" — governance approved
} catch (error) {
if (error instanceof CadreenBlockedError) {
console.log(error.reason_code); // "policy_violation"
console.log(error.policy_id); // "pol_01abc"
}
}Policies can govern any tool call. Cadreen has built-in circuit breakers for sensitive actions:
file_toolFileDelete, FileOverwrite, FileMovepayment_toolPayment, Refund, SubscriptionChangedeploy_toolDeploy, Rollback, Scaleemail_toolSendEmail, SendBulkEmaildatabase_toolDatabaseMutate, DatabaseDelete, DatabaseBackup