Cross-phase · Architecture Core

AIB Human-in-the-Loop Approval Inbox

Version: 1.0 | Status: Draft | Date: 2026-06-12 Owner: Chief Architect / CCO | Parent: AI & Model Risk Charter


1. Purpose & P11 — agents propose, humans dispose

This specification defines the Human-in-the-Loop (HITL) Approval Inbox: the mechanism by which every value- or compliance-bearing action proposed by an agent is surfaced to a named human owner, who approves, rejects, or escalates it before any write commits. It is the operational realisation of Architecture Principle P11.

P11 — Agents propose, humans dispose. Autonomous agents emit queries, drafts, and recommendations; they hold no direct write access to operational data. A write commits only after a human owner (or an approval flow) approves. — docs/aib-architecture-principles.md

The inbox is the single chokepoint where this principle becomes enforceable and auditable. It is backed by the agent_proposal table (migration 0004) and rendered as the Approval Inbox view, deep-linked from every originating screen (SCR-*).

Three design commitments:

  1. No agent write credential. Write-blocking is enforced at the data layer, not by agent instruction. An agent physically cannot commit a mutation to operational data.
  2. Commit under human identity. When a proposal is approved, the committing command runs as the human (human:<role>), never the agent. The audit_log row records the human as actor.
  3. Everything is logged. Every proposal, every decision, and every actor is written to the immutable audit_log (P5). A well-governed agent fleet produces more supervisory evidence than a manual team, not less.

Regulatory anchors: FINMA Guidance 08/2024 (AI governance, human oversight), EU AI Act Art. 14 (human oversight of high-risk systems), BankG Art. 35 (dual control for payments), MiFID II Art. 25 (suitability). Requirements: REQ-REG-021, REQ-REG-022, REQ-FUN-008.


2. Data model — agent_proposal

The inbox is a thin read/write layer over agent_proposal (migration 0004). The table is append-only: an agent writes one pending row per proposed action; a human owner disposes by updating the decision columns. No row is ever deleted.

2.1 Column walkthrough

