cleandataengineering.aiAgent Harness, drawn simply
You are here: Real flows › 18 · The gateway refusing calls

Agent Harness Tutorial · Real flows

Flow 18: The gateway refusing calls

Route: Gateway only. Groq's free tier allows 8,000 tokens a minute; one loop turn uses 1,500–2,500, so only 3–5 turns a minute.

Open: Entra IDEntraIDOpen: PostgreSQLPostgresstateOpen: DBOSDBOSwaitsOpen: APIM → modelAPIM→ modelOpen: Claims (MCP)ClaimsMCPTHE BOXES IT PASSEDWHAT HAPPENEDA TEST SCRIPT CALLS APIM DIRECTLY WITH THE AGENT'S SUBSCRIPTION KEY, SKIPPING THE HARNESSOpen: BLOCKED · APIM gatewayBLOCKED · APIM gatewayzoom in ›1modelllama-3.3-70b-versatile →allow-list: 403model_not_allowed · 250 msOpen: BLOCKED · APIM gatewayBLOCKED · APIM gatewayzoom in ›2a jailbreak prompt → PromptShields: 403 content_safety(block:prompt-attack) · 366msOpen: APIM gatewayAPIM gatewayzoom in ›3an ordinary call → allow-list,rate limit, Content Safety pass→ Groq → 200 (cut at 30 tokens)
Left: the boxes this message really passed, in order; each opens its design page. Middle: the outside systems each box called, as dots on five lanes (Entra ID, PostgreSQL, DBOS, APIM in front of the model, the claims system over MCP); click a lane head to open it. Right: what happened. Grey boxes are checks, the dark box is the model, a crossed box is where something was blocked.
What it teachesThe gateway enforces its own allow-list and Prompt Shields, whoever calls it. Backend headers leak through (F-125).

Want every detail? The long version is in the Series: this flow with real spans and payloads.