Layered guardrails & HITL

allowedtripwirepending
InputAgentOutputL1 · InputL2 · HITLL3 · Outputpassrefund($850)
  1. Defense in depth: input, action and output guardrails.
  2. Input tripwire blocks a prompt injection pre-inference.
  3. A high-risk tool call pauses for HITL approval.
  4. Approved; the output guardrail checks PII and releases.
Notes & references

Use when

Untrusted input or irreversible side effects.

Avoid

Approval fatigue, and combining the lethal trifecta in one agent.

if input_check(message).blocked:        # check 1
    return "Sorry, I can't help with that."

for call in agent.run(message):
    if call.tool.is_risky:              # check 2
        if not await ask_human(call):
            continue
    run(call)

return output_check(reply)              # check 3