Topic 4 of 5 · 4 min read
Breaking the trifecta by removing one leg
Goal: Redesign an agent configuration so no session combines all three legs, and justify which leg was removed.
The only dependable defence is structural: change the design so that no single session holds all three legs. You pick which leg is cheapest to give up, and you enforce it in code, not in the prompt.
Check yourself · 1 of 3
Which change removes the outbound-channel leg for an assistant that auto-renders images?
Why it matters
Filters and "ignore injected instructions" rules reduce attacks but do not stop them. OWASP lists prompt injection as the top risk for LLM applications and says no foolproof prevention is known. A control that holds even when the model is fooled is worth more than one that holds only when the model behaves.
Three ways to remove a leg
- Remove the outbound channel. Allow images only from your own domain. Disable link previews. Allow fetches only to a fixed list of hosts, and make sure none lets outsiders host content. Make send and post tools produce a draft that a person approves. Run the agent without network access.
- Remove untrusted content from the session. Handle outside text in a separate session that has no private data and no outbound tools. It returns a short, fixed-format result, such as a label or a list of fields, that the main session treats as data. The research design CaMeL goes further by tracking which values came from untrusted text.
- Remove private data from the session. Give the agent only the data it needs for this task, scoped to one repository or one mailbox folder, with a narrow token.
Dropping a leg at run time
You can also change the session as it goes. Once the agent has loaded private data, switch off its outbound tools. Once it has read untrusted content, require approval before any send action.
Before and after
Before: One assistant reads the inbox, opens links and sends email.
After: A reader session opens links and summarises them into a three-field record, with no mail access. The mail session reads the inbox and drafts replies using only that record. Sending needs a person's click. Untrusted text and private data never meet in one session, and the send step has a human.
What goes wrong
- Teams put the rule in the prompt, so it fails when the model is fooled.
- Teams pass the untrusted session's free text straight into the private session, which carries the injection across.
- Teams rely on one approval click that shows too little, so people approve without reading.
- Teams filter outputs for secrets, but an attacker asks for the data in a changed form.
Examples
Splitting a reader from an actor
Reader session: opens customer links, no private data, no send tools; returns {category, urgency, one-line-summary}. Actor session: private order data and reply drafting; reads only the fixed record. The leg removed in each: private data in the reader, untrusted content in the actor.
Run-time lockdown
A coding agent starts with network access to install packages. When it opens the file holding deployment keys, the harness turns the network off for the rest of the session. The outbound leg is removed once private data is present.
Key points
- The dependable defence is a design where no session holds all three legs.
- Enforce the removed leg in code or configuration, not in the prompt.
- Separating sessions works only if the result passed between them is constrained data, not free text.
- Allow-lists must name hosts you control, since outsider-hosted content on an allowed site still leaks.
- Human approval helps only if the person sees exactly what will be sent.
Common mistakes
- Writing the rule into the system prompt only.
- Passing free text from the untrusted session to the private one.
- Approval prompts that hide the real destination or content.
- Allow-listing a domain that outsiders can post to.
Check yourself · 2 of 3
A reader session summarises outside web pages and passes the result to a session holding private data. What should the reader pass?
Check yourself · 3 of 3
An agent has read the file holding deployment keys. Which run-time action best breaks the trifecta from here?
Practice items, not counted towards your mastery.
Start here
- The lethal trifecta for AI agents (Simon Willison) (opens in a new tab)ArticleFree
The post that named the trifecta, with real incidents and the plain rule that follows.
- Meta: Agents Rule of Two, a practical approach to AI agent security (opens in a new tab)ArticleFree
Meta's rule of allowing at most two of three risky properties per session without a human check.
- LLM01: Prompt Injection (OWASP) (opens in a new tab)StandardFree
The standard description of prompt injection, with attack types and mitigations.
More for this topic
- Defeating Prompt Injections by Design (CaMeL, arXiv) (opens in a new tab)PaperFree
A research design that separates trusted and untrusted data flow instead of trusting the model.