Skip to content

Mesmer

Mesmer is an open-source cognitive red-teaming toolkit for LLM applications.

Core trick

Multi-turn agent picks persuasion techniques, sends probes to the target LLM, and stores an attack graph and belief map across runs.

Tags

Description

Mesmer is an open-source cognitive red-teaming toolkit for LLM applications. Instead of firing static prompt-injection payloads, Mesmer runs a multi-turn agent system that treats each target like a language-shaped security surface. It profiles the target, chooses cognitive techniques such as foot-in-door, authority bias, narrative transport, and cognitive overload, sends probes, judges the result, and adapts. The core feature is memory. Every run builds an attack graph of what was tried, what scored well, and what became a dead end. Under that, Mesmer maintains a belief map: falsifiable hypotheses about the target, evidence that raises or lowers confidence, and utility-ranked next moves. A second run can start from what the first run learned instead of rediscovering the same failures. This fits "Build for what's next" because AI agents are moving from chat windows into tools, workflows, devices, and robots. Red-teaming them will not only be about bytes and APIs. It will also be about language, persuasion, memory, and intent. Long term, I want Mesmer to become shared infrastructure for the AI security community: something closer to Metasploit for LLMs than a single red-team script. The current project is the cornerstone: a runtime, module system, target adapters, attack graph, belief map, and benchmark pipeline. From here, the community could contribute new cognitive techniques, reusable prompt banks, target profiles, evaluation recipes, and a public catalog of language-level exploit patterns. Not CVEs in the traditional binary sense, but a structured place to document how LLM systems fail under language pressure and how defenders can test against those failures.
galihlprakoso/mesmer.ai★ 20 forksPythonCreated Apr 22, 2026 · last push Apr 28, 2026

README excerpt

# mesmer

<p align="center">
  <strong>Cognitive hacking toolkit for LLMs</strong><br />
  Treat AI as minds to study, not software to fuzz.
</p>

<p align="center">
  <a href="https://mesmer-ai-jade.vercel.app/"><strong>Landing page</strong></a>
  |
  <a href="https://mesmer-ai-jade.vercel.app/docs"><strong>Docs</strong></a>
  |
  <a href="CLAUDE.md">Engineering notes</a>
  |
  <a href="VISUALIZATION.md">Execution diagrams</a>
  |
  <a href="benchmarks/README.md">Benchmarks</a>
</p>

<p align="center">
  <img alt="Python 3.10+" src="https://img.shields.io/badge/python-3.10%2B-111111?style=flat-square" />
  <img alt="MIT license" src="https://img.shields.io/badge/license-MIT-111111?style=flat-square" />
  <img alt="LLM red teaming" src="https://img.shields.io/badge/LLM-red--team-111111?style=flat-square" />
  <img alt="Built with Opus 4.7" src="https://img.shields.io/badge/Built%20with-Opus%204.7-111111?style=flat-square" />
</p>

Mesmer is an agentic red-team system for authorized LLM safety testing. It does not just replay a static prompt list. It profiles a target, forms weakness hypotheses, runs multi-turn cognitive attacks, judges the result, and remembers what it learned for the next run.

Built for `Built with Opus 4.7: a Claude Code hackathon`.

## Explore

| Destination | Link |
|---|---|
| Product landing page | <https://mesmer-ai-jade.vercel.app/> |
| Full documentation | <https://mesmer-ai-jade.vercel.app/docs> |
| Engineering notes | [CLAUDE.md](CLAUDE.md) |
| Ex

Team