acceptodds
Under review as a conference paper at ICLR 2027

GraDual: A Stateful Dual-Agent Architecture against Indirect Prompt Injection

Abstract

As agentic systems become more capable of handling complex, long-horizon tasks and gain broader privileges in open environments, indirect prompt injection (IPI) becomes a salient risk: tool use provides a channel through which adversarial content enters the model’s context and induces unintended actions. Most existing IPI defenses rely on probabilistic detectors or system-level designs. Probabilistic ones fail under repeated attempts or are bypassed by adversarial attacks, whereas system-level ones are deterministic, but incur substantial cost in utility and require hand-crafted or static policies. We present GraDual, a dynamic Graph-driven Dual-agent framework; the main-dual-agent design isolates the trusted context from the threat of untrusted content, while both agents are capable of reasoning and acting under constraints; with main agent driven by a dynamic graph state, the system can also preserve high utility. Two agents collaborate closely under the framework but comply with an explicit interaction boundary. Generally, GraDual creates an information asymmetry to enable a successful task outsourcing while providing a dynamic defending guardrail to the trusted context. Specifically, in each outsourcing, main agent orchestrates two major components: outsourced task with resources, and a precommitment kept to itself. The first initiates dual with proper capabilities and constraints, and leverages dual's own task-solving ability. The second encodes the asymmetry as main's advantage, by enforcing return-path checks with code on the dual's untrusted data flow. Such design relies neither on direct probabilistic judgment, nor on system design with non-semantic use of data taint tracking or static policies. It fully leverages the agent's autonomy and intelligence to accomplish tasks securely. In evaluations across diverse tasks and IPI attacks, GraDual consistently achieves a 0% attack success rate while maintaining task utility competitive with baseline defenses. The ablation shows effectiveness of our dual-agent framework design as well as the importance of dynamically growing graph state.

Primary area:
alignment, fairness, safety, privacy, and societal considerations
Keywords:
LLM agent security, indirect prompt injection, multi-agent systems

Reviews

Among:
Shape:
1234this paper, Bottom 9%
Figure 1. Mean review rating of the reviewed papers at ICLR 2027. This paper averages 1.50 over 4 reviews, above 9% of the others.
Reviewer_jpsCOpenReview ↗
Rating
2
Confidence
3
Informativeness
2
Presentation
2
Soundness
2
Read review
Paper summary

GraDual proposes a stateful dual-agent architecture for defending against indirect prompt injection. A Main Agent handles trusted planning and privileged actions, while a Dual Agent processes untrusted external content under restricted permissions. Before each delegation, the Main Agent generates a private precommitment, and the Dual Agent’s returned results must pass a code-based admission mechanism. A dynamic graph allows the execution plan to expand based on validated information. Experiments on AgentLAB show that GraDual achieves an observed 0% ASR across the reported settings while maintaining competitive task utility.

Critical strengths
  1. GraDual demonstrates a strong security–utility trade-off in the reported experiments, achieving an observed 0% ASR while maintaining task utility comparable to or higher than that of the undefended system.
  2. The ablations clearly distinguish the roles of the two main components: code-enforced precommitment primarily provides security, while dynamic graph growth helps preserve task utility.
  3. The authors compare multiple prompt-level and system-level defenses within a unified harness, use identical attack payloads across defenses, and repeat each setting six times, providing reasonably controlled comparisons.
Critical weaknesses
  1. Limited novelty. GraDual mainly combines existing ideas—dual-agent isolation, deterministic enforcement, and graph-based planning. Its technical contribution beyond integrating private precommitment and dynamic graph growth is unclear.
  2. Outdated and selectively chosen backbones. The evaluation uses GPT-4o and Qwen3-30B, selected partly to avoid very low baseline ASR. It is unclear whether the results generalize to current frontier models, especially since the attack payloads are replayed from GPT-4o trajectories.
  3. Missing efficiency evaluation. GraDual requires two stateful agents and additional delegation and verification steps, but the paper reports no token, latency, or monetary costs. Its utility advantage may therefore partly result from a larger inference budget.
Questions for authors
  1. Does GraDual maintain its security–utility advantage on more recent frontier models and with attacks not derived from GPT-4o trajectories?
  2. What are GraDual’s token, latency, and monetary overheads relative to the baselines, and do its utility gains remain under a matched inference budget?
3 comments

We thank the reviewer for the careful reading and for recognizing the security–utility trade-off improvement. Below, we respond to the weaknesses, merging each question to weakness it follows from.

Response to Weaknesses -- W1

