Firewalls, Glass Boxes & Human Approval Gates

Production agents operate in a messy world filled with private data and hidden prompt traps. Defense-in-depth combines input/output guardrails, sanitization, isolated sandboxes, and human sign-off.

Never rely on a single polite prompt instruction to protect money or data. Layering automated guardrails, untrusted-data isolation, code sandboxes, and human approval gates prevents one error from becoming an incident.

Mental Model

Bouncers inspect what enters and leaves (Guardrails), untrusted mail is stripped of commands (Sanitization), code runs inside a locked glass box (Sandbox), and big money needs a human signature (HITL).

What Breaks Without This

Hidden white text inside an incoming vendor PDF tricks an agent into silently wiring funds or executing arbitrary shell scripts on your host server.

Key Concepts

Key Takeaway

Stack four defenses: filter inputs/outputs, neutralize hidden prompts, sandbox code, and pause for humans on irreversible actions.

Take the AI & Agent Engineering Knowledge Check