This autumn the server where my AI agents were running got hacked. That’s why I made this.
The threat is simple. An agent reads untrusted text (emails, web pages, documents, tickets), and that text can carry hidden instructions for it. It can override the agent’s instructions, fake a system message, leak data, phish credentials, change payment details in an invoice or poison a summary.
So I built ArsGuard. It’s an open (MIT) local prompt injection classifier. It’s mDeBERTa-v3-base, fully fine-tuned as a binary classifier, and it returns a probability from 0 to 1. It checks the text before the agent reads it. It runs on CPU with no GPU, no internet and no paid APIs, so the text doesn’t leave the machine.
What I checked. The attacks in the dataset (ArsGuard Injections, also open) were written directly in English, not translated. They sit in carriers like resumes, reviews, calendar invites, code comments and chats. Every attack has a harmless text of the same form, and half of those harmless texts are hard ones. I then tested on an independent set made by a different generator with a different prompt.
On English attacks ArsGuard caught 98.8%. The most downloaded open model on Hugging Face (ProtectAI) caught 59.6%.
Limits. On the hard harmless set I get 20% false alarms. Most of them are articles and warnings about prompt injection itself. Yes, texts about the attack.
Install:
pip install arsguard
There’s a Python API (from arsguard import Guard) and a CLI that returns exit code 1 on an attack, so you can put it in a script before the agent.
Code: https://github.com/arsentev-ai/arsguard Report: DOI 10.5281/zenodo.24682051
A question for people who do this in practice: which attack carriers have you seen in real work?
Evgenii Arsentev, PhD - creator of Arsminal; founder of ArsentevAI and Dad4Kids CEO of a startup taken to the US market from scratch arsentev.ai
I honestly assumed every big models/client by now detects prompt injection without additional user input. At least Claude does, and informed me of the prompt it found, and said it did not act on it, but that’s probably not a good example since this is more important for local ones
Thank you for this.