We would like to clarify that GraDual is not merely a combination of existing methods; it departs from prior patterns as a new agentic system designed to defend against IPI attacks. In IFC-based dual-LLM defenses such as CaMeL, FIDES, and PRUDENTIA, the quarantined LLM is a stateless, tool-less parser, and security relies on taint propagation checked against predefined policies. Achieving zero attacks with these approaches comes at the cost of hand-written policies for each tool and suite, as well as significant utility degradation. PRUDENTIA (ICLR'26, consecutive work on FIDES) also introduces multiple rounds of human approvals to recover some of the utility lost under FIDES's enforcement.

GraDual does not rely any form of taint propagation or IFC, nor on the DAG representation itself. Its core contribution is to provide two coupled but isolated, stateful agent loops in the IPI risks. Both agents have their own tools, while the dual agent is assumed to be fully compromised. At runtime, the main agent instantiates a contract (namely precommitment) from the current step's context, keeps the admission condition hidden from the dual, and admits only outputs that pass deterministic code checks. Security is therefore enforced by the interaction protocol instead of hand-written policies or human approval, while the agents' planning and reasoning capabilities support task utility. The DAG we exploited is a straightforward implementation for maintaining and updating runtime state, not a core novelty contribution.

W2 / Q1 — Frontier backbones and adaptive attacks generated online

Does GraDual maintain its security–utility advantage on more recent frontier models and with attacks not derived from GPT-4o trajectories?

We address this weakness and question in two-fold. First, instead of replaying payloads derived from GPT-4o trajectories, we generate attacks online with a frontier attacker model that adapts its payload to each defended agent, while keeping the paper's gpt-4o as backbone, which makes the adversary strictly stronger than the defending agent. Second, we run GraDual and all baselines on five recent frontier backbones to show that its utility carries over to stronger models.

(1) Online adaptive attack by a stronger model. The payloads are no longer fixed in advance. They are generated online, during the evaluation of each defense, by a frontier attacker model (gpt-5.1) that is stronger than the gpt-4o agent backbone under attack. Following AgentLAB's search procedure, the attacker writes a long-horizon injection, runs it against the defended agent, observes how that agent actually behaved, and rewrites the payload from this trajectory, up to three times per cell. Each defense therefore faces payloads optimized against itself, and none is derived from the trajectories of the undefended GPT-4o agent. We run this on the 144 cells of the Banking suite, which is most susceptible to attacks. (A cell counts as breached if any round succeeds)

SystemReported Replay ASR (Table 1, Banking)New Adaptive ASR ↓Utility under adaptive attack ↑
Undefended51.480.6 (116/144)80.6
Tool filter3.44.9 (7/144)63.9
Repeat user25.456.2 (81/144)81.9
Spotlighting44.368.1 (98/144)75.0
IPIGuard4.99.7 (14/144)67.4
DRIFT4.730.6 (44/144)58.3
CaMeL0.00.0 (0/144)35.4
GraDual (ours)0.00.0 (0/144)62.5

Adapting to each defense makes the attack much stronger than the replay: it breaches 80.6% of undefended cells instead of 51.4% reported in paper, and every probabilistic defense loses ground, for example DRIFT from 4.7% to 30.6%. Only CaMeL with its security policies and GraDual are never breached, and GraDual keeps far more utility under attack (62.5% vs. 35.4%). GraDual's improved utility-security frontier thus holds against an adversary that is both stronger than the agent and adaptive to GraDual itself. We are running a full version of such evaluation for an addtional subsection on adaptive attack in the revised paper.

(2) Frontier backbones. We ran all defenses on five recent backbones from four vendors. On these safety-aligned frontier models, undefended ASR is already extremely low, so ASR cannot show the gain a defense brings (see the reason we chose gpt-4o and Qwen3 in Appendix B). We therefore compare benign utility over the 97 user tasks, where the cost of a defense shows.

Systemgpt-5.1gpt-5.5claude-sonnet-4.6gemini-3-prodeepseek-v4-pro
Undefended79.488.784.594.894.8
Tool filter50.54.1†6.2†4.1†4.1†
Repeat user78.489.783.595.990.7
Spotlighting78.486.690.793.893.8
IPIGuard69.177.3N/A‡N/A‡N/A‡
DRIFT42.353.632.022.778.4
CaMeL42.355.753.654.650.5
GraDual (ours)66.081.472.277.380.4

† The model names no tool in Tool filter's selection step, so every tool is stripped (the same as with Qwen3 in Appendix B). ‡ IPIGuard's public implementation supports only GPT, Qwen and Llama backbones.

GraDual's utility rises with the backbone, from 63.5% on gpt-4o (same 97 tasks) to 66–81%, so its security mechanism does not cap it at the level of the older model. At the same security level it exceeds CaMeL with policies by 17–30 points on every backbone, and it is above DRIFT on all five. Prompt-level defenses stay close to undefended utility, but they enforce nothing: under the adaptive attack above they are breached in 56–68% of cells.

W3 / Q2 — Overhead and matched inference budget

What are GraDual's token, latency, and monetary overheads relative to the baselines, and do its utility gains remain under a matched inference budget?

We measured per-task token usage and wall-clock time against the system-level baselines from Table 1. GraDual uses 3.0× the tokens and 2.6× the time of the undefended agent, comparable to CaMeL (3.3× / 2.3×), DRIFT (2.3× / 2.7×) and IPIGuard (2.8× / 1.8×). Running two agents does not double the cost, because the dual agent is invoked only for steps that read environmental content, and the precommitment and admission checks are deterministic code taking under 1% of the time breakdown. The utility advantage is not bought with a much larger budget. The setting is AgentLAB long-horizon, gpt-4o, on a 40-cell subset per suite. We are running a full version of the table and going to add it in the revised manuscript.

SystemLLM callsTokensTime (s)× Undefended (tokens / time)Cost (USD)Utility ↑ASR ↓
Undefended4.610.5k14.31.0× / 1.0×0.02867.937.1
IPIGuard7.729.1k25.92.8× / 1.8×0.07964.13.7
DRIFT13.424.2k38.82.3× / 2.7×0.07152.85.2
CaMeL8.134.2k33.23.3× / 2.3×0.09856.90.1
GraDual (ours)12.331.3k36.43.0× / 2.6×0.09470.90.0

We hope these clarifications and additional results address the reviewer's concerns. We respectfully ask the reviewer to reconsider the assessment and score. We welcome any further questions!

Reviewer_hbbYOpenReview ↗
Rating
2
Confidence
3
Informativeness
2
Presentation
3
Soundness
2
Read review
Paper summary

This paper presents GraDual: A Stateful Dual-Agent Defense Against Indirect Prompt Injection, a framework that attempts to address prompt injection attacks through architectural isolation rather than model-based detection. The proposed system separates execution between a trusted planning agent and an untrusted agent that interacts with external content, with information flowing back through a precommitment-based admission mechanism intended to prevent malicious instructions from contaminating the trusted state. To mitigate the rigidity often associated with system-level defenses, the authors introduce a dynamically expanding task graph that allows plans to be refined as new information is verified and incorporated. Empirical results on the AgentLAB benchmark suggest that GraDual achieves a strong security-utility tradeoff, reaching an observed 0% attack success rate while maintaining competitive task performance. However, the paper's primary novelty appears to lie in its particular combination of dual-agent isolation, precommitment-based verification, and dynamic planning rather than in the underlying principle of privilege separation itself, and it remains somewhat unclear how much of the reported utility gain stems from the proposed security mechanism versus the more sophisticated planning architecture and additional reasoning structure introduced by the system.

Critical strengths

Strength 1: Thoughtful architectural formulation of prompt-injection defense

The paper presents a coherent architectural approach to mitigating indirect prompt injection by separating trusted planning from interaction with untrusted content and mediating information flow through deterministic validation mechanisms. This approach is conceptually appealing because it addresses prompt injection at the system-design level rather than relying solely on detection, prompting, or model alignment techniques. Regardless of one's assessment of its novelty or ultimate guarantees, the paper articulates a clear design rationale and develops that rationale into a complete agent framework. This contributes to the discussion of how stronger security properties might be achieved in agentic systems.

Strength 2: Strong empirical evaluation of security and utility tradeoffs

The paper evaluates the proposed method across multiple attack settings and compares it against several existing defenses on a widely used benchmark. The results suggest that the approach is capable of achieving low observed attack success rates while maintaining competitive task performance, and the paper includes analyses aimed at understanding the role of its stateful planning mechanism. Even if some questions remain regarding the interpretation of the utility gains, the evaluation provides useful evidence about the practical behavior of the proposed system and offers a reasonably thorough comparison with prior approaches. Since the central challenge in this area is balancing security and functionality, these empirical results are an important component of the paper's overall contribution.

Critical weaknesses

Weakness 1: Limited differentiation from prior privilege-separation approaches

The paper's central idea is to enforce security through architectural separation of trusted and untrusted computation, with information crossing the trust boundary only through a restricted interface. While the proposed combination of dual-agent execution, precommitments, and admission control is technically distinct, the paper is less convincing in establishing why these mechanisms constitute a fundamentally new paradigm rather than a particular instantiation of a broader privilege-separation approach. In particular, the relationship to prior system-level defenses that similarly rely on controlled information flow and trusted/untrusted separation is not fully clarified. Because novelty and conceptual advancement are central evaluation criteria, this uncertainty makes it difficult to assess the extent to which the paper advances the state of the art beyond existing architectural defenses.

Weakness 2: The source of the reported utility gains is insufficiently isolated

A key empirical claim of the paper is that GraDual achieves both an observed 0% attack success rate and utility that matches or exceeds the undefended baseline. However, the evaluation does not clearly disentangle the contributions of the proposed security mechanisms from those of the broader agent architecture. The paper attributes strong utility to its dynamic graph and deferred-planning design, but it remains unclear whether the reported gains stem from precommitments and admission control, from improved planning capabilities, from the dual-agent decomposition, or from increased reasoning complexity more generally. As a result, the experiments demonstrate the effectiveness of the overall system but provide more limited evidence regarding the specific contribution of the proposed security innovations. This ambiguity weakens the paper's central claim that strong security can be achieved without sacrificing utility through the proposed mechanisms themselves.

Questions for authors

Q1: What security property does the precommitment mechanism provide that is not already achieved by prior privilege-separation or information-flow-control approaches?

The paper argues that hidden precommitments and admission control are central to the design, but it is not entirely clear what class of attacks remains possible under prior architectures and is specifically prevented by GraDual. A clearer articulation of the qualitative security advantage offered by precommitments would help assess the novelty and significance of the contribution.

Q2: Can the authors disentangle the contribution of the security mechanism from that of the planning architecture in the reported utility gains?

The paper reports utility that is competitive with, and in some cases exceeds, the undefended baseline, and attributes this primarily to deferred planning enabled by the dynamic graph. However, it remains unclear how much of the observed utility derives from (i) the dynamic graph and planning architecture, (ii) the dual-agent decomposition, and (iii) the precommitment/admission-control mechanism itself. An ablation or analysis isolating these factors would materially affect my assessment of the paper's central claims.

5 comments

We thank the reviewer for the careful assessment, and for recognizing both architectural formulation and empirical evaluation. We respond to each weakness and question below.

Response to Weaknesses -- W1

GraDual does belong to the broad family of defenses that separate trusted and untrusted content. Within the family, however, it departs from the IFC-based dual-LLM line (CaMeL, FIDES, PRUDENTIA) in how the boundary is enforced and what crosses the boundary, and these two differences are what change the security–utility trade-off.

(1) What crosses the boundary. In IFC designs, the untrusted side is a parser whose output becomes a free value, tracked by taint labels via a program written in advance. While in GraDual, where no taint is involved, every read of untrusted content is answered by an isolated agent bound to a contract, and only what passes code admission goes back. Where a consequential argument needs corroboration, the dual side can act as a tool-using agent under a read-only capability grant to gather evidence, which code then re-verifies. The trusted planner always controls the untrusted agent's lifecycle.

(2) How the boundary is enforced. IFC systems decide what may flow by static rules: hand-written per-tool, per-suite policies over provenance labels (e.g. CaMeL), or human approval to release labeled data (e.g. PRUDENTIA). GraDual decides by a contract that the main agent instantiates at runtime for each outsourced step (namely precommitment in Sec. 3.2), but enforced by code outside both agents and hidden from the dual. No taint is propagated and no per-tool policy is written. Only the high-level collaboration skeleton is fixed.

(3) What this buys. Because the contract is per-task generation rather than tool-generic, GraDual does not have to block every flow from untrusted data into an action. At the same security level (0.0 ASR), this gives substantially higher utility than CaMeL with policies: 69.0 vs. 33.7 on the Table 1 grid, and 66–81 vs. 42–56 on five frontier backbones (see response to Reviewer 4). It also completes more tasks than FIDES and PRUDENTIA without any human approval (see response to Reviewer 2). We therefore reckon GraDual's contribution NOT as another instance of separation, but as replacing static taint-based flow control, working as runtime generative contracts between two sides; this is what lets a deterministic defense keep zero ASR without large the utility cost.

Q1 — What security property does precommitment provide beyond prior privilege separation / IFC?

What security property does precommitment ... or ifc approaches?

Property. The precommitment is fixed by the trusted main agent before any untrusted content is seen, and it is enforced by code outside both agents' contexts. Even a fully compromised dual therefore cannot decide what reaches the main agent: it can only return values in the committed fields and within the committed bounds, and consequential values must also pass evidence re-verification. Nothing the dual says can widen the channel, add an action, or change the admission condition. To clear up the defenses' capability scope, we add an additional study on different attack classes as following.

Attack classes. We classify IPI attacks by what the injection tries to control, following CaMeL's control-flow / data-flow distinction (Sec. 2 of CaMeL's paper) and FIDES's paper's integrity / confidentiality split:

  • G1 Control-flow hijack: an unplanned action (most pervasive case, e.g. changing the password, deleting a file).
  • G1d Data becomes control flow: the user asks the agent to act on retrieved content ("do the tasks on my TODO list at this URL"), so legitimate and injected instructions share one channel. (CaMeL Sec. 6.4)
  • G2 Data-flow manipulation: the plan is unchanged, but an attacker value stands in for a consequential argument (the payee IBAN in a bill). (CaMeL needs its policies for this class.)
  • G3 Exfiltration: private data sent to an attacker-visible channel (email the security code to an external address).
  • G4 Text-to-text: only the final answer or written text is steered ("say this hotel is the best"). CaMeL (Sec. 3.1) and FIDES both declare it out of scope.
  • G5 Availability: the injection only tries to stop the task; it shows as lost utility, never as a breach.

