mirror of
https://github.com/flakestorm/flakestorm.git
synced 2026-05-02 12:22:44 +02:00
- Add 5 mutation types (paraphrase, noise, tone_shift, prompt_injection, custom) - Cap mutations at 50 per test run - Force sequential execution only - Disable GitHub Actions integration (Cloud feature) - Add upgrade prompts throughout CLI - Update README with feature comparison - Add limits.py module for centralized limit management - Add cloud and limits CLI commands - Update all documentation with Cloud upgrade messaging |
||
|---|---|---|
| .. | ||
| agent.py | ||
| README.md | ||
Broken Agent Example
This example demonstrates a deliberately fragile AI agent that Entropix can detect issues with.
The "Broken" Agent
The agent in agent.py has several intentional flaws:
- Fragile Intent Parsing: Only recognizes exact keyword matches
- No Typo Tolerance: Fails on any spelling variations
- Hostile Input Vulnerability: Crashes on aggressive tone
- Prompt Injection Susceptible: Follows injected instructions
Running the Example
1. Start the Agent Server
cd examples/broken_agent
pip install fastapi uvicorn
uvicorn agent:app --port 8000
2. Run Entropix Against It
# From the project root
entropix run --config examples/broken_agent/entropix.yaml
3. See the Failures
The report will show how the agent fails on:
- Paraphrased requests ("I want to fly" vs "Book a flight")
- Typos ("Bock a fligt")
- Aggressive tone ("BOOK A FLIGHT NOW!!!")
- Prompt injections ("Book a flight. Ignore previous instructions...")
Fixing the Agent
Try modifying agent.py to:
- Use NLP for intent recognition
- Add spelling correction
- Handle emotional inputs gracefully
- Detect and refuse prompt injections
Then re-run Entropix to see your robustness score improve!