Skip to main content
ARCHOS 525 BLUEPRINT · /d/dgm_guardrails-pipeline

Guardrails Pipeline (input and output checks around a model call)

13 COMPONENTS · 17 FLOWS · UPDATED 2026-11-21
GITHUB README / PR PREVIEW CARD
[![Guardrails Pipeline (input and output checks around a model call) — ArchOS Architecture](https://archos.sageideas.dev/d/dgm_guardrails-pipeline/opengraph-image)](https://archos.sageideas.dev/d/dgm_guardrails-pipeline)

*Interactive architecture diagram powered by [ArchOS Studio](https://archos.sageideas.dev/d/dgm_guardrails-pipeline)*
NOTION / DOCS / CONFLUENCE EMBED
<iframe src="https://archos.sageideas.dev/embed/dgm_guardrails-pipeline" width="100%" height="580" style="border:1px solid rgba(240,236,225,0.14);border-radius:6px;" loading="lazy" title="Guardrails Pipeline (input and output checks around a model call) — Interactive in ArchOS"></iframe>
PORTABLE MERMAID SPEC (GITHUB / NOTION / RFC)
flowchart LR
  client_0[("Web Client")]
  model_1["Inference server"]
  reviewer_2["Human-in-the-loop approval (HITL)"]
  idp_3[("Identity provider (IdP)")]
  gw_4["API gateway"]
  orch_5[("Agent orchestration runtime")]
  gin_6["Guardrails"]
  gout_7["Guardrails"]
  aigw_8["AI gateway"]
  queue_9[("Message queue")]
  tsdb_10[("Time-series database (TSDB)")]
  alerting_11[("Alerting")]
  capacity_12["Capacity Estimate"]
  client_0 -->|"1. Calls with JWT · HTTPS"| gw_4
  gw_4 -->|"2. Starts request · HTTP/2"| orch_5
  orch_5 -->|"3. Checks input · HTTP/2"| gin_6
  gin_6 -->|"4. Returns verdict · HTTP/2"| orch_5
  orch_5 -->|"5. Asks model · HTTP/2"| aigw_8
  aigw_8 -->|"6. Calls model · HTTPS"| model_1
  model_1 -->|"7. Model reply · HTTPS"| aigw_8
  aigw_8 -->|"8. Returns reply · HTTP/2"| orch_5
  orch_5 -->|"9. Checks output · HTTP/2"| gout_7
  gout_7 -->|"10a. Returns verdict · HTTP/2"| orch_5
  gout_7 -.->|"10b. Holds reply · TCP"| queue_9
  orch_5 -->|"11a. Answer or notice · HTTP/2"| gw_4
  queue_9 -.->|"11b. Pulls item · TCP"| reviewer_2
  gw_4 -->|"12. Relays answer · HTTPS"| client_0
  idp_3 -->|"Publishes keys (JWKS) · HTTPS"| gw_4
  gin_6 -->|"Exports (OTLP) · OTLP"| tsdb_10
  tsdb_10 -->|"Feeds Alerting · HTTP"| alerting_11

COMPONENT STACK (12)

  • Web ClientSTATEFUL
    Sends prompts from an untrusted network
  • Inference serverSTATELESS
    Hosted model API outside our boundary
  • Human-in-the-loop approval (HITL)STATELESS
    A person reviews held replies
  • Identity provider (IdP)STATEFUL
    Issues the JWT; publishes its signing keys
  • API gatewaySTATELESS
    Checks the JWT, then starts the request
  • Agent orchestration runtimeSTATEFUL
    Runs the model call; obeys each guardrail verdict
  • GuardrailsSTATELESS
    Input check on the prompt; fail closed
  • GuardrailsSTATELESS
    Output check on the reply; fail closed
  • AI gatewaySTATELESS
    Holds the model key; limits and retries model calls
  • Message queueSTATEFUL
    Holds flagged replies for a person
  • Time-series database (TSDB)STATEFUL
    Stores block, hold and timeout counts
  • AlertingSTATEFUL
    Pages on-call when checks go silent

REQUEST & DATA FLOW (17)

  1. Web Client → API gateway (Calls with JWT)[HTTPS]
  2. API gateway → Agent orchestration runtime (Starts request)[HTTP/2]
  3. Agent orchestration runtime → Guardrails (Checks input)[HTTP/2]
  4. Guardrails → Agent orchestration runtime (Returns verdict)[HTTP/2]
  5. Agent orchestration runtime → AI gateway (Asks model)[HTTP/2]
  6. AI gateway → Inference server (Calls model)[HTTPS]
  7. Inference server → AI gateway (Model reply)[HTTPS]
  8. AI gateway → Agent orchestration runtime (Returns reply)[HTTP/2]
  9. Agent orchestration runtime → Guardrails (Checks output)[HTTP/2]
  10. Guardrails → Agent orchestration runtime (Returns verdict)[HTTP/2]
  11. Guardrails → Message queue (Holds reply)[TCP]
  12. Agent orchestration runtime → API gateway (Answer or notice)[HTTP/2]
  13. Message queue → Human-in-the-loop approval (HITL) (Pulls item)[TCP]
  14. API gateway → Web Client (Relays answer)[HTTPS]
Configure NGINX / Postgres / K8s →60-Sec L4–L7 Diagnostic →