Chaos proxy for testing LLM agents. Supports OpenAI, Anthropic, and MCP.
Project description
AgentBreak
Your agent works great — until the LLM times out, returns garbage, or an MCP tool fails. AgentBreak lets you test for that before production.
It's a chaos proxy that sits between your agent and the real API, injecting faults like latency spikes, HTTP errors, and malformed responses so you can see how your agent actually handles failure.
Agent --> AgentBreak (localhost:5005) --> Real LLM / MCP server
^
injects faults based on your scenarios
Get started
pip install agentbreak
agentbreak init # creates .agentbreak/ with default configs
agentbreak serve # start the chaos proxy on port 5005
Point your agent at http://localhost:5005 instead of the real API:
# OpenAI
export OPENAI_BASE_URL=http://localhost:5005/v1
# Anthropic
export ANTHROPIC_BASE_URL=http://localhost:5005
Run your agent, then check how it did:
curl localhost:5005/_agentbreak/scorecard
That's it. No code changes needed — just swap the base URL.
How it works
AgentBreak reads two files from .agentbreak/:
application.yaml— what to proxy (LLM mode, MCP upstream, port)scenarios.yaml— what faults to inject
A scenario is just a target + a fault + a schedule:
scenarios:
- name: slow-llm
summary: Latency spike on completions
target: llm_chat # what to hit (llm_chat or mcp_tool)
fault:
kind: latency # what goes wrong
min_ms: 2000
max_ms: 5000
schedule:
mode: random # when it happens
probability: 0.3
Don't want to write YAML? Use a preset:
preset: brownout
Available presets: brownout, mcp-slow-tools, mcp-tool-failures, mcp-mixed-transient.
MCP testing
agentbreak inspect # discover tools from your MCP server
agentbreak serve # proxy both LLM and MCP traffic
Track resilience over time
# in .agentbreak/application.yaml
history:
enabled: true
agentbreak serve --label "added retry logic"
agentbreak history compare 1 2 # diff two runs
Claude Code
If you use Claude Code, AgentBreak has a guided skill that scans your codebase, generates scenarios, and walks you through results:
npx skills add mnvsk97/agentbreak
Then type /agentbreak in Claude Code.
Full reference
For the full list of fault kinds, schedule modes, match filters, and config options, see the docs.
Examples
See examples/ for sample agents and MCP servers you can test against.
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 agentbreak-0.3.3.tar.gz.
File metadata
- Download URL: agentbreak-0.3.3.tar.gz
- Upload date:
- Size: 35.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
af6ad70822153ab0986cd60038eb421dfb9fc61f84abcaecfd3e59891322c134
|
|
| MD5 |
88938c4c00bf0946cb67e8e74466b262
|
|
| BLAKE2b-256 |
522474591841a87b4b977b4820445f9650776022464f72425dd860fc0bce4afe
|
Provenance
The following attestation bundles were made for agentbreak-0.3.3.tar.gz:
Publisher:
ci.yml on mnvsk97/agentbreak
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
agentbreak-0.3.3.tar.gz -
Subject digest:
af6ad70822153ab0986cd60038eb421dfb9fc61f84abcaecfd3e59891322c134 - Sigstore transparency entry: 1213148731
- Sigstore integration time:
-
Permalink:
mnvsk97/agentbreak@a23bf52463b120f18806cf339927b11dc26b8dc2 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/mnvsk97
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@a23bf52463b120f18806cf339927b11dc26b8dc2 -
Trigger Event:
push
-
Statement type:
File details
Details for the file agentbreak-0.3.3-py3-none-any.whl.
File metadata
- Download URL: agentbreak-0.3.3-py3-none-any.whl
- Upload date:
- Size: 23.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
336894ee4fa45f22aa41b466a0b02176f8dbf5ad0b7ae1f0b6e0837e220f922f
|
|
| MD5 |
01e79e457c54ac8a2c395fe98a539cbd
|
|
| BLAKE2b-256 |
bef15800d2282df0b077f75ef8d7ba7bea41fbd7702cfa4c53f5b20dd8f9178a
|
Provenance
The following attestation bundles were made for agentbreak-0.3.3-py3-none-any.whl:
Publisher:
ci.yml on mnvsk97/agentbreak
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
agentbreak-0.3.3-py3-none-any.whl -
Subject digest:
336894ee4fa45f22aa41b466a0b02176f8dbf5ad0b7ae1f0b6e0837e220f922f - Sigstore transparency entry: 1213148859
- Sigstore integration time:
-
Permalink:
mnvsk97/agentbreak@a23bf52463b120f18806cf339927b11dc26b8dc2 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/mnvsk97
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@a23bf52463b120f18806cf339927b11dc26b8dc2 -
Trigger Event:
push
-
Statement type: