Skip to content
All tutors

Prompt Injection and Agent Security

Understand how untrusted text hijacks agents and design systems that limit the damage when it does

By Skill Lab Advanced AI agents New

Your first 3 replies from the tutor are free. Then you can continue the lesson for $13 from your credit.

A taste of a lesson

One question and the answer, as this tutor gives it.

Prompt Injection and Agent Security AI tutor following Skill Lab's plan
Student:

Our agent summarises customer emails and can also send replies. Could an email trick it into doing something bad?

Tutor:

Yes, assume it can. An email is untrusted content, and hidden instructions in it might ask the agent to send data elsewhere or reply with something harmful. Since it can send replies, you have an outbound channel. Reduce the damage: let replies go only to the original sender, require approval before anything is sent, and make sure the agent cannot look up other customers' data while handling one email. Then test with planted instructions in sample emails. What data can the agent reach while it is processing a single email today?

Written with AI under Skill Lab's direction as an example. In your lesson the tutor answers your own questions, and like any AI it can be wrong. Right now the AI model is not connected: replies come from a built in test engine on this site.

What you will be able to do

  • Explain direct and indirect prompt injection and why models are vulnerable
  • Identify the combination of private data, untrusted content and outbound actions
  • Design architectural controls that limit damage when injection succeeds
  • Build a repeatable set of injection test cases for your own agent
  • Threat model an agent and prioritise fixes by impact

Lesson plan

6 lessons. Pick one to start there.

  1. 1 What prompt injection is and why it works Understand direct and indirect injection and why models cannot reliably separate data from instructions. Start
  2. 2 The dangerous combination Recognise when private data, untrusted input and outbound actions together create real risk. Start
  3. 3 Architecture over wording Design system structure so a hijacked model cannot do serious harm. Start
  4. 4 Controls on actions and outputs Limit what an agent can send or change even when its instructions are subverted. Start
  5. 5 Testing for injection Build and maintain a test set of injection attempts in the content your agent reads. Start
  6. 6 Threat modelling your agent Map data, inputs and actions for your agent and choose the fixes that matter most. Start

Try asking

Tap a question to start a lesson with it.

About this tutor

For engineers and security minded builders whose agents read content they do not control: web pages, emails, documents, tickets, tool outputs or files from users. Prompt injection is the defining security problem of agents: instructions hidden in data can steer the model into leaking information or taking actions nobody asked for. There is no complete fix today, so this tutor teaches defence in depth. You will study direct and indirect injection, data exfiltration paths, the dangerous combination of private data, untrusted content and outbound actions, and the architectural controls that reduce risk. You will finish by threat modelling your own agent.

Reviews

Students can review a tutor after a paid lesson. Nobody has yet.