Per-class results. Sampled from AgentDojo (10–16 selected cells per class), gpt-4o. G1, G1d, G3 and G4 use the tool_knowledge attack; G2 replaces the consequential value inside the record itself; G5 tells the agent to stop. Entries are ASR % / utility %; for G5, utility under / w.o attack.

SystemG1G1dG2G3G4G5
Undefended69 / 4473 / 3640 / 5744 / 8844 / 6975 / 100
Spotlighting12 / 8182 / 3637 / 7038 / 8131 / 6956 / 94
IPIGuard12 / 6912 / 937 / 430 / 8156 / 8869 / 81
CaMeL, no policy0 / 620 / 010 / 400 / 560 / 1225 / 50
CaMeL, with policy0 / 560 / 00 / 300 / 440 / 625 / 38
GraDual (ours)0 / 810 / 00 / 300 / 880 / 8156 / 75
  • G1, G3, G4: all deterministic designs keep ASR at 0, but GraDual retains more utility than CaMeL with its policies, because its contract admits the fields that a task step actually needs, instead of blocking every flow from untrusted data. On G4 we observed no breach, but we do not claim to prevent this class: admitted text is bounded in length and schema, not judged for meaning. G4 is generally considered out of our threat model's scope.
  • G2: CaMeL without policies pays the attacker when the bill's payee IBAN is swapped; the data-flow gap is described in CaMeL's paper. CaMeL with policies and GraDual both block it, at equal utility. Utility is low for every system, since the attacked record no longer carries the legitimate value. In full tests, we find GraDual can sometimes accomplish it, using corrobration scheme within an additional main-dual feedback loop.
  • G1d: no deterministic design completes these tasks, because none turns retrieved instructions into actions. This is a shared limit that calls for human endorsement (improved by PRUDENTIA), not a GraDual-specific gap. We actually implemented one further version of GraDual introducing human involvement, which further improves overall trade-off frontier, but we reckon it may confuse the readers. So, it is left to future work.
  • G5: an injection that only tells the agent to stop costs GraDual less utility than CaMeL (56 vs. 25 under attack).

