Module 06 · runtime guardrails

The agent asks permission before it acts

Prompt instructions are advice; policy is enforcement. This engine mirrors an OPA bundle with deny-overrides semantics: every matching rule is a denial, and each denial carries a regulatory citation so a compliance officer can trace it.

$ python -m fde_toolkit policy --scenario structuring

Transaction under evaluation

TXN-10021

{
  "tx_id": "TXN-10021",
  "amount": 1800,
  "currency": "USD",
  "actor": {
    "type": "agent",
    "id": "aml-agent-1"
  },
  "customer": {
    "id": "CUST-9921",
    "kyc_status": "verified",
    "pep": false
  },
  "beneficiary": {
    "id": "BEN-3310",
    "country": "DE"
  },
  "approvals": {
    "dual_approved": false
  },
  "history": {
    "similar_last_24h": 0
  }
}

Decision

ALLOW

No rule matched. The agent may proceed and the decision is written to the audit trail anyway — an allow is as auditable as a deny.

Policy bundle

6 rules · deny overrides

  • kyc_must_be_verifiedidleFATF R.10 — customer due diligence

    Counterparty KYC is not verified

  • sanctions_screeningidleOFAC / UN consolidated list

    Beneficiary jurisdiction appears on the sanctions list

  • high_value_needs_dual_approvalidleInternal treasury control TC-114

    Transfers of 10,000 or more require a second human approver

  • pep_high_risk_blockidleFATF R.12 — PEPs

    Politically exposed person above the enhanced-diligence threshold

  • agent_autonomy_capidleRuntime guardrail — agent authority policy

    Autonomous agent action exceeds its delegated spend limit

  • structuring_patternidleBSA — structuring

    Repeated sub-threshold transfers suggest structuring