Coders In Hoods
  • Courses
  • Roles
  • Blog
  • Setup

Coders In Hoods AI Academy

Every course is free. Sign in to start, and your progress, quiz scores and bookmarks follow you.

AI Academy

  • Courses
  • Paths
  • Setup guides
  • How we teach

Role roadmaps

  • AI Engineer
  • Forward Deployed Engineer
  • Machine Learning Engineer
  • All roles

Coders In Hoods

  • The agency
  • Coaching for teams
  • Blog
  • LinkedIn
  • X (Twitter)

Contact

codersinhoods@gmail.com

© Coders In Hoods · since 2019

Course overview

Production Agent Systems

Free · sign in to start and track progress

1 · Architecture

  • 1Multi-agent systems
  • 2Durable, long-running agents
  • 3Security and prompt injection

    Exercise answers

    • Answer: Red-team and harden a pack-reading agent in Claude Code
    • Answer: Fixed recipients and a locked sandbox in eve

2 · Operating agents

  • 4Compliance and auditability
  • 5Observability and cost
  • 6Continuous improvement
CapstoneProduction-readiness review and hardeningReference implementation

Module 1 · Architecture · Lesson 3

Security and prompt injection

Every contract, report and email your agent reads was written by someone else. How indirect prompt injection works, why filters can't be the main defence, and how to design agents so injected text can't trigger anything that matters.

80 min 2 videos 3 exercises 7-question quiz Answers
Setup for the exercises:Install Claude CodeNode.js, pnpm and TypeScriptDurable agents with eveGet an OpenRouter keyLocal models with OllamaDocker and Docker Compose

By the end of this lesson you can

  • Explain indirect prompt injection and why language models can't reliably separate instructions from data
  • Threat-model an agent with the lethal trifecta and identify which leg to remove for each workflow
  • Compute the residual risk of probabilistic defences, and contrast it with architectural guarantees
  • Apply least privilege, sandboxing, approval gates and quarantined extraction in Claude Code, the Agent SDK and eve
  • Keep tenants' and cases' data isolated so one customer's documents can't reach another's

On this page

  • Intuition: the post room, not the partner
  • The mechanism: why injection works
  • The lethal trifecta
  • A worked example: why filters lose
  • Architectural defences
  • Quarantined extraction in TypeScript
  • Least privilege in your harness
  • Claude Code and the Agent SDK
  • eve
  • Data isolation between matters and tenants
  • Misconceptions and limits
  • Connections
  • Summary
  • Sources & further reading
  • Quiz

In this lesson

  1. 01Intuition: the post room, not the partner
  2. 02The mechanism: why injection works
  3. 03A worked example: why filters lose
  4. 04Architectural defences
  5. 05Least privilege in your harness
  6. 06Data isolation between matters and tenants
  7. 07Misconceptions and limits
  8. 08Connections
  9. 09Summary

Sources & further reading

  • Design Patterns for Securing LLM Agents against Prompt InjectionsPaper · Beurer-Kellner, Buesser, Creţu, et al. · 2025The six patterns (action-selector, plan-then-execute, map-reduce, dual LLM, code-then-execute, context minimisation) and the principle that once an agent has read untrusted input it must be impossible for that input to trigger consequential actions. Read sections 3 and 4.
  • Not what you've signed up for: Compromising Real-World LLM-Integrated Applications with Indirect Prompt InjectionPaper · Greshake, Abdelnabi, Mishra, Endres, Holz, Fritz · 2023The paper that named indirect prompt injection. Read the threat taxonomy; every "retrieved document" in it is a contract pack in your world.
  • Defeating Prompt Injections by DesignPaper · Debenedetti, Shumailov, Fan, Hayes, Carlini, et al. · 2025CaMeL separates control flow from data flow and enforces capabilities at tool-call time. It solved 77% of AgentDojo tasks with provable security versus 84% undefended, which is the honest price of a guarantee.
  • LLM01:2025 Prompt InjectionDocs · OWASPDirect versus indirect injection and seven mitigation strategies. Also skim LLM06 Excessive Agency in the same list.
  • Securely deploying AI agentsDocs · AnthropicSecurity boundaries, least privilege, defence in depth, isolation options and the credential proxy pattern for the Agent SDK and Claude Code.
  • eve Security ModelDocs · VercelThe app-runtime versus sandbox trust boundary, credential brokering, channel verification, one principal per turn, and the pre-production checklist.
  • The lethal trifecta for AI agents: private data, untrusted content, and external communicationArticle · Simon Willison · 2025The clearest statement of the threat model used in this lesson, and why "95% of attacks blocked" is a failing grade.
Free · sign in to start

Sign in to keep reading.

Free, no card. We use your account to save progress, quiz scores, bookmarks and occasionally send updates from our team.

  • 9 more sections
  • 3 hands-on exercises
  • A 7-question quiz
  • Progress, quiz scores and bookmarks