r/coolgithubprojects • • 2d ago

AgentArena: a red-team range that attacks AI agents with prompt injection and measures what each defense costs [Python]

https://github.com/Ahany1440/agentarena

I built this to answer two questions: does an AI agent fall for prompt injection, and what do the defenses break?

- Fake agents and fake MCP servers (email, GitHub issues, notes, web). The "secret" is a random canary, so nothing real can leak.

- An attacker LLM writes injection payloads and keeps changing them based on what failed.

- 5 defenses you can switch on and off: tool-description scanner, taint tracking, allowlist, spotlighting, and a monitor model.

- Every result comes with a 95% confidence range.

Live result (600 trials on Claude): 0 of 360 attacks worked. But taint tracking blocked a normal "reply to the sender" task 30/30 times.

`arena demo` runs everything free with no API key.

Write-up: https://github.com/Ahany1440/agentarena/blob/main/docs/WRITEUP.md

1 Upvotes

0 comments sorted by