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
[](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_2COMPONENT STACK (13)
- Web ClientSTATEFULRequester on an untrusted network
- Web ClientSTATEFULApprover, a different person
- AlertingSTATEFULOn-call pager outside our boundary
- API gatewaySTATELESSChecks the JWT for both people
- Agent orchestration runtimeSTATEFULRuns the loop; stops at a held action
- Secrets managerSTATEFULHolds the tool keys
- Function callingSTATELESSHolds risky actions; runs approved ones
- Durable workflow engineSTATEFULHolds the action; 15 minute timer
- Notification serviceSTATEFULPushes the request to the approver
- Policy decision point (PDP)STATELESSWho may ask, who may approve
- GuardrailsSTATELESSRates the risk of each action
- Time-series database (TSDB)STATEFULPending count, age, expiries
- PostgreSQLSTATEFULPending action, approval record
REQUEST & DATA FLOW (18)
- Web Client → API gateway (Asks with JWT)[HTTPS]
- API gateway → Agent orchestration runtime (Starts task (mTLS))[HTTP/2]
- Agent orchestration runtime → Function calling (Calls risky tool)[HTTP/2]
- Function calling → Durable workflow engine (Holds the action)[HTTP/2]
- Durable workflow engine → Notification service (Asks for approval)[HTTP/2]
- Notification service → Web Client (Pushes the ask)[HTTPS]
- Web Client → API gateway (Decides with JWT)[HTTPS]
- API gateway → Durable workflow engine (Signals decision)[HTTP/2]
- Durable workflow engine → Function calling (Runs or cancels)[HTTP/2]
- Function calling → Agent orchestration runtime (Returns result)[HTTP/2]
- Agent orchestration runtime → API gateway (Saves result)[HTTP/2]
- Function calling → Policy decision point (PDP) (Asks, fails closed)[HTTP/2]
- Function calling → Guardrails (Rates action risk)[HTTP/2]
- Secrets manager → Function calling (Supplies tool keys)[HTTPS]