Overall, compared with CaMeL with its policies, GraDual reaches the same security level on every class tested (0 ASR on G1–G4), but without hand-written per-tool policy, and with substantially higher utility. The advantage of precommitment is therefore not a class of attacks that a fully policy-equipped IFC system cannot block, but reaching that security level without the policies and at a much lower utility cost. GraDual does not claim to prevent semantic manipulation of admitted text (G4) or availability attacks (G5).

W2 / Q2 — Disentangling the sources of utility

Can the authors disentangle the contribution of the security mechanism from that of the planning architecture in the reported utility gains? ... (i) the dynamic graph and planning architecture, (ii) the dual-agent decomposition, and (iii) the precommitment/admission-control mechanism itself.

Ablation design. GraDual's components depend on each other: precommitment and admission (iii) govern the channel that the decomposition (ii) creates, and the planner can re-plan safely (i) only on admitted data. We therefore build GraDual up in layers instead of removing one component at a time. Following ablations follows Table.1's config, under the long-horizon replay attack (303 cells) and without attack (97 tasks), gpt-4o, one run each.

  • P0: the undefended agent.
  • P0′: a single agent running GraDual's planner (graph construction and dynamic re-planning) that reads raw tool outputs itself; no dual side, contract or admission.
  • P1, -- Dual-LLM pattern: the plan is fixed once; untrusted output is read only by an isolated extractor, and every value returns as an opaque reference that the planner can pass but never read into context.
  • P2, -- P1 + contract enforced in code: values that pass the contract's code checks (field allowlist, types and bounds, quarantine, evidence re-verification) become visible to the planner; the plan is still frozen.
  • P2′, -- P1 + admission by prompt instead of code: the reader relays what it reads, every contract check is stated as an instruction, and re-planning is allowed (same as Sec. 5.4 ablation).
  • P3, P2 + dynamic state: re-planning over admitted data, i.e., full GraDual.