ColumnTypeMeaning
idTEXT PKProposal id, AIB-PROP-{seq}
agent_idTEXTProposing agent, e.g. agent:aib-payments, agent:aib-aml
commandTEXTThe action verb — file_str, release_payment, approve_kyc, draft_suitability_assessment, … (→ each agent card's Tools / commands)
target_tableTEXTThe table the approved command would write
target_idTEXTThe target row (nullable for creates)
payload_jsonTEXTThe proposed write, as JSON — the exact record that would commit
rationaleTEXTThe agent's stated reasoning (shown to the human)
confidenceREALAgent's self-reported confidence, 0..1 (advisory only — never auto-approves)
statusTEXTopen / approved / rejected / escalated / expired (CHECK-constrained)
owner_roleTEXTRole that must dispose; maps to app_user_role.role_code
sla_dueTEXTDeadline by which the proposal must be disposed
created_atTEXTWhen the agent proposed
decided_byTEXTThe human who disposed, human:<role>
decided_atTEXTWhen disposed
decision_noteTEXTHuman's free-text justification (mandatory on reject/escalate)
audit_log_idTEXT FK → audit_logThe committing audit entry, set on approve

Indexes: idx_prop_status (status, owner_role) powers the inbox query; idx_prop_agent (agent_id, created_at) powers per-agent provenance and the agent_eval override-rate computation.

2.2 State machine

Notes:

  • open is the only state an agent can write. All transitions out of open are human (or, for expired, a system sweep) — never the proposing agent.
  • A confidence score never moves the state machine. There is no confidence ≥ X → approved path. High confidence may sort the inbox; it cannot dispose.
  • escalated proposals retain the original agent_id, payload_json, and created_at; only owner_role is re-pointed to the escalation authority.
  • expired is a fail-safe terminal state (P4): an unactioned sensitive proposal lapses rather than auto-committing.

3. Flow — propose → inbox → dispose

The end-to-end loop: an agent computes a proposed action, writes it to agent_proposal as open, the row surfaces as an inbox item to the owner_role, a human approves / rejects / escalates, and on approve the committing command runs under the human's identity, writes the target row, writes an audit_log entry, and the audit_log.id is stamped back onto agent_proposal.audit_log_id.

Key invariant: the commit (the write to target_table) and its audit_log row both carry actor_type='human', actor_id='human:<role>'. The agent's actor_id (agent:aib-*) appears only on the proposal audit entry, never on the commit. This is how the bank answers a supervisor: a human, by name and role, authorised the action.


4. Segregation of duties

The inbox enforces three SoD rules, all checked at the Command API against app_user_role, not by agent instruction:

  1. Proposer ≠ approver. The proposing agent_id can never be decided_by. An agent cannot approve its own proposal (it has no role grant in app_user_role at all).
  2. Role match. decided_by must hold an active app_user_role whose role_code equals the proposal's owner_role. A CFO cannot dispose a payment proposal owned by payments_officer.
  3. Payment dual-auth — two distinct humans. For agent:aib-payments release_payment proposals where bank_transaction.dual_auth_required=1, two separate approvals are required: auth_1_by and auth_2_by must be different human identities, and neither may be the agent. BankG Art. 35; PROC-008.

Role mapping (app_user_role.role_code)

Proposal sourceowner_roleDisposing human role
agent:aib-paymentspayments_officer (×2 for dual-auth)Head of Operations / payments officers
agent:aib-treasuryCRO / COOCRO (risk) · COO (ops)
agent:aib-rm-uhnwCIOCIO + RM
agent:aib-rm-hnwhead_pbHead of Private Banking + RM
agent:aib-researchCIOCIO office
agent:aib-amlCCOCCO / MLRO

Role grants are the single source of truth for human authorisation; they are themselves auditable (granted_by, granted_at, revoked_at, active) and never bypassable by an agent.


5. SLAs & escalation

Each proposal carries an sla_due. The disposal window depends on the action's regulatory clock, per docs/governance/aib-escalation-sop.md:

Proposal typeCommandSLA windowOn breach
AML STR filingfile_strwithin the 5-day statutory deadline; escalate at T-2h past deadlineCCO + FMA, 2h
Payment dual-authrelease_paymentdual auth within 4h (instant: 10s)Head of Operations → COO
Sanctions freezehold_payment / freeze4 hours (high-confidence hit)CCO + FMA
DSR (data subject request)fulfil_dsr30 days (GDPR Art. 12)DPO → CCO
Suitability / mandatepropose_mandatewithin client review windowCIO / Head of PB

If sla_due passes with status='open', a system sweep transitions the proposal to expired (fail-safe, P4) and raises an escalation to the owner_role's superior per the Escalation SOP. An expired proposal never auto-commits; the action must be re-proposed or performed manually.


6. Inbox UX

The Approval Inbox view is grouped by owner_role — each human sees only the proposals their role must dispose. The default sort is by sla_due ascending (most urgent first), with confidence as a secondary signal.

Columns

ColumnSource
Agentagent_proposal.agent_id
Commandagent_proposal.command
Targettarget_table · target_id
Confidenceconfidence (badge; advisory only)
SLAsla_due (countdown; red when < 25% remaining)
Statusstatus

Actions

Per row: Approve · Reject · Escalate.

  • Approve opens a confirmation showing payload_json rendered as a diff against target_id's current state; on confirm, the commit runs under the human identity. Payment dual-auth rows show first/second approver state and require the second, distinct human.
  • Reject and Escalate require a decision_note.
  • Each row deep-links to the originating screen — e.g. an AML STR proposal links to SCR-AML-aml-sanctions, a payment release to SCR-PAY-payments-reconciliation, a mandate to SCR-CLM-client-lifecycle, a treasury position to SCR-TRY-treasury-alm — so the human disposes with full context, not from the payload alone.

7. Audit & provenance

Every step is logged to the immutable audit_log (P5, append-only, no update/delete path):

  • Proposal created — actor_type='agent', actor_id='agent:aib-*', action='propose', entity_type='agent_proposal', entity_id=AIB-PROP-{seq}.
  • Decision — actor_type='human', actor_id='human:<role>', action='approve'|'reject'|'escalate', with before_state/after_state.
  • Commit (on approve) — the write to target_table, actor_type='human', carrying regulatory_event and regulation_refs (e.g. BankG Art.35, MiFID II Art.25) and a retain_until per the retention matrix.

The committing audit_log.id is written back to agent_proposal.audit_log_id, closing the loop: from any proposal you can reach the exact mutation it produced and the human who authorised it, and from any audit entry you can reach the originating proposal and agent rationale. This bidirectional provenance ties the inbox to the aib-agent-interaction-protocol and is the evidence base for the agent_eval override_rate metric (proposals edited or rejected vs. approved as-proposed).


8. Cross-references

agent_proposal · app_user_role · audit_log · agent_eval · agent_change_request (migration 0004) · bank_transaction · sca_event · swift_message_log · suitability_assessment · mandate · str · dsr_request · PROC-008 (payment dual-auth) · PROC-002 (AML investigation) · PROC-009 (settlement reconciliation) · SCR-AML-aml-sanctions · SCR-PAY-payments-reconciliation · SCR-CLM-client-lifecycle · SCR-TRY-treasury-alm · docs/agents/aib-payments.md · docs/agents/aib-treasury.md · docs/agents/aib-rm-uhnw.md · docs/agents/aib-rm-hnw.md · docs/agents/aib-research.md · docs/governance/aib-agent-register.md · docs/governance/aib-ai-model-risk-charter.md · docs/governance/aib-escalation-sop.md · docs/aib-architecture-principles.md (P11, P4, P5) · REQ-REG-021 · REQ-REG-022 · REQ-FUN-008

References

Referenced by