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
- Guardrails: Safety filters catching private info (PII), toxic text, or off-topic misuse in real time. Input/output classifiers blocking PII leaks, toxic content, policy violations, and off-topic abuse.
- Untrusted Input Sanitization: Neutralizing hidden prompt-injection attacks buried inside emails, PDFs, or web pages. Defending against indirect prompt injection hidden inside retrieved web pages, emails, or documents.
- Sandboxing: Running agent-generated code or browsers inside locked, disposable containers without network access. Isolating agent-generated code, shell execution, and headless browsers inside ephemeral, network-restricted containers.
- Human-in-the-Loop (HITL): Pausing for a human click before sending money, deleting data, or emailing customers. Pausing execution for explicit user approval before irreversible, financial, or external-facing side effects.
Key Takeaway
Stack four defenses: filter inputs/outputs, neutralize hidden prompts, sandbox code, and pause for humans on irreversible actions.