Agent Guardrails & Security
Secure agents that act on real systems: limit their authority, contain untrusted content arriving through tools, sandbox execution and enforce guardrails on inputs, actions and outputs.
4 objectives 6 steps about 130 min
Learn it step by step
Read the lessons in order, try the practice checks, then prove the skill with the knowledge check.
This skill page is a public outline. Its lessons and knowledge check appear here as subject-matter experts approve them.
Learning objectives
- Threat-model an agent's tools and data flows, identifying where private data, untrusted content and external actions combine, and vet third-party MCP servers before use.
- Enforce least privilege: scoped credentials per tool, per-user authorization on every call, allowlists, and rate and spend limits.
- Run model-generated code and risky tools in a sandbox with no secrets, restricted network egress and resource limits.
- Implement input, tool-call and output guardrails, and red-team the agent with indirect prompt injection through documents, web pages, tool results and MCP tool descriptions.
Lesson plan
6 steps, about 130 min · 5 of 5 lessons available so far
- How Agents Get Hijacked Concept · 20 min
- Threat-Modeling a Tool-Using Agent Worked example · 20 min
- Lab: Least-Privilege Tools and Per-User Authorization Lab · 25 min
- Sandboxing Code Execution Lab · 25 min
- Guardrails and an Injection Red-Team Suite Lab · 25 min
- Check: Secure This Agent Knowledge check · 8 questions
Practise it
Threat-model your agent, then build a red-team suite of at least 15 indirect injection cases (poisoned documents, web pages, tool outputs and a malicious MCP tool description); report the attack success rate before and after adding least-privilege credentials, a code sandbox, egress allowlisting and tool-call guardrails. Add fixtures for an allowed URL that redirects to a private address, a tool schema changed after approval and a revoked user permission; all must fail before any unauthorized network request or write.
References
Hard prerequisites
Unlocks
Nothing depends on this skill yet.
On these roadmaps
Progress and evidence for this skill are shared across all of them.