Defense-in-depth is a security design principle that avoids relying on any single safeguard and instead layers multiple independent controls, so that if one layer fails another can still stop the attack or limit the damage. The concept originates in military strategy; in information security it takes the form of combining network firewalls, access control, encryption, monitoring, and similar measures.
The principle is especially emphasized in AI agent security, where no single technique fully prevents prompt injection. Stacking a proxy that inspects tool calls, container isolation, network allowlists, and least-privilege permissions is a typical example of defense-in-depth.