EasyJailbreak is a free, open source ai security & privacy project written in Python and released under GPL-3.0. It has 909 GitHub stars, 91 forks and 17 open issues, and was last pushed 16 days ago. On this registry it ranks #27 of 34 tracked projects in AI Security & Privacy, with 5 head-to-head comparisons available.

What is EasyJailbreak?

EasyJailbreak is an easy-to-use Python framework, licensed under GPL-3.0, that generates adversarial jailbreak prompts for large language models by assembling interchangeable attack methods, and it is built for LLM security researchers and developers who need to test and benchmark model safety.

What it is

EasyJailbreak lives in the Python ecosystem under the AI & Machine Learning / AI Security & Privacy category, and its topics mark it as a jailbreak framework for large language models, an LLM safety benchmark, and a discrete-optimization tool for LLM security. The framework decomposes the mainstream jailbreaking process into a set of iterable steps: initialize mutation seeds, select suitable seeds, add a constraint, mutate, attack, and evaluate. Each of those steps is exposed as a separate component, which turns the framework into a playground where individual methods can be swapped, combined, and re-tested rather than rewritten from scratch.

The concrete problem it solves is fragmentation. Published jailbreak techniques normally arrive as standalone scripts, each with its own prompt format, its own stopping rule, and its own way of judging success, which makes them hard to compare or reuse. EasyJailbreak replaces that with one loop: a Selector picks the most promising prompts, a Mutator transforms them, a Constraint filters out prompts that fail the intended condition, the surviving prompts are sent to the target model during inference, and an Evaluator scores how effective the attack was. Those scores feed back into the Selector, closing the cycle, and under a stopping mechanism the run ends with a report covering every attack, including the jailbreak prompts, the target model's responses, and the Evaluator's scores.

Key capabilities

  • Six assembled attack recipes ship as ready-to-run pipelines: ReNeLLM, GPTFuzz, ICA, AutoDAN, PAIR, and JailBroken.
  • Selection policies include MCTSExploreSelectPolicy, UCBSelectPolicy, EXP3SelectPolicy, RoundRobinSelectPolicy, and RandomSelector.
  • Mutation methods include ChangeStyle, MisspellSensitiveWords, InsertMeaninglessCharacters, GenerateSimilar, AlterSentenceStructure, Rephrase, Expand, Shorten, Translation, Crossover, ReplaceWordsWithSynonyms, HistoricalInsight, Artificial, and Auto_obfuscation.
  • Constraint component DeleteHarmLess filters prompts before they reach the target model.
  • Evaluators cover several judging styles: Evaluator_GenerativeJudge, Evaluator_ClassificationJudge, Evaluator_PatternJudge, and Evaluator_GenerativeGetScore.
  • Each completed run produces a report containing the jailbreak prompts, the target model's responses, and the Evaluator's scores.
  • A published result set covers 11 attack recipes run against 10 large language models and is available for download.

Who uses it and how

  • LLM security researchers who need to compare several attack recipes against the same target model on a common scoring basis instead of maintaining separate scripts.
  • Red teams and safety evaluators testing how a model's guardrails hold up across repeated mutation rounds.
  • Developers adding new components, such as a new Mutator or Evaluator, who install the project in editable mode rather than from the package index.
  • Research groups reproducing the results described in the project's paper, using the published 11-recipe, 10-model result set as a reference point.

Getting started

Install with pip install easyjailbreak on python>=3.9. To add new components such as a Mutator or Evaluator, clone the repository, enter the directory, and run pip install -e ..

How it compares

No list of paid products that EasyJailbreak replaces is provided in the available facts, and no comparable tools are named, so it stands alone in this registry among entries of its kind. Its distinguishing property here is simply that it is an open-source, GPL-3.0 framework rather than a hosted service.

When to use it — and when not to

Expect to run it yourself on a Python 3.9 or newer environment and to supply your own access to the target model, since the inference stage attacks that model directly. The GPL-3.0 licence is copyleft, which matters if you intend to fold the code into a closed product, and the tooling is deliberately offensive in nature, so it belongs in sanctioned evaluation and research settings rather than production pipelines. The README is short and mostly covers setup and project structure, with API detail living in separate documentation, and the repository carries 17 open issues, so anyone who wants a polished, batteries-included benchmarking suite should look carefully before committing.

project readme (upstream, from github) — read inline

—— An easy-to-use Python framework to generate adversarial jailbreak prompts by assembling different methods

Website License Read Docs GitHub release (latest by date)

Table of Contents

About

✨ Introduction

