Chaos Monkey for AI agents
Project description
Agent Breaker
Automated adversarial security testing for LangGraph-based AI agents. Catch vulnerabilities in LLM-powered applications before they reach production.
Features Overview
- Plug-and-play security testing for LangGraph agents
- Domain-aware adversarial prompt generation (finance, healthcare, legal, etc.)
- ML and rule-based behavioral judges (97.8% accuracy with ML)
- Auto-detects agent tools and capabilities
- Detailed vulnerability reports in the terminal
- Graceful rate limit handling
- CLI:
agent-breaker init,agent-breaker run, with options for debug/full output - Supports custom domains and config via breaker.yaml
Judge Verdict Types
- PASS: Agent properly refused the adversarial request
- WARN: Agent discussed the request but took no action
- FAIL: Agent exhibited vulnerable behavior (complied with the attack)
- INFO: Agent refused but provided guidance or information (needs review)
- SKIP: Test was skipped (rate limit, API error, etc.)
Installation
pip install agent-breaker
# Optional: for ML judge (recommended)
pip install agent-breaker[ml]
CLI Commands
Initialize config:
agent-breaker init
Add --force to overwrite existing breaker.yaml
Run tests:
agent-breaker run
Add --debug to show full traceback on errors
Add --full-output to show full payload and model response text
Optional environment variables (default: off): AGENT_BREAKER_DEBUG=1 Enable debug mode AGENT_BREAKER_FULL_OUTPUT=1 Enable full output
Quick Start
- Initialize config:
agent-breaker init # Edit breaker.yaml to point to your agent
- Run tests:
agent-breaker run
Example breaker.yaml
version: "0.2"
target:
type: "langgraph"
path: "my_agent.py"
attr: "graph"
prompt_variable: "SYSTEM_PROMPT"
input_key: "user_query"
output_key: "response"
state_class: "AgentState"
generator:
strategy: "template"
domain: "finance"
attacks:
- name: "prompt_injection"
enabled: true
max_api_calls: 10
judge:
model: "ml" # or "behaviour"
Usage Example
# In your agent file (my_agent.py):
graph = workflow.compile()
# breaker.yaml should reference this file and variable
Documentation
Documentation: https://github.com/GokulAIx/Agent-Breaker#readme
License
MIT License
Author
P. Gokul Sree Chandra
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file agent_breaker-0.2.1.tar.gz.
File metadata
- Download URL: agent_breaker-0.2.1.tar.gz
- Upload date:
- Size: 230.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2156dae0b852a04ceb72ba14616f8897fbf467327dee7dc5ce9cc4d0c6d7e3c2
|
|
| MD5 |
e60bf3410cdb9eae23437a358ee9a3d2
|
|
| BLAKE2b-256 |
776509b87f1bc5ca2e9b2de06aec80f67a4d033e54c82535bd2c525d29ace1ec
|
File details
Details for the file agent_breaker-0.2.1-py3-none-any.whl.
File metadata
- Download URL: agent_breaker-0.2.1-py3-none-any.whl
- Upload date:
- Size: 223.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
09c9d49305e8cb7bbd8b24f4c90ca86789fd1c77dd961ed2001aef7dd6459f0f
|
|
| MD5 |
9b02aba753a9c2b022f8144ac532e45d
|
|
| BLAKE2b-256 |
b42a54dac28e492cc7c6e266fdc2be356976518e1ca9bbc96e4b8fef0d66b039
|