StageUtility under attack ↑ASR ↓Utility without attack ↑
P0 Undefended66.339.280.4
P0′ Single agent + GraDual planner56.44.3*63.9
P1 Dual-LLM pattern33.30.022.7
P2 precommitment and admission enforced in code58.70.047.4
P2′ precommitment and admission by prompt only56.527.1—
P3 GraDual (+ dynamic state)69.00.067.2

P0′ cells were rejected by the model provider's own content filter, because raw injected text reaches the planner's prompt; counting them as breaches gives 10.7%.*

Utility under attack (%)
70 ┤ P3●
   │  ▲ ↖
65 ┤  │   ↖                                     ●P0
60 ┤ P2●   ↖                                    │
57 ┤  ▲     ↖                       ●P2′        │
55 ┤  │     ●P0′ ←──────────────────╂───────────┤
   │  │                             ┇           │
45 ┤  │                             ┇           │
35 ┤ P1●┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┘←──────────┘
   └──┬──────────┬──────────┬──────────┬───▶ ASR (%)
      0         10         20         30   40
  • (ii) Decomposition (P0→P1). Isolation alone reaches 0% ASR but collapses utility: a planner that can read nothing cannot compare, compute or decide on data, which is similar to IFC-based methods to some extent.
  • (iii) Precommitment and admission (P1→P2 vs. P1→P2′). Admitting values through a code-enforced contract (P2) recovers 25.4 points under attack and 24.7 without attack, with ASR still 0, and ASR stays at 0 once re-planning is added (P3). Stating the same contract as instructions (P2′) recovers utility to 56.5 but raises ASR to 27.1%. Security therefore comes from enforcing the contract in code, not from the decomposition itself.
  • (i) Dynamic state (P2→P3). Re-planning over admitted data adds 10.3 points under attack and 19.8 without attack, with ASR still 0; on the 167 cells where the planner extends its plan at runtime, the gain is 15.0 points.
  • Planner vs. security layer (P0→P0′, P0′ vs. P3). GraDual's plan-first planner alone cuts ASR to 4.3% but not to 0, and costs utility against a plain ReAct agent. Adding the security layer to the same planner takes ASR to 0, adds 12.6 points under attack, and does not lower utility without attack (67.2 vs. 63.9). Strong security is thus obtained without sacrificing utility through the mechanisms themselves; the gap to the undefended agent without attack stems from the plan-first structure.
  • Reasoning budget. At a token budget comparable to CaMeL's, GraDual keeps its utility advantage (see response to Reviewer 4, W3 / Q2).