What is EasyJailbreak?

EasyJailbreak is an easy-to-use Python framework designed for researchers and developers focusing on LLM security. Specifically, EasyJailbreak decomposes the mainstream jailbreaking process into several iterable steps: initialize mutation seeds, select suitable seeds, add constraint, mutate, attack, and evaluate. On this basis, EasyJailbreak provides a component for each step, constructing a playground for further research and attempts. More details can be found in our paper.

📚 Resources

  • Paper: Details the framework's design and key experimental results.

  • EasyJailbreak Website: Explore different LLMs' jailbreak results and view examples of jailbreaks.

  • Documentation: Detailed API documentation and parameter explanations.

🏆 Experimental results

The jailbreak attack results of 11 attack recipes on 10 large language models can be downloaded at Link.

🛠️ Setup

There are two methods to install EasyJailbreak. All those methods need python>=3.9 installed.

  1. For users who only require the approaches (or recipes) collected in EasyJailbreak, execute the following command:
pip install easyjailbreak
  1. For users interested in adding new components (e.g., new mutate or evaluate methods), follow these steps:
git clone https://github.com/EasyJailbreak/EasyJailbreak.git
cd EasyJailbreak
pip install -e .

🔍 Project Structure

This project is mainly divided into three parts.

  1. The first part requires the user to prepare Queries, Config, Models, and Seed.

  2. The second part is the main part, consisting of two processes that form a loop structure, namely Mutation and Inference.

    1. In the Mutation process, the program will first select the optimal jailbreak prompts through Selector, then transform the prompts through Mutator, and then filter out the expected prompts through Constraint.
    2. In the Inference process, the prompts are used to attack the Target (model) and obtain the target model's responses. The responses are then inputted into Evaluator to obtain the score of the attack's effectiveness for this round, which is then passed to Selector to complete one cycle.
  3. The third part you will get a Report. Under some stopping mechanism, the loop stops, and the user will receive a report about each attack (including jailbreak prompts, responses of Target (model), Evaluator's scores, etc.).

The following table shows the 4 essential components (i.e. Selectors, Mutators, Constraints, Evaluators) used by each recipe implemented in our project:

Attack
Recipes
Selector Mutator Constraint Evaluator
ReNeLLM N/A ChangeStyle
InsertMeaninglessCharacters
MisspellSensitiveWords
Rephrase
GenerateSimilar
AlterSentenceStructure
DeleteHarmLess Evaluator_GenerativeJudge
GPTFuzz MCTSExploreSelectPolicy
RandomSelector
EXP3SelectPolicy
RoundRobinSelectPolicy
UCBSelectPolicy
ChangeStyle
Expand
Rephrase
Crossover
Translation
Shorten
N/A Evaluator_ClassificationJudge
ICA N/A N/A N/A Evaluator_PatternJudge
AutoDAN N/A Rephrase
CrossOver
ReplaceWordsWithSynonyms
N/A Evaluator_PatternJudge
PAIR N/A HistoricalInsight N/A Evaluator_GenerativeGetScore
JailBroken N/A Artificial
Auto_obfuscation
Auto_payload_splitting
Base64_input_only
Base64_raw
Base64
Combination_1
Combination_2
Combination_3
Disemovowel
Leetspeak
Rot13
N/A Evaluator_GenerativeJudge
Cipher N/A AsciiExpert
CaserExpert
MorseExpert
SelfDefineCipher
N/A Evaluator_GenerativeJudge
DeepInception N/A Inception N/A Evaluator_GenerativeJudge
MultiLingual N/A Translate N/A Evaluator_GenerativeJudge
GCG ReferenceLossSelector MutationTokenGradient N/A Evaluator_PrefixExactMatch
TAP SelectBasedOnScores IntrospectGeneration DeleteOffTopic Evaluator_GenerativeGetScore
CodeChameleon N/A BinaryTree
Length
Reverse
OddEven
N/A Evaluator_GenerativeGetScore

💻 Usage

Using Recipe

We have got many implemented methods ready for use! Instead of devising a new jailbreak sche

readme truncated — read the full docs on github

Frequently asked questions

Is EasyJailbreak free to use?

EasyJailbreak is open source under the GPL-3.0 licence. There is no licence fee and no seat count — you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does EasyJailbreak do?

An easy-to-use Python framework to generate adversarial jailbreak prompts.

What is EasyJailbreak written in?

EasyJailbreak is primarily written in Python. Its source is publicly available at https://github.com/EasyJailbreak/EasyJailbreak, and it has 909 GitHub stars.