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
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 diligenceCounterparty KYC is not verified
sanctions_screeningidleOFAC / UN consolidated listBeneficiary jurisdiction appears on the sanctions list
high_value_needs_dual_approvalidleInternal treasury control TC-114Transfers of 10,000 or more require a second human approver
pep_high_risk_blockidleFATF R.12 — PEPsPolitically exposed person above the enhanced-diligence threshold
agent_autonomy_capidleRuntime guardrail — agent authority policyAutonomous agent action exceeds its delegated spend limit
structuring_patternidleBSA — structuringRepeated sub-threshold transfers suggest structuring