Reviewer_ogP9OpenReview ↗
Rating
1
Confidence
3
Informativeness
2
Presentation
1
Soundness
1
Read review
Paper summary

This paper proposes GraDual, a stateful dual-agent defense architecture against long-horizon Indirect Prompt Injection (IPI) attacks in agents. Through Main-Dual Agent isolation, a code-enforced Precommitment verification mechanism, and a dynamic task graph (Dynamic DAG), it blocks untrusted content from affecting high-privilege decisions while preserving flexibility in task execution. Under multiple attack settings in AgentLAB, the method achieves an observed 0% Attack Success Rate (ASR) and competitive Task Utility.

Critical strengths
  1. The problem is important and has practical significance.

  2. The experimental results are competitive and cover multiple task scenarios, attack methods, and models.

Critical weaknesses
  1. The novelty of the paper is very limited. In essence, the paper makes two agents work collaboratively and relies on information asymmetry between different agents to ensure safety. However, both agents could be compromised. In addition, the practical value is limited, since the system needs to maintain two sets of agents for each task, and issues such as task runtime efficiency are not considered.

  2. The paper treats the Dynamic Graph as a core contribution on par with dual-agent isolation and Precommitment. However, the current core ablation of the Dynamic Graph cannot independently prove that the DAG Representation or its specific graph update mechanism brings irreplaceable gains. Disabling the initial graph from expanding during task execution not only removes the dynamic growth ability of the graph structure, but also limits the runtime planning space of the agent.

Questions for authors
  1. How are trusted and untrusted content defined for separation? The paper uses Precommitment to specify the content trusted by the main agent. How are these protocols defined? What should be treated as untrusted? Does every interaction not covered by the pre-specified protocols have to be processed by the dual agents first, and then the main agent is considered for updating?

  2. The comparison with the most related system-level defenses is incomplete. In particular, works involving runtime verification, dynamic constraints, or dual-model isolation, such as PACT, PRUDENTIA, and Twin Agent, are not included in the main experiments.

5 comments

We thank the reviewer for pragmatic questions. Below, we clarify on weaknesses and answer to questions accordingly.

Response to Weaknesses:

