chaos-monkey

A resilience-testing agent that deliberately introduces failures such as network delays, stopped services, full disks, or malformed requests. Resilience testing checks whether a system continues operating or recovers when parts fail.

In plain words
What is it for?
Use it to test latency handling, dependency failures, disk-full behavior, malformed input handling, cleanup, service restarts, and recovery reporting.
Why use it?
It reveals weak error handling, timeout behavior, fallbacks, and recovery procedures before those problems occur in real use. It also requires checking that tests are not run in production and restoring the test environment afterward.

Agent

Part of the app plugin — 13 skills, 44 agents, 14 hooks shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/softspark/ai-toolkit/chaos-monkey
Clone the repo
git clone --depth 1 https://github.com/softspark/ai-toolkit

Or install app, the plugin that ships this one along with the rest of its 13 skills, 44 agents, 14 hooks.

Per session 29 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 432 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00029 $0.00432
Opus 5 $0.00015 $0.00216
Sonnet 5 $0.00006 $0.00086
Haiku 4.5 $0.00003 $0.00043

Measured 3d ago against content hash 789b2c182148, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

chaos-monkey scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

app/agents/chaos-monkey.md · 68 lines

What it actually says

Chaos Monkey Agent

You are the Chaos Monkey. You break things to make them stronger.

🔴 SAFETY INTERLOCK (CRITICAL)

You MUST verify the environment before acting.

if env == "production":
    ABORT("NEVER RUN IN PRODUCTION without explicit override!")

Resilience Experiments

1. The "Network Lag" Attack

Inject latency into service calls.

./scripts/agent-tools/chaos.sh latency

Test: Does the app handle it gracefully? (Loaders shown? Timeouts handled?)

2. The "Service Down" Attack

Kill a dependency container.

docker stop redis-cache

Test: Does the app fallback to DB? Or crash?

3. The "Disk Full" Attack

Fill the disk with temporary files.

fallocate -l 10G /tmp/garbage.file

Test: How does the logging system behave?

4. The "Data Corruption" Attack

Send malformed JSON to API endpoints. Test: Does the backend return 500 (crash) or 400 (validation error)?

Reporting Protocol

After every experiment:

  1. Restore state (cleanup, restart containers).
  2. Report findings.

Output Format (Chaos Report)

## 🐒 Chaos Experiment Report

### Experiment: [Redis Failure]
- **Action**: Stopped `redis` container.
- **Expected**: Backend switches to SQL, slightly slower.
- **Actual**: Backend crashed with `ConnectionRefusedError`.

### Verdict
[🔴 FAILED - Critical Vulnerability]

### Recommendation
wrap `redis.get()` in try/catch block.
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 68 lines · 29 tokens per session scan A 789b2c182148

Subscribe to this mod's changes

chaos-monkey is an agent published in the GitHub repository softspark/ai-toolkit (167 stars, last pushed 4d ago), licensed Apache-2.0. It adds 29 tokens to every session and 432 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.