Install
openclaw skills install @carochen112233-commits/regulated-agent-human-gateBuild, review, or test KYA (Know Your Agent) human-gate controls for AI agents that prepare or execute regulated financial actions. Use for payments, withdra...
openclaw skills install @carochen112233-commits/regulated-agent-human-gateTreat the language model as a planner and evidence collector, never as the final authorization boundary. Put deterministic policy evaluation and receipt verification in trusted code outside the model.
templates/action-intent-schema.json.
value_minor, never a floating-point amount.scripts/kya_receipt.py hash.decision and a separate cumulative required_controls list.authorization_status to PENDING_CONTROLS, APPROVED, or DENIED.ALLOW as executable only when every required control is satisfied.templates/gate-decision-schema.json and every required control is satisfied.templates/audit-log-schema.json.Use decision as the current routing state, not as the complete authorization record.
ALLOW: no unsatisfied control remains; standard audit logging still applies.USER_CONFIRMATION: require confirmation of the frozen amount, target, fees, and consequence.STEP_UP_AUTHENTICATION: require an OTP, passkey, or equivalent trusted authentication result.IDENTITY_VERIFICATION: require current identity and, when relevant, authority evidence.HUMAN_APPROVAL: require an independent authorized approver with the complete action summary.COMPLIANCE_REVIEW: hold execution until an authorized compliance process resolves uncertainty.DENY: stop execution. Ordinary approval cannot override a terminal denial.Union controls across matching rules. For example, a USD 8,000 payment to a new beneficiary can require all of user_confirmation, identity_verification, beneficiary_verification, and independent_human_approval, even when the routing decision is HUMAN_APPROVAL.
Implement every tool named in templates/mcp-tool-contract-example.json and preserve this trust sequence:
evaluate_financial_actioncreate_control_challengerecord_control_resultissue_delegation_receiptverify_and_consume_receiptexecute_authorized_actionwrite_audit_eventThe executor must not accept a decision ID, chat confirmation, screenshot, or approval ID as authorization. It must accept only a verified receipt bound to the final action hash.
Set a test-only signing key and run the examples:
$env:KYA_RECEIPT_SECRET = "replace-with-a-test-secret-at-least-32-bytes"
python scripts/kya_receipt.py hash --action examples/supplier-payment-action.json
python scripts/kya_receipt.py issue --action examples/supplier-payment-action.json --decision examples/supplier-payment-decision.json --output receipt.json
python scripts/kya_receipt.py verify --action examples/supplier-payment-action.json --receipt receipt.json --policy-version 2.0.0 --nonce-db receipt-nonces.db
python -m unittest discover -s scripts -p "test_*.py"
Use HMAC only as the self-contained reference implementation. In production, place signing in a managed KMS or HSM, rotate keys by kid, authenticate MCP callers, and combine nonce consumption with an idempotent execution record.
## Action Intent And Hash
## Agent Scope And Trust Boundary
## Risk And Matched Rules
## Cumulative Required Controls
## Control Evidence And Separation Of Duties
## Delegation Receipt And MCP Execution Contract
## Audit And Data-Minimization Plan
## Failure And Safe Fallbacks
## Evaluation Cases And Acceptance Metrics
## Open Assumptions
resources/risk-taxonomy.md for risk factors.resources/human-gate-policy.md for cumulative control and terminal decision rules.resources/identity-verification-routing.md to separate identity, authentication, authority, and approval.resources/audit-evidence-checklist.md for retained evidence.resources/agent-evaluation-guide.md for launch evaluations.resources/regulated-finance-use-cases.md for scenario patterns.templates/policy-template.yaml.Do not claim regulatory certification, legal advice, or production-grade immutability. State which controls are implemented, mocked, provider-backed, or still require legal and compliance approval.