Part 3: Production

Chapter 17: Security and Guardrails

Agentic systems introduce new security considerations. An agent that can take actions in the world can be manipulated to take the wrong actions.

Threat: Prompt Injection

Malicious users (or malicious content the agent retrieves) attempt to override the agent's instructions.

Mitigations:

Threat: Data Leakage

The agent reveals information it shouldn't — from its knowledge base, other users' conversations, or internal system details.

Mitigations:

Threat: Excessive Agency

The agent takes actions beyond what's appropriate — either through manipulation or misconfiguration.

Mitigations:

Defence in Depth

No single mitigation is sufficient. Layer your defences across:

Security Mindset

Assume that users will try to misuse your agent. Design your guardrails for the adversarial case, not just the happy path.

☰ Contents