Skip to content
AgenticAIWiki

← Chapter 64. Guardrails in depth

Layered guardrails

tool callUserInput filtersize, PII, injectionModelsystem promptOutput filterschema, PII, groundingReplyPolicy engineidentity, limitsApproval gaterisky actionsrefund tool

Swipe to change step

Step 1 of 8. Guardrails are checks around the model: on input, on the actions it wants to take, and on its output. Cheap checks in code come first; model-based checks go where code cannot decide. User. Input filter (size, PII, injection), highlighted. Model (system prompt). Output filter (schema, PII, grounding), highlighted. Reply. Policy engine (identity, limits), highlighted. Approval gate (risky actions), highlighted. refund tool. arrow from User to Input filter. arrow from Input filter to Model. arrow from Model to Output filter. arrow from Output filter to Reply. arrow from Model to Policy engine, labelled tool call. arrow from Policy engine to Approval gate. arrow from Approval gate to refund tool.

Keys: → or J next, ← or K back, Home and End jump, Space toggles auto-play when the diagram has focus.