Skip to main content
ARCHOS 525 BLUEPRINT · /d/dgm_agent-human-in-the-loop-approval

Human-in-the-loop approval for agent actions (gate, expiry, record, replay)

14 COMPONENTS · 18 FLOWS · UPDATED 2026-11-21
GITHUB README / PR PREVIEW CARD
[![Human-in-the-loop approval for agent actions (gate, expiry, record, replay) — ArchOS Architecture](https://archos.sageideas.dev/d/dgm_agent-human-in-the-loop-approval/opengraph-image)](https://archos.sageideas.dev/d/dgm_agent-human-in-the-loop-approval)

*Interactive architecture diagram powered by [ArchOS Studio](https://archos.sageideas.dev/d/dgm_agent-human-in-the-loop-approval)*
NOTION / DOCS / CONFLUENCE EMBED
<iframe src="https://archos.sageideas.dev/embed/dgm_agent-human-in-the-loop-approval" width="100%" height="580" style="border:1px solid rgba(240,236,225,0.14);border-radius:6px;" loading="lazy" title="Human-in-the-loop approval for agent actions (gate, expiry, record, replay) — Interactive in ArchOS"></iframe>
PORTABLE MERMAID SPEC (GITHUB / NOTION / RFC)
flowchart LR
  client_0[("Web Client")]
  approver_1[("Web Client")]
  alerting_2[("Alerting")]
  gw_3["API gateway"]
  orch_4[("Agent orchestration runtime")]
  secrets_5[("Secrets manager")]
  toolgw_6["Function calling"]
  wf_7[("Durable workflow engine")]
  notif_8[("Notification service")]
  pdp_9["Policy decision point (PDP)"]
  guard_10["Guardrails"]
  tsdb_11[("Time-series database (TSDB)")]
  pg_12[("PostgreSQL")]
  capacity_13["Capacity Estimate"]
  client_0 -->|"1. Asks with JWT · HTTPS"| gw_3
  gw_3 -->|"2. Starts task (mTLS) · HTTP/2"| orch_4
  orch_4 -->|"3. Calls risky tool · HTTP/2"| toolgw_6
  toolgw_6 -->|"4. Holds the action · HTTP/2"| wf_7
  wf_7 -->|"5. Asks for approval · HTTP/2"| notif_8
  notif_8 -->|"6. Pushes the ask · HTTPS"| approver_1
  approver_1 -->|"7. Decides with JWT · HTTPS"| gw_3
  gw_3 -->|"8. Signals decision · HTTP/2"| wf_7
  wf_7 -->|"9. Runs or cancels · HTTP/2"| toolgw_6
  toolgw_6 -->|"10. Returns result · HTTP/2"| orch_4
  orch_4 -->|"11. Saves result · HTTP/2"| gw_3
  toolgw_6 -->|"Asks, fails closed · HTTP/2"| pdp_9
  toolgw_6 -->|"Rates action risk · HTTP/2"| guard_10
  secrets_5 -->|"Supplies tool keys · HTTPS"| toolgw_6
  wf_7 -->|"Saves pending, record · SQL"| pg_12
  orch_4 -->|"Exports (OTLP) · OTLP"| tsdb_11
  wf_7 -->|"Exports (OTLP) · OTLP"| tsdb_11
  tsdb_11 -->|"Feeds Alerting · HTTP"| alerting_2

COMPONENT STACK (13)

  • Web ClientSTATEFUL
    Requester on an untrusted network
  • Web ClientSTATEFUL
    Approver, a different person
  • AlertingSTATEFUL
    On-call pager outside our boundary
  • API gatewaySTATELESS
    Checks the JWT for both people
  • Agent orchestration runtimeSTATEFUL
    Runs the loop; stops at a held action
  • Secrets managerSTATEFUL
    Holds the tool keys
  • Function callingSTATELESS
    Holds risky actions; runs approved ones
  • Durable workflow engineSTATEFUL
    Holds the action; 15 minute timer
  • Notification serviceSTATEFUL
    Pushes the request to the approver
  • Policy decision point (PDP)STATELESS
    Who may ask, who may approve
  • GuardrailsSTATELESS
    Rates the risk of each action
  • Time-series database (TSDB)STATEFUL
    Pending count, age, expiries
  • PostgreSQLSTATEFUL
    Pending action, approval record

REQUEST & DATA FLOW (18)

  1. Web Client → API gateway (Asks with JWT)[HTTPS]
  2. API gateway → Agent orchestration runtime (Starts task (mTLS))[HTTP/2]
  3. Agent orchestration runtime → Function calling (Calls risky tool)[HTTP/2]
  4. Function calling → Durable workflow engine (Holds the action)[HTTP/2]
  5. Durable workflow engine → Notification service (Asks for approval)[HTTP/2]
  6. Notification service → Web Client (Pushes the ask)[HTTPS]
  7. Web Client → API gateway (Decides with JWT)[HTTPS]
  8. API gateway → Durable workflow engine (Signals decision)[HTTP/2]
  9. Durable workflow engine → Function calling (Runs or cancels)[HTTP/2]
  10. Function calling → Agent orchestration runtime (Returns result)[HTTP/2]
  11. Agent orchestration runtime → API gateway (Saves result)[HTTP/2]
  12. Function calling → Policy decision point (PDP) (Asks, fails closed)[HTTP/2]
  13. Function calling → Guardrails (Rates action risk)[HTTP/2]
  14. Secrets manager → Function calling (Supplies tool keys)[HTTPS]
Configure NGINX / Postgres / K8s →60-Sec L4–L7 Diagnostic →