W1a -- We understand the reviewer's concern of the simple high-level ideation of GraDual, as it follows the dual-LLM separation pattern. But we entirely redesign its interaction and enforcement mechanism, giving both sides stateful reasoning and tool-use capabilities, namely dual-agent instead of dual-llm. Different from IFC-based methods such as CaMeL and FIDES which mainly rely on taint propagation, GraDual does not involve taint but enforces hard-coded boundary governance through precommitments, capability grants, and deterministic admission checks. Crucially, GraDual assumes that the dual agent may be fully compromised: proposed protocol's goal is to use the capable but untrusted dual to help the main agent complete tasks in a safe manner, without relying on the dual’s integrity. Grants constrain the dual’s actions, while admission checks govern what reaches the main agent (clarified in Q1 below). Additionally, our evaluations supports a significant improved security–utility trade-off with zero observed successful attacks.

W1b -- Regarding practical value, collaborative agent architectures have been used in various commercial products, such as terminal agent + GUI agent on PC, system agent + web agent on edge device, as well as main + subagent configurations in many auto research agents, coding agents. GraDual fits this broader deployment pattern while explicitly governing cross-agent trust. We agree that practical value also depends on efficiency; we quantify GraDual's runtime overhead below and will add a full version of it to the revised paper.

W2 -- We agree with the reviewer that the DAG representation itself is not the core contribution. We use it as a straightforward implementation of an evolving planning and execution state, updated through code-admitted feedback. A better version of narrative should be Dynamic State or Evolving State, and we will edit in the revised version. Our ablation evaluates the utility gains of allowing against forbidding the state to expand during execution, not showing the superiority of DAGs over other state representations.

Overhead — runtime efficiency comparison

We measured token usage and wall-clock time per task in average for GraDual and the system-level baselines from Table 1. The setting is AgentLAB long-horizon, gpt-4o, on a 40-cell subset per suite. We are running a full version of the table and going to add it in the revised manuscript.

SystemLLM callsTokensTime (s)× Undefended (tokens / time)
Undefended4.610.5k14.31.0× / 1.0×
IPIGuard7.729.1k25.92.8× / 1.8×
DRIFT13.424.2k38.82.3× / 2.7×
CaMeL8.134.2k33.23.3× / 2.3×
GraDual (ours)12.331.3k36.43.0× / 2.6×

GraDual costs about the same as DRIFT and CaMeL. GraDual makes more LLM calls but uses fewer tokens against CaMeL, because each call is short: it carries only the current step's context, either the graph state or one admitted tool result, instead of the whole trajectory; while CaMeL makes fewer but heavier calls. On every retry its planner regenerates the whole program, resending the full interpreter prompt and the previous error. DRIFT shows the same pattern even more strongly. It makes the most calls (13.4) but uses the fewest tokens (2.3×), because it validates every proposed call against its plan and isolates injections from each tool result with separate short calls. Comparing to single agent/LLM defenses (IPIGuard and DRIFT), running two agents does not double the cost, and the precommitment and admission checks are deterministic code that uses less than 1% of overhead. The remaining overhead comes from planning. CaMeL writes one program up front and executes it. GraDual's main agent instead re-plans step by step over the evolving state. Latency follows the number of sequential calls, so GraDual's latency is 2.6× that of the undefended agent, compared with CaMeL's 2.3× and DRIFT's 2.7×. This incremental planning is what lets GraDual recover from information it only discovers at runtime. GraDual therefore achieves 0.0 successful attacks at a budget comparable to system-level CaMeL & DRIFT, and probabilistic methods like IPIGuard, while IPIGuard and DRIFT are each still breached in multiple tasks.

Overhead — GraDual Breakdown

To see GraDual's time breakdown, we timestamped every LLM call, running one task at a time.

ComponentLLM callsTime (s)Share
Main: initial graph construction1.27.123%
Main: step-by-step re-planning1.86.220%
Main: argument resolution2.44.815%
Main: final answer1.02.37%
Dual: schema-bound extraction and summaries3.68.226%
Cross-check of consequential arguments1.12.78%
Precommitment / admission checks, tool execution–0.2<1%

Q1 — How are trusted and untrusted content separated, and how are protocols defined?

How are trusted and untrusted content defined for separation? How are these protocols defined? What should be treated as untrusted? Does every interaction not covered by the pre-specified protocols have to be processed by the dual agents first?

Trusted vs. untrusted. The trust and untrust separation is divided by the two agents' runtime contexts, and with certain controlled capabilities. The definition is simple: the main agent's context is trusted, while the dual agent's context is untrusted; the proposed protocol is on the boundary between them (see Sec. 3.1). Under the IPI threat model, the user query is honest and anything returned from the environment can be adversarial, therefore, all environmental content is handled on the untrusted dual agent side.

