# EasyJailbreak

A Python framework for LLM security research that builds and runs jailbreak attacks against language models from reusable components, then scores how well each attack worked.

EasyJailbreak is a Python framework for researchers and developers working on LLM security. It breaks the jailbreaking process into steps: initializing mutation seeds, selecting seeds, adding constraints, mutating, attacking and evaluating, and provides a component for each step.

A run loops through two processes. In mutation, a selector picks the most promising prompts, a mutator transforms them and a constraint filters them. In inference, the prompts are sent to the target model, and an evaluator scores the responses, which feeds the next round of selection.

The project ships attack recipes, reports results for 11 recipes against 10 models, and has API documentation and an accompanying paper. It installs from PyPI, needs Python 3.9 or newer, and is licensed under GPL-3.0.

Website: https://github.com/EasyJailbreak/EasyJailbreak
