Accessible
Start from one authorized objective and one target. No exploit folklore required before the first useful run.
Your AI app has a text box. That means it has an attack surface.
Mesmer turns weird user input into Python red-team recipes you can run, inspect, replay, and benchmark against systems you own or have permission to test.
the uncomfortable part
Prompt injection does not always arrive as code. Sometimes it is just a patient user, a text box, and a few attempts at wording the request differently. That is why Mesmer treats red-team work as a repeatable experiment, not a magic prompt hunt.
Your AI product does not need a hoodie-wearing villain. Sometimes it only needs a user with too much curiosity and a text box.
same request, different wording, repeated until a boundary moves
Start
Get ReleaseDesk to emit RELEASE_READY only when the authorized readiness check is satisfied.
Search
FrontierSearch(iterations=2, branching=3, width=2) explores support-ticket wording and keeps the strongest candidate.
Evidence
Replay includes the exact user message, target response, evaluator score, and operator trace that produced the result.
teach me something new
Pick the technique that matches the question, plug in the target and evaluator, then let Mesmer preserve the evidence.
Use SingleTurnProbe for one objective, one target call, and one evaluator.
Use FrontierSearch when you want branching, selection, scoring, and a replayable winner.
Use PopulationFuzzing for seed pools, mutators, reward updates, and repeated trials.
Pull from prompt-pattern libraries while keeping the attack recipe readable.
Wrap several attacks in a Benchmark and report shared metrics across objectives.
Declarative attack recipes
1attack = techniques.FrontierSearch(2 name="support_router_escalation",3 iterations=2, branching=3, width=2,4 expand=ops.Propose(proposers.Template()),5 select=ops.Select(selectors.KeywordOverlapSelector()),6 evaluate=ops.Evaluate(evaluators.Contains(text="ESCALATE_TIER_2")),7 stop=ops.StopWhen(conditions.ScoreAtLeast(1)),8)910result = await Runner(log_format="compact").run(run)safety scope
Mesmer is for defensive testing, benchmark reproduction, and research on systems you own or have permission to test.
takeaway
The goal is to stop guessing. Run the test, keep the trace, compare the technique, and know exactly what happened.