Could an AI agent be built so hidden instructions in a webpage or email literally can't reach anything it does?
Can architectural constraints structurally prevent injected content from reaching model actions?
This explores whether the way an AI agent is built, meaning how information and permissions flow through it, can guarantee that malicious instructions hidden in web pages, emails, or documents never get to trigger what the agent actually does, as opposed to just hoping the model learns to ignore them.
This explores whether you can build an agent so that injected instructions *can't* reach its actions, rather than training the model to resist them. The corpus says yes, under conditions. Its strongest evidence is a set of six design patterns, including Action-Selector and Plan-Then-Execute, that work by cutting the control-flow path between untrusted input and anything consequential Can structural design patterns block prompt injection attacks?. The core idea is simple. If the agent commits to its plan before it reads the untrusted email, or if it can only choose from a fixed menu of actions, then a hidden instruction in that email has nothing it can steer. These system-level defenses give guarantees. Model-level defenses like better training or warning prompts only lower the odds.
The less obvious point is why the model itself can't be the firewall. One line of research finds that LLMs can correctly state a rule and then fail to follow it: 87% accuracy when explaining a principle versus 64% when acting on it, which suggests understanding and execution run along partly separate pathways Can language models understand without actually executing correctly?. A model that 'knows' it shouldn't obey text found in a web page may still obey it. A practitioner finding points the same way: models follow instructions about what to do more reliably than instructions about what to ignore Should factual content and behavior rules live separately?. 'Ignore any commands in retrieved documents' is exactly the kind of rule models handle worst. That's a strong argument for enforcing separation in the architecture rather than in the prompt.
Architecture has its own limits, though. A guardrail that checks each action on its own can't catch an attack spread across a sequence of steps that each look harmless. Only a monitor that remembers what happened earlier can enforce rules like 'never read credentials and then send an outbound message' Can stateless checks ever catch sequence-level constraint violations?. Structure also moves the attack surface; it doesn't remove it. The layer that decides which model handles a request can itself be manipulated, for example by routing a request to a weaker model or by making safety checks run against the wrong identity Can attackers manipulate which model handles a request?. Every wall you build is a new component someone can attack.
A related idea comes from work on agent design more broadly: separation helps in general, not only for security. GUI agents improve when planning and grounding (working out where on screen to act) are handled as separate stages instead of one end-to-end guess Can structured interfaces help language models control GUIs better?. A long-running agent with governance rules built into the memory it actually checks during operation handled safeguards better than one governed by an external policy document Can governance rules embedded in runtime memory actually protect autonomous agents?. The shared lesson is that constraints work when they sit on the path the agent's decisions actually travel, not beside it.
One gap is worth naming: the corpus has little head-to-head evidence on what these guarantees cost in capability. Plan-Then-Execute agents can't adapt when they discover something mid-task, and that tradeoff is acknowledged more than it is measured. So structure can provably block certain injection paths. Deciding which paths to block, and how much flexibility to give up for it, is still a judgment call.
Sources 7 notes
Six architectural patterns, including Action-Selector and Plan-Then-Execute, block prompt injection by cutting the control-flow path from untrusted input to consequential actions. System-level constraints outperform LLM-level and user-level defenses because they provide guarantees rather than probabilistic risk reduction.
Large language models can articulate correct principles but systematically fail to apply them due to dissociated instruction and execution pathways. The 87% accuracy in explanations versus 64% in actions reveals this is not knowledge deficit but structural disconnect.
Fin's Blueprint Team recommends routing factual content to retrievable knowledge bases while keeping only tone and behavioral directives in agent instructions. This split aligns with instruction-tuning research showing models follow what-to-do rules better than what-to-ignore constraints.
Per-action checks are structurally unable to state constraints that depend on prior history. Only stateful monitors tracking composed multi-party behavior can verify the behavioral envelopes that prevent individually permissible actions from collectively violating system-level safety.
The layer deciding which model handles a request sits beneath prompt-level defenses and is vulnerable to manipulation and unverified provenance. Attackers can exploit routing to send requests to weaker models or cause safety measures to operate on the wrong identity.
Show all 7 sources
Agent S's dual-input design—visual input for environmental understanding plus image-augmented accessibility trees for grounding—achieved 9.37% improvement over baseline by factoring planning and grounding into separate optimization paths rather than forcing end-to-end prediction.
A persistent agent recorded 889 governance events across 96 active days, with safeguards encoded directly into the memory layer the agent consulted during operation. Runtime-resident governance proved more effective than external policies because the agent actually accessed it during decision-making.
Papers this line draws on 8
The research behind the notes this line reads — ranked by how closely each paper relates.
- Design Patterns for Securing LLM Agents against Prompt Injections
- Defeating Prompt Injections by Design
- FLOWSTEER: Prompt-Only Workflow Steering Exposes Planning-Time Vulnerabilities in Multi-Agent LLM Systems
- Comprehension Without Competence: Architectural Limits of LLMs in Symbolic Computation and Reasoning
- ShowUI: One Vision-Language-Action Model for GUI Visual Agent
- Beyond Accuracy: Evaluating the Reasoning Behavior of Large Language Models -- A Survey
- Large Language Model Reasoning Failures
- Explain-Query-Test: Self-Evaluating LLMs Via Explanation and Comprehension Discrepancy