An AI agent that can read email, browse the web, and call tools is also an agent that can be talked into doing the wrong thing.
Securing AI Agents is a practical, engineering-focused guide to the security risks that arrive when language models gain tools, memory, and autonomy. It explains how direct and indirect prompt injection work, why no single filter stops them, and how to build layered defenses that limit the damage when one control fails.
Inside, you will learn how to:
- Threat model an LLM application using trust boundaries, data flows, and the OWASP Top 10 for LLM Applications
- Understand direct and indirect prompt injection through web pages, emails, documents, and tool outputs
- Apply least privilege to agent tools, with scoped credentials, sandboxing, and confirmation for irreversible actions
- Prevent data leakage from system prompts, context windows, logs, and retrieval systems
- Secure RAG pipelines with document-level permissions, provenance, and poisoned-content checks
- Protect long-term memory from poisoning with validation, expiry, and user isolation
- Treat model output as untrusted to avoid downstream injection and excessive agency
- Manage multi-agent trust, third-party tool servers, and supply chain risk
- Monitor, red team, and respond to AI security incidents
- Build a security program for AI features aligned with the NIST AI Risk Management Framework
Every chapter includes clear explanations, common misconceptions, key points, and a realistic scenario. The appendices add a pre-launch security checklist, a threat-to-control map, design review exercises, discussion questions, and a glossary.
Written for software engineers, technical leads, and security-minded builders who want AI agents that are useful and safe.