Capstone: secure an agent

One agent, four attack surfaces, all from this course: what it keeps in context, what tools it can call, what it retrieves, and what it remembers. Configure a defense for each, then throw every attack at the result at once.

Learn

Every surface needs its own defense

There's no single setting that secures an agent. Context, tools, retrieval and memory each fail in a different way, so each needs a defense aimed at that specific failure — not one generic "be safe" instruction layered on top.

Build

Configure a defense for every surface

Mission A · one correct defense per surface, four surfaces

For each part of the agent, pick the option that actually closes the gap it's vulnerable to.

0 / 4 configured…
Break

Run the whole course's attacks at once

Every one of these attacks you've already beaten on its own, in its own level. The only new question is whether your config handles all four landing on the same agent at the same time.

Mission B · final red team

Run the four attacks below against the configuration from Mission A.

configure Mission A, then run the red team…

What just happened: four attacks you already know by name — indirect injection, tool poisoning, RAG injection, memory poisoning — all failed at once, for four unrelated reasons, each one the specific thing its layer was built to catch.

Defend

Why this works, and the fix

Why it works: every attack in this course exploited the same root cause — a model treating something untrusted (a document, a tool description, an observation, a memory) as if it were a trusted instruction. The fix is never "make the model smarter about trust." It's putting a non-model check in front of every place untrusted text could become an action.

The fix: this is defense in depth — no single layer is enough, because each layer's blind spot is a different layer's job. Context handling, tool allowlisting with human approval for risky actions, content sanitization at retrieval, and gated memory all have to hold at once, because an attacker only needs one of them to fail.