What is Prompt injection?

Hidden instructions inside text an AI reads, like a support ticket, that trick it into doing something you didn't ask.

Where Prompt injection goes wrong in real apps

Each of these is a short scenario built from a real failure in an app made with AI. Read the answer here, or walk through it yourself in about four minutes.

  • Working with your AI agent · 5 minutes · Pro

    The ticket that gave orders

    Your coding agent is connected to your database so it can triage support tickets. One ticket is not quite a question.

    What is prompt injection in AI coding agents?

    Prompt injection is when text the AI reads, such as a support ticket, email or web page, contains instructions the AI then follows as if they came from you. If the agent can read private data and send messages, it can leak that data. Limit its access with permissions, not prompts.

    Read the fix
Database
Where your app keeps its data, organised in tables, like a set of spreadsheets.
Secret key
A password your app uses to talk to a paid service. Anyone who sees it can use it, and spend your money.
Authorization
Checking what someone is allowed to do once you know who they are. Signed in does not mean allowed.
AI coding agent
An AI tool that doesn't just suggest code but runs commands, edits files and installs things for you.

All 62 terms in the glossary

Before you go

Get the next trail by email

Five short lessons on what breaks in apps built with AI and how to check yours, then one email each time a new trail ships. Unsubscribe in one click.