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
Metadata
Release files for agent-breaker 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| agent_breaker-0.2.1.tar.gz | 230.4 kB | Without provenance | Details for agent_breaker-0.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| agent_breaker-0.2.1-py3-none-any.whl | Python 3 | none | any | Details for agent_breaker-0.2.1-py3-none-any.whl |
Total release size: 453.6 kB
Release files / agent_breaker-0.2.1.tar.gz
| Download URL | agent_breaker-0.2.1.tar.gz |
|---|---|
| Size | 230.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2156dae0b852a04ceb72ba14616f8897fbf467327dee7dc5ce9cc4d0c6d7e3c2
|
|
BLAKE2b-256 checksum How to use checksums |
776509b87f1bc5ca2e9b2de06aec80f67a4d033e54c82535bd2c525d29ace1ec
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.3
|
Release files / agent_breaker-0.2.1-py3-none-any.whl
| Download URL | agent_breaker-0.2.1-py3-none-any.whl |
|---|---|
| Size | 223.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
09c9d49305e8cb7bbd8b24f4c90ca86789fd1c77dd961ed2001aef7dd6459f0f
|
|
BLAKE2b-256 checksum How to use checksums |
b42a54dac28e492cc7c6e266fdc2be356976518e1ca9bbc96e4b8fef0d66b039
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.3
|
Security for agent-breaker 0.2.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.