
A prompt-injection defense for tool-using agents. A Python library with no model call by default.
Project page ·
Paper (arXiv) ·
Try it ·
Try in your browser ·
Connect an app ·
Reproduce ·
Cite ·
MUSTER
pip install spillway-guard
An earlier version was accepted at a NeurIPS 2026 workshop.
Results
Under the standard attack, SPILLWAY has no in-scope leak in 12 cells and the most utility.
A backbone is the agent's model. An in-scope leak sends an action to a target the user never named. The count starts from AgentDojo's check, rescored by executed effect, and excludes a target the task already named and a content-only task that names no recipient or sink. Neither filter reads defense state.
AgentDojo v1.2.2, same backbone and scorer for every method. SPILLWAY's rows use the optional gemma4:31b judge, a local model that re-checks refused calls, off by default in the library. Values and conditions · Per-cell records · Stronger attacks · Without the judge.
What is different
| SPILLWAY | MELON | Progent | DRIFT |
|---|
| The decision that lets an action through is made by | a set lookup over typed tool returns and the user's task, then fixed delegation rules and, if configured, a local judge on refusals | an LLM re-run of the trajectory with the user task masked | an LLM-written privilege policy enforced by a checker | an LLM validating each call against a plan |
| Added model calls per benign episode (qwen3:8b, Workspace / Slack) | 0.19 / 0.39 (judge included) | 3.25 / 5.29 backbone calls | 5.94 / 8.67 backbone calls | 9.59 / 9.91 backbone calls |
| AgentDojo cells with an in-scope leak (of 12) | 0 | 10 | 11 | 7 |
The four findings in words
- Zero in-scope attack success on all 12 AgentDojo cells. Three backbones (gpt-4o-mini, qwen3-coder:30b, qwen3:8b) by four suites (Banking, Slack, Travel, Workspace), 2,847 attacked pairs under the standard attack, and no injection redirected an effect to an attacker's target. No other defense we ran reaches zero on all twelve.
- Highest utility under attack of any defense we ran on that grid. Twelve-cell mean .484, against .417 undefended, .453 for DRIFT, .371 for Progent, .345 for ROPE and .314 for MELON, while keeping 96% of the undefended agent's benign utility. Removing the injection before the model reads it often leaves the agent above the undefended one.
- Almost no added model calls. On benign qwen3:8b traffic SPILLWAY consults its judge 0.05 (Workspace) and 0.43 (Slack) times per episode and changes backbone calls by less than 0.15, against 3.25 to 9.91 added backbone calls per episode for MELON, Progent and DRIFT in the same two suites.
- SPILLWAY holds under stronger attacks. A raw zero under ChatInject's forged chat template (665 pairs). In-scope attack success .000 on AutoDojo's 389 released optimizer-generated pairs (a descriptive result, see limitations). On two held-out sets it is .007 by AgentDojo's check, .014 counting a second transfer that check misses, and .000. Under the PISmith reinforcement-learning attacker, SPILLWAY holds a mean in-scope attack success of .007 at .265 utility (open-loop ASR@1 on gpt-4o-mini), against .568 for the undefended agent and .025 to .489 for every baseline except ROPE, which ties at .007 with .173 utility.