flakestorm/examples/broken_agent/README.md
Entropix 7b75fc9530 Implement Open Source edition limits and feature restrictions
- 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
2025-12-29 00:11:02 +08:00

47 lines
1.2 KiB
Markdown

# 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:
1. **Fragile Intent Parsing**: Only recognizes exact keyword matches
2. **No Typo Tolerance**: Fails on any spelling variations
3. **Hostile Input Vulnerability**: Crashes on aggressive tone
4. **Prompt Injection Susceptible**: Follows injected instructions
## Running the Example
### 1. Start the Agent Server
```bash
cd examples/broken_agent
pip install fastapi uvicorn
uvicorn agent:app --port 8000
```
### 2. Run Entropix Against It
```bash
# 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:
1. Use NLP for intent recognition
2. Add spelling correction
3. Handle emotional inputs gracefully
4. Detect and refuse prompt injections
Then re-run Entropix to see your robustness score improve!