A standalone fault-injection toolkit that deliberately breaks your LLM calls and agent workflows—
and reports exactly what failed.
Agentic AI systems are brittle. Your agent works fine in the lab, but what happens when the LLM times out, a tool fails, or shared memory gets corrupted? Most teams don't know until production breaks.
Your LLM returns garbage, but latency and tokens look normal. No alert fires. Chaos testing catches this.
One tool fails → Agent A fails → Agent B cascades. Without topology tracking, you miss the link.
Your retry logic might fail under rate limits. Your turn limits might not prevent infinite loops. Prove it works.
Observability shows cost/latency. Chaos shows recovery. Together, they prove your agent is production-ready.
Works with any Python callable. LLM frameworks, agent frameworks, your custom code—no lock-in.
pip install agentic-chaos. Wrap your calls. Run under chaos. No framework modifications needed.
agentic-chaos operates in three layers: LLM calls, agent workflows, and agent-to-agent handoffs.
Test individual LLM calls — timeouts, rate limits, silent degradation. Works against any LLM, any provider.
Test multi-agent workflows — tool failures, memory corruption, infinite loops. Tracks topology and cascades.
Score whether corruption actually mattered and break the edge between two agents — LLM-as-judge fidelity scoring plus edge-scoped handoff corruption/drop/delay.
7 fault types across LLM, agent, and handoff layers. Extensible—add your own.
Simulates a hung/slow completion. Hangs for N seconds then times out (or succeeds late).
Simulates a burst of 429 errors, then recovery. Tests retry logic and backoff behavior.
Real latency, garbage output. Monitoring-blind failure—the hardest to detect.
Force a tool to fail—error, timeout, or return empty. Tests tool unavailability.
Corrupt shared agent state—truncate to 50%, inject garbage, or garble text.
Force agent to loop past termination. Tests turn-limit safeguards.
Targets the edge between two agents instead of a node — corrupt, drop, or delay a handoff payload in transit.
Install, wrap your calls, run under chaos.
pip install agentic-chaos
from agentic_chaos.chaos import chaos_call, chaos_session, TokenTimeoutError
with chaos_session(["token_timeout"]):
try:
result = chaos_call(
llm.complete,
"What is the weather?",
faults=["token_timeout"]
)
except TokenTimeoutError:
print("LLM timed out—handled gracefully")
agentic-chaos chaos run my_app.py \ --inject token_timeout,rate_limit_storm,silent_degradation \ --save chaos_report.json
Start testing your agents today. Zero setup required.