Design Patterns for Securing LLM Agents against Prompt Injections
AI-generated summary of reporting by Simon Willison’s Weblog. Read the original for the full story.
Why it matters
Builders of LLM agents finally have a practical menu of six architecture patterns from IBM, Google and Microsoft researchers that provably limit what prompt injections can do, accepting reduced capability as the price.
A new research paper, written by experts from IBM, Google, Microsoft and universities, tackles a problem called prompt injection, when hidden text in emails or web pages tricks an AI assistant into doing something harmful. The authors say no AI can be made fully safe from this, so they propose six design patterns that limit what an AI agent is allowed to do. Anyone building or deploying AI assistants is affected, and the paper includes ten real-world case studies.
A paper from IBM, Google, Microsoft, Invariant Labs and ETH Zurich argues general-purpose AI agents cannot be made reliably safe against prompt injection attacks, so teams must accept constrained designs. It offers six patterns, including Action-Selector, Dual LLM and Plan-Then-Execute, trading agent flexibility for security. Ten case studies (SQL agent, email assistant, resume screening) show practical application. If you are deploying agents handling untrusted data, this reframes your architecture choices now, not later.
The paper proposes six patterns: Action-Selector (LLM-modulated switch statement, no tool output feedback), Plan-Then-Execute (tool calls fixed before untrusted input exposure), LLM Map-Reduce (sub-agents return booleans), Dual LLM (quarantined LLM returns symbolic variables like $VAR1 to a privileged coordinator), Code-Then-Execute (CaMeL's sandboxed DSL with taint-tracking data flow analysis), and Context-Minimization. Ten case studies with threat models include a three-page SQL agent analysis; the software engineering agent quarantines untrusted API docs into strict formats (e.g. 30-character method names).
Read the original
This summary exists to save you time, not to replace the source.
Key terms
CaMeL paper Design Patterns for Securing LLM Agents against Prompt Injections SQL Agent Software Engineering Agent
Was this summary useful?
One click, anonymous. It tells us which summaries to re-run.
Related reading
Speculative Decoding Makes Tool Calls Faster. Agents Need a Cache.
Speed improvements in speculative decoding mean agents can execute tool calls faster, reducing latency for real-time applications.
Let Claude Code or any agent tap, type, and read your real phone
Agents can now close the mobile testing gap by driving and reading a real phone themselves, with nothing installed on the device.
System-wide ad-blocking that catches trackers browser extensions can't
Desktop apps and OS components can now be ad-blocked system-wide, not just browser traffic, closing a privacy gap browser extensions cannot reach.
n8n's open source personal agent runs on your machine and asks before it acts
Developers uneasy about cloud-based AI agents get a local, approval-gated alternative they can download today, though its research-preview status limits real reliance.
A flight recorder for AI agents that even auditors can verify offline
Teams running AI agents on production systems get tamper-evident, auditor-verifiable records of every tool call instead of logs the agent could rewrite.