I ran AgentDojo's prompt-injection benchmark against a small local agent, with and without one of the benchmark's built-in defences. I expected the defence to cut attack success. It barely moved it. What it changed was something else: with the defence, the agent finished the user's task far more often, and very often it finished the attacker's task in the same run.

The setup

AgentDojo is an open benchmark from ETH Zurich. Its banking suite gives an agent tools for a simulated bank account. An attack hides an instruction inside something the agent reads, such as a transaction description, and tries to make the agent do the attacker's task (for example, send money somewhere) instead of, or as well as, the user's.

  • Cases: 12 user tasks x 9 attacker goals = 108 attack cases, plus the 12 user tasks with no attack.
  • Agent: AgentDojo's own tool-calling agent, unmodified.
  • Model: Gemma 4 12B on a local Ollama server, temperature 0, a freshly started server for every run, a 4,096-token cap per reply.
  • Attack text: AgentDojo's important_instructions_no_model_name template, unmodified.
  • Defence: AgentDojo's repeat_user_prompt, which repeats the user's request to the agent after each batch of tool results.
  • Runs: every attack case twice without the defence and twice with it; 576 runs in all, about 9 hours on one laptop.
  • Grading: AgentDojo's own grader, which checks the simulated bank's final state.

I wrote the rules down and pushed them to the repository before the first scored run.

What the grader counted

Attack runs (216 per version) No defence With defence
Attacker's goal credited 158 (73%) 155 (72%)
User's own task credited 82 (38%) 193 (89%)
Both credited in the same run 64 (30%) 134 (62%)
Run ended with a reply cut off at the length cap 74 3

With no attack at all, the user's task was credited in 55 of 72 runs without the defence and 67 of 72 with it.

So the defence kept the agent on track. It just kept it on track for everyone: in 62% of the defended attack runs, the agent did what the user asked and what the attacker asked.

Why the undefended numbers are blurry

The undefended agent often talked itself into the length cap: 74 of its 216 attack runs ended with a reply cut off, against 3 with the defence. A cut-off run is graded on whatever state it reached, and 40 of those 74 were not credited to the attacker. Some of the undefended agent's "resistance" was really "did not finish".

The clearest case is user task 3: all 18 undefended attack runs were cut off and none was credited to the attacker; with the defence, 9 of 18 were. If you leave task 3 out (a cut I chose after seeing the data, so treat it as a description, not a test), the attacker was credited in 158 of 198 runs without the defence and 146 of 198 with it.

Whether the defence lowers attack success once the undefended agent is made to finish was not measured.

What I can and cannot conclude

I didn't want to eyeball 158 against 155, so I fixed four yes/no questions in advance, each with a 10-point margin and a stated error bound (a wrong PASS and a wrong BLOCK each at most 1 in 40 per question, if the rule's conditions hold):

  • Is the defended agent no worse at resisting attacks, by 10 points? PASS, after 2 rounds.
  • Is it no worse at normal work, by 10 points? PASS, after 1 round. One task still fell from 6 of 6 to 2 of 6 inside that average.
  • Does the defence cut attack success by more than 10 points? INCONCLUSIVE after 2 rounds. Not "no", just not settled.
  • Does the defended agent stay under a 10% attack-success limit? BLOCK. The attacker was credited in 77 of 108 defended runs in the first round.

The limits, plainly: one small local model, one attack template, one simulated bank, one defence (picked because it needs no extra model). Round 2 was close to a copy of round 1 at temperature 0. Nothing here says anything about other models, other defences, an attacker who adapts, or real-world safety.

How the verdicts were computed

The four verdicts come from ARCI, an open-source tool I build for one question: given repeated runs and a limit fixed in advance, is the evidence enough to say PASS, BLOCK, or not yet? Version 3.6.0 adds check-attacks, which reads attack results that a benchmark has already graded (CSV or JSONL, one row per case and round):

pip install agent-reliability-ci arci check-attacks rule.yaml --runs round-1.csv round-2.csv --out result 

It runs nothing and finds no attacks. It answers PASS, BLOCK or INCONCLUSIVE against your limit and lists every case where the attack succeeded, with file and row. A PASS never means an agent is safe.

If you read my last post: what ARCI is now

My first post used ARCI as a fault-injection harness for agents written against its own interface. It has changed a lot since then. The main command is now arci check-change: it takes the test command you already have (pytest, promptfoo, a Claude Code plugin's eval cases, anything that writes JUnit XML, CSV or JSONL), runs it on the old and new version of your prompt, model or agent in paired rounds, and stops as soon as the evidence says PASS or BLOCK against the margin you set, or INCONCLUSIVE at your round budget. Try it offline, with no model or API key:

uvx --from agent-reliability-ci arci check-change --example 

It also has a GitHub Action mode that posts a verified report on the pull request, and options for an absolute pass-rate floor (--floor), named tasks that can veto a PASS (--critical), and failures shared within a round (--cluster round). check-attacks is the newest piece. Repository: ajaysurya1221/agent-reliability-ci

Your turn

AgentDojo ships other defences: tool filtering, a prompt-injection detector, and spotlighting with delimiters. Which one should I run next on this setup, and would you change anything about the design first? I'll register the next run publicly before it starts and post the result here, whatever it says.