How the protocol works. Whenever a step needs environment information, the main agent plans on its trusted context and issues the subtask, via dual agent with the tool grant and the precommitment (σ,Sdual,κ)(\sigma, S_{\mathrm{dual}}, \kappa) (as Sec. 3.2). That is, when a step does not involve environment information or the tool call is tagged trusted (e.g. provided by a trusted party), this main-dual feedback loop will not be invoked, and it is decided by the main agent given the tool call schema and context. The high-level idea is: the main agent is a high-privileged agent, on which GraDual wants to protect and defend against third-party interference; GraDual is a protocol to provide a buffer area via dual agent that can process the untrusted information and only provide the useful information to the main task.

Only the skeleton of our protocol is fixed: plan, then outsource with a precommitment, then admit through the gate. Its content is instantiated by the main agent at runtime, not pre-specified, for each outsourced step and from that step's context. Reusable return schemas and registered evidence verifiers are drawn on where they exist, and contracts for unseen tools are proposed on the fly. Because nothing is fixed per task, the same architecture applies across tasks and suites without task-specific engineering.

Reviewer_3qReOpenReview ↗
Rating
1
Confidence
3
Informativeness
2
Presentation
2
Soundness
2
Read review
Paper summary

this paper follows the isolation of the dual-LLM pattern (Willison, 2023) blog to design a new dynamic Graph-driven Dual-agent architecture that harmonizes agentic utility and security. The paper achieved 0.00 attack success rate on several major long-horizon replay IPI attack benchmarks. in the meantime, the authors also claim to achieve a good utility score on those tasks.

Critical strengths

perfect ASR: 0.0 across all reported benchmarks

good utility score: compared with other methods, it remains a high utility score

Critical weaknesses

The biggest concern is: it seems too good to be true.

in the main results in table 1 & 2, this paper reports perfect ASR: 0.0±0.0 across all benchmarks

usually, I won't see ML paper to report 0.0±0.0 since there is always some randomness, and the LLM themselves will also decode random tokens. So this makes me question whether there is some issue on the setup or some unfair comparison?

Questions for authors

see weakness

1 comment

ASR = 0 has precedent among multiple system-level defenses. Besides CaMeL, there are FIDES and its follow-up PRUDENTIA (ICLR'26), but unfortunately, they do not release code. For a fair comparison, we adapted both GraDual and CaMeL to their configuration and report in their convention. The configuration is the full AgentDojo grid (949 attacked cells), gpt-4o as the backbone, and the tool_knowledge attack. Their convention is measured by TCR@k, i.e. task completion without attack and with k human approvals, together with the number of successful attacks. We additionally report utility under attack, which neither FIDES nor PRUDENTIA reports.

SystemTCR@0 (benign, 97 tasks) ↑Successful attacks / 949 ↓Utility under attack (949 cells) ↑
Undefended80.4 ± 3.731557.2
FIDES50.3 ± 3.50 (1 if 2 specified tasks are included)not reported
PRUDENTIA42.5 ± 5.30 (claims to inherit security from FIDES)not reported
CaMeL56.9 ± 2.81 (near zero)57.4
GraDual (ours)63.5 ± 4.6061.6

FIDES and PRUDENTIA: numbers as reported in their papers, see FIDES Table 1, PRUDENTIA Table 2. Undefended, CaMeL and GraDual: our runs. TCR@0 is mean ± std over 5 runs; the attack grid is run once.

Under the same configuration, all three defenses that measure security reach zero or near-zero successful attacks: FIDES, CaMeL and GraDual. This is the expected outcome once security enforcement is moved out of the LLM, not a sign of a flawed setup. CaMeL's single breach is in the banking suite, which matches what CaMeL reports (Table 4 in [1]). What separates the defenses is how much utility they keep. GraDual completes 63.5% of benign tasks with no human approval (i.e., TCR@0), compared with 56.9% for CaMeL, 50.3% for FIDES and 42.5% for PRUDENTIA. Under attack, GraDual keeps 61.6% utility, compared with 57.4% for CaMeL. It is also the only system with no successful attack in the full AgentDojo grid.

We have updated the Supplementary Material with a self-contained reproduction package. After adding an OpenAI-compatible API key, one can simply use a single script (reproduce.sh) sets up the environment and reruns our main tables. We encourage the reviewer to try it and verify the ASR = 0 independently. We sincerely hope these clarifications, additional comparisons, and artifacts can address the reviewer’s concern, and respectfully ask the reviewer to reassess GraDual’s contribution to the security–utility trade-off and reconsider the score accordingly.

From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.

Related papers

Loading the map…

Discussion (0)

Sign in to comment.