I've been building an open-source proxy called attenuo. It sits between an AI agent and its tools (MCP servers) and decides every tool call before it reaches the server. I wanted to know if it does anything useful, so I ran it on AgentDojo, a public benchmark for prompt injection against tool-using agents.

Here is what happened, including the parts that did not go well.

The setup

  • Model: qwen2.5:14b, running on one laptop with Ollama. No API key, costs nothing to repeat.
  • Benchmark: AgentDojo, all four suites (slack, banking, travel, workspace), attack important_instructions.
  • Two arms, same tasks, same model, same settings. One is the plain agent. The other is the same agent with attenuo in front of the tools.
  • For each task, the agent gets a token that lists only the tools and arguments that task should need. These grants were written from the task prompt alone and frozen before the model runs. Nothing was tuned afterwards.

The result

On the 936 attack cases that both arms scored:

Plain agent With attenuo
Attacks that worked 207 25
Tasks finished while under attack 384 324
Tasks finished with no attack (of 96) 49 38

So attacks that worked dropped from about 22% to about 3%.

What it cost

It is not free. With no attack at all, the agent finished 38 of 96 tasks behind the proxy, against 49 without it. The policy sometimes refuses a call the task really needed, for example an invitation to someone who is not in the user's contacts. If your policy is strict, some real work gets blocked. That is the trade.

Where it failed

25 attacks still worked. They fall into a few groups, and I think these are the interesting part:

  • Attacks with no tool call. One travel attack only asks the agent to recommend a hotel in its answer. The proxy sees tool calls, not the model's text. It cannot stop this, and it did not (8 of 20 in both arms).
  • Grants that cannot name the object. A task says "delete the largest file". The grant allows one delete, of any file, because nobody knows yet which file is largest. The injected text got the model to spend that one delete on the attacker's file. The limit kept it to one delete, but it was the wrong one.
  • Read-side grants. If a task may fetch web pages, the attacker's page is also a web page. The proxy allowed those fetches.

Two honest caveats

  • This is a weak agent. A small local model follows injected text much more often than a frontier model does. I also ran four current frontier models on a sample with no proxy, and the attack worked 0 times out of 212 on each. That is the models' own result. So this matters most if you run open-weight models, or if you want a second layer that does not depend on the model behaving.
  • One model, one attack type, one run each. The raw logs and every allow or deny decision are in the repo, so you can check the numbers or run it again.

What attenuo actually does

  • Each agent, and each sub-agent, gets a token that can only be narrowed, never widened (OAuth token exchange, RFC 8693).
  • Every tool call is checked against a Cedar policy before it reaches the MCP server.
  • Access can be revoked mid-run, and every decision goes into a signed, hash-chained log.
  • It is one Rust binary, self-hosted, Apache 2.0.

Try it

There is a demo that runs in Docker, no Rust needed. It plays a small leak scenario: one allowed read, two denied calls, a revocation, and the audit log.

git clone https://github.com/attenuo-dev/attenuo cd attenuo examples/github-leak-demo/run-docker.sh 

Repo: https://github.com/attenuo-dev/attenuo
Full write-up of the benchmark: https://github.com/attenuo-dev/attenuo/blob/main/docs/evaluation/agentdojo-local-model.md

If you run MCP servers and try this in front of one, I would like to hear what broke. That is more useful to me than a star.