ARCHOS 525 BLUEPRINT · /d/dgm_injection-defense-flow
Prompt injection defense flow (least-privilege tool calls)
13 COMPONENTS · 18 FLOWS · UPDATED 2026-11-21
GITHUB README / PR PREVIEW CARD
[](https://archos.sageideas.dev/d/dgm_injection-defense-flow) *Interactive architecture diagram powered by [ArchOS Studio](https://archos.sageideas.dev/d/dgm_injection-defense-flow)*
NOTION / DOCS / CONFLUENCE EMBED
<iframe src="https://archos.sageideas.dev/embed/dgm_injection-defense-flow" width="100%" height="580" style="border:1px solid rgba(240,236,225,0.14);border-radius:6px;" loading="lazy" title="Prompt injection defense flow (least-privilege tool calls) — Interactive in ArchOS"></iframe>
PORTABLE MERMAID SPEC (GITHUB / NOTION / RFC)
flowchart LR
client_0[("Web Client")]
model_1["Inference server"]
web_2[("Web page source")]
gw_3["API gateway"]
orch_4[("Agent orchestration runtime")]
gin_5["Guardrails"]
pdp_6["Policy decision point (PDP)"]
tools_7["Function calling"]
secrets_8[("Secrets manager")]
audit_9[("Audit log")]
tsdb_10[("Time-series database (TSDB)")]
alerting_11[("Alerting")]
capacity_12["Capacity Estimate"]
client_0 -->|"1. Calls with JWT · HTTPS"| gw_3
gw_3 -->|"2. Forwards (mTLS) · HTTP/2"| orch_4
orch_4 -->|"3. Sends prompt · HTTPS"| model_1
model_1 -->|"4. Proposes tool call · HTTPS"| orch_4
orch_4 -->|"5a. Asks policy (mTLS) · HTTP/2"| pdp_6
orch_4 -->|"5b. Checks call · HTTP/2"| gin_5
pdp_6 -->|"6a. Returns decision · HTTP/2"| orch_4
gin_5 -->|"6b. Returns verdict · HTTP/2"| orch_4
orch_4 -->|"7. Calls tool (mTLS) · HTTP/2"| tools_7
tools_7 -->|"8. Fetches pages · HTTPS"| web_2
web_2 -->|"9. Returns page · HTTPS"| tools_7
tools_7 -->|"10. Returns marked data · HTTP/2"| orch_4
orch_4 -->|"11. Sends answer, unchecked · HTTP/2"| gw_3
gw_3 -->|"12. Relays answer · HTTPS"| client_0
orch_4 -->|"Exports (OTLP) · OTLP"| tsdb_10
tsdb_10 -->|"Feeds Alerting · HTTP"| alerting_11
orch_4 -->|"Writes audit log · HTTP/2"| audit_9
secrets_8 -->|"Supplies tool keys · HTTPS"| tools_7COMPONENT STACK (12)
- Web ClientSTATEFULAsks to read an allowlisted page
- Inference serverSTATELESSHosted model API outside our boundary
- Web page sourceSTATEFULUntrusted pages; may hide instructions
- API gatewaySTATELESSChecks the JWT, then forwards
- Agent orchestration runtimeSTATEFULMarks fetched text as data; obeys each verdict
- GuardrailsSTATELESSScreens the proposed call; fails closed
- Policy decision point (PDP)STATELESSAllows or denies per user and tool
- Function callingSTATELESSRuns allowed tools; SSRF defenses on fetches
- Secrets managerSTATEFULHolds tool keys; the model never sees them
- Audit logSTATEFULRecords each tool decision
- Time-series database (TSDB)STATEFULStores denials, blocks and fetch refusals
- AlertingSTATEFULPages on-call when denials or blocks spike
REQUEST & DATA FLOW (18)
- Web Client → API gateway (Calls with JWT)[HTTPS]
- API gateway → Agent orchestration runtime (Forwards (mTLS))[HTTP/2]
- Agent orchestration runtime → Inference server (Sends prompt)[HTTPS]
- Inference server → Agent orchestration runtime (Proposes tool call)[HTTPS]
- Agent orchestration runtime → Policy decision point (PDP) (Asks policy (mTLS))[HTTP/2]
- Agent orchestration runtime → Guardrails (Checks call)[HTTP/2]
- Policy decision point (PDP) → Agent orchestration runtime (Returns decision)[HTTP/2]
- Guardrails → Agent orchestration runtime (Returns verdict)[HTTP/2]
- Agent orchestration runtime → Function calling (Calls tool (mTLS))[HTTP/2]
- Function calling → Web page source (Fetches pages)[HTTPS]
- Web page source → Function calling (Returns page)[HTTPS]
- Function calling → Agent orchestration runtime (Returns marked data)[HTTP/2]
- Agent orchestration runtime → API gateway (Sends answer, unchecked)[HTTP/2]
- API gateway → Web Client (Relays answer)[HTTPS]