DEDUPED Hot AI repos, turned into use cases Get the Monday 5

How to catch tool results that try to give the agent orders with Jevals

Check every tool result for indirect prompt injection and PHI in the same request as your other evals.

Who it is forA security or platform engineer running an agent that reads web pages, emails, or documents it did not write.

The problemText returned by a tool can contain instructions meant to hijack the agent, and the agent may follow them without the user noticing.

The outcomeA pass or fail for indirect injection on each trace, plus a PHI check, with the probability the decision model returned.

What you need first

  • Python 3.10 or newer
  • An API key for one backend: AI_GATEWAY_API_KEY (Jev through Vercel AI Gateway), TYPESAFE_API_KEY, or OPENROUTER_API_KEY
  • A trace to evaluate: a messages list in the OpenAI chat format plus the tools you gave the model

Steps

  1. pip install jevals
  2. pip install "jevals[pii]" to add Presidio for PII and PHI entity detection
  3. export AI_GATEWAY_API_KEY=...
  4. Call evaluate(sample, [IndirectInjection(), PHI()]) with from jevals.security import IndirectInjection, PHI on your saved traces (inferred, check the README)
  5. Read r.indirect_injection.passed and r.phi.passed, and review any failing traces by hand

Prompt for your agent

In the jevals repo, run IndirectInjection() and PHI() from jevals.security against the traces in <traces_file>. Report each trace that fails indirect_injection, with the tool result text that triggered it. Verify that the PHI check ran with the jevals[pii] extra installed.

Caveat. The README gives a probability for each check, not a guarantee, so treat a pass as a screen and not as proof that a trace is safe.

Share: X LinkedIn Hacker News Email Copy link

Disclaimer

Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked "Seen in the wild", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email [email protected] and we will look at it promptly. Full disclaimer page