Skip to content
Trust plane

Policy outside agent code

Security and governance are runtime primitives, not bolt-ons. Policy bundles (JsonLogic) are evaluated at the boundary; approval-mode tiers are bound to every capability and decision; OTEL traces and evaluators make every run replayable and scorable.

toolCallissue_refundamount: 750role: support_agentPOLICY ENGINE — outside agent codeR_REFUND_LIMIT_BY_ROLEif role == support_agent && amount > 500then approval_mode = destructiverequires_approval_gate = GATE_FINANCE_APPROVALdecision_binding: support.refund.executeAPPROVAL-MODE TIERSread_onlylocal_writenetworkdelegateddestructiveApproval GateGATE_FINANCE_APPROVALnamed approverfrozen evidence snapshotEvaluatorscompliance · utilitylatency · safetyeconomicsDecisionRecordevidence_refsapprovals · controlstrace_id (OTEL)Replaypinned packpinned snapshotinterceptaudit

Five-tier approval modes

read_only · local_write · network · delegated · destructive — bound to every capability and every decision.

Anti-pattern prevented

Model self-policing: security must not depend on the model. The Policy Engine is the deterministic boundary; the model proposes, the boundary decides.

evaluators

Policy compliance · Utility · Latency · Safety · Economics. Tracked per intent, per tenant, per pack version; deltas gate every release.

Policy bundle (JsonLogic) outside agent code

Policy is authored, signed, and evaluated at the boundary. The Compiler, Critic, and Tool Gateway all consult the Policy Engine at the right runtime checkpoint.

Rule — refunds above INR 3000 require finance approval
{
  "rule_id": "R_HIGH_VALUE_REQUIRES_APPROVAL",
  "applies_to": { "intent": "support.refund" },
  "if": {
    "and": [
      { "==": [{ "var": "user.role" }, "support_agent"] },
      { ">": [{ "var": "request.context.refund_amount" }, 3000] }
    ]
  },
  "then": {
    "allow": true,
    "approval_mode": "destructive",
    "requires_approval_gate": "GATE_FINANCE_APPROVAL",
    "arg_constraints": {
      "refund_amount": { "max": 3000, "unless_approved": true },
      "currency": { "enum": ["INR"] }
    }
  },
  "decision_binding": "support.refund.execute"
}
Analytics consent

We use Google Analytics to understand site usage. You can opt in or decline.