Skip to content

Commit fc9c2bd

Browse files
mnvsk97claude
andcommitted
Update docs: standard presets, MCP mock mode, --test-connection, plugin install
- CLI ref: add --test-connection flag, update init description - Scenarios ref: add standard/standard-mcp/standard-all presets - Plugin page: full install commands, init flow with mode selection - Quickstart: MCP mock mode, validate --test-connection Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
1 parent 10b8728 commit fc9c2bd

File tree

4 files changed

+92
-25
lines changed

4 files changed

+92
-25
lines changed

docs-site/docs/getting-started/plugin.md

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,35 +4,54 @@ AgentBreak works as a plugin for Claude Code, giving Claude structured commands
44

55
## Install
66

7+
1. Install the package:
8+
79
```bash
810
pip install agentbreak
911
```
1012

11-
## Configure
12-
13-
In Claude Code:
13+
2. Add the plugin in Claude Code:
1414

1515
```
1616
/plugin marketplace add mnvsk97/agentbreak
1717
/plugin install agentbreak@mnvsk97-agentbreak
1818
/reload-plugins
1919
```
2020

21+
To update after a new release:
22+
23+
```
24+
/plugin marketplace add mnvsk97/agentbreak
25+
/reload-plugins
26+
```
27+
2128
## Commands
2229

2330
| Command | What it does |
2431
|---------|-------------|
2532
| `/agentbreak:init` | Initialize AgentBreak, analyze your agent codebase |
26-
| `/agentbreak:create-tests` | Generate tailored chaos scenarios |
33+
| `/agentbreak:create-tests` | Generate project-specific chaos scenarios |
2734
| `/agentbreak:run-tests` | Run tests and produce a resilience report |
2835

2936
### `/agentbreak:init`
3037

31-
Sets up `.agentbreak/` config and scans your codebase for provider, framework, MCP tools, and error handling patterns. Run this first.
38+
Full setup flow:
39+
40+
1. Checks AgentBreak is installed
41+
2. Runs `agentbreak init` to create `.agentbreak/`
42+
3. Analyzes your codebase (provider, framework, MCP tools, error handling)
43+
4. Asks: **mock or proxy mode?**
44+
- **Mock** — no API keys needed, synthetic responses
45+
- **Proxy** — real API traffic, requires valid keys
46+
5. Writes `application.yaml` and `scenarios.yaml` (with standard preset)
47+
6. Validates config (+ `--test-connection` if proxy mode)
48+
7. Offers to generate project-specific scenarios
3249

3350
### `/agentbreak:create-tests`
3451

35-
Generate `scenarios.yaml` entries based on the analysis from init. Claude understands the full scenario schema (8 fault kinds, 3 schedule modes, match filters) and writes scenarios targeting your agent's specific failure modes.
52+
Generates project-specific scenarios on top of the standard preset. Analyzes your codebase to find specific MCP tools, models, and integrations, then writes targeted fault scenarios. Can be run anytime to add more scenarios.
53+
54+
Standard baseline scenarios are always included via the preset — this command focuses on what's unique to your agent.
3655

3756
### `/agentbreak:run-tests`
3857

docs-site/docs/getting-started/quickstart.md

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ agentbreak init
1616

1717
This creates `.agentbreak/` with two config files:
1818

19-
- **`application.yaml`** — what to proxy (LLM mode, MCP upstream, port)
20-
- **`scenarios.yaml`** — what faults to inject
19+
- **`application.yaml`** — what to proxy (LLM/MCP mode, upstream URLs, port)
20+
- **`scenarios.yaml`** — what faults to inject (includes a standard preset with baseline scenarios)
2121

2222
## 3. Start the proxy
2323

@@ -62,7 +62,9 @@ You'll get a JSON response with:
6262

6363
## Mock vs proxy mode
6464

65-
By default, AgentBreak runs in **mock mode** — no API key needed, it returns synthetic responses. To test against the real API:
65+
By default, AgentBreak runs in **mock mode** — no API keys needed, it returns synthetic responses. Both LLM and MCP support mock mode.
66+
67+
To test against real APIs, switch to **proxy mode**:
6668

6769
```yaml
6870
# .agentbreak/application.yaml
@@ -72,7 +74,18 @@ llm:
7274
upstream_url: https://api.openai.com # or https://api.anthropic.com
7375
auth:
7476
type: bearer
75-
token_env: OPENAI_API_KEY # or ANTHROPIC_API_KEY
77+
env: OPENAI_API_KEY # or ANTHROPIC_API_KEY
78+
79+
mcp:
80+
enabled: true
81+
mode: proxy
82+
upstream_url: http://localhost:8001/mcp
83+
```
84+
85+
Verify your credentials before running tests:
86+
87+
```bash
88+
agentbreak validate --test-connection
7689
```
7790

7891
## Next steps

docs-site/docs/reference/cli.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ All commands work from your project root (where `.agentbreak/` lives).
44

55
## `agentbreak init`
66

7-
Create `.agentbreak/` directory with default `application.yaml` and `scenarios.yaml`.
7+
Create `.agentbreak/` directory with default `application.yaml` and `scenarios.yaml`. Auto-detects your provider (OpenAI/Anthropic), framework, and MCP usage. Generates `scenarios.yaml` with a standard preset based on what's enabled.
88

99
```bash
1010
agentbreak init
@@ -26,8 +26,17 @@ Check your config files for errors.
2626

2727
```bash
2828
agentbreak validate
29+
agentbreak validate --test-connection # also test upstream auth (proxy mode)
2930
```
3031

32+
The `--test-connection` flag makes a lightweight request to each proxy-mode upstream to verify connectivity and auth. Results:
33+
34+
- **OK** — upstream reachable, auth works
35+
- **AUTH FAILED (401)** — bad API key or token
36+
- **FORBIDDEN (403)** — key valid but insufficient permissions
37+
- **CONNECTION FAILED** — wrong URL or upstream is down
38+
- **TIMEOUT** — upstream too slow to respond
39+
3140
## `agentbreak inspect`
3241

3342
Connect to your MCP server and discover available tools, resources, and prompts. Writes `.agentbreak/registry.json`.

docs-site/docs/reference/scenarios.md

Lines changed: 40 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -86,31 +86,57 @@ scenarios:
8686
8787
## Presets
8888
89-
Skip manual config with built-in bundles:
89+
Use presets for baseline coverage out of the box:
9090
9191
```yaml
92-
preset: brownout
92+
version: 1
93+
preset: standard
9394
```
9495
95-
Combine a preset with custom scenarios:
96+
Combine a preset with project-specific scenarios:
9697
9798
```yaml
98-
preset: brownout
99+
version: 1
100+
preset: standard-all
99101
scenarios:
100-
- name: custom-fault
101-
summary: My extra fault
102+
- name: search-tool-timeout
103+
summary: search_docs times out
102104
target: mcp_tool
105+
match:
106+
tool_name: search_docs
103107
fault:
104-
kind: http_error
105-
status_code: 503
108+
kind: timeout
109+
min_ms: 5000
110+
max_ms: 10000
106111
schedule:
107112
mode: random
108113
probability: 0.2
109114
```
110115
111-
| Preset | What it does |
112-
|--------|-------------|
113-
| `brownout` | Random LLM latency + rate limits |
114-
| `mcp-slow-tools` | 90% of MCP tool calls are slow |
115-
| `mcp-tool-failures` | 30% of MCP tool calls return 503 |
116-
| `mcp-mixed-transient` | Light MCP latency + errors |
116+
Use multiple presets:
117+
118+
```yaml
119+
version: 1
120+
presets:
121+
- standard
122+
- mcp-slow-tools
123+
```
124+
125+
### Standard presets
126+
127+
These provide baseline coverage. `agentbreak init` uses these by default.
128+
129+
| Preset | Target | Scenarios |
130+
|--------|--------|-----------|
131+
| `standard` | LLM | 6 scenarios: rate limit (429), server error (500), latency (3-8s), invalid JSON, empty response, schema violation |
132+
| `standard-mcp` | MCP | 7 scenarios: 503 unavailable, timeout (5-15s), latency (3-8s), empty response, invalid JSON, schema violation, wrong content |
133+
| `standard-all` | Both | All 13 baseline scenarios (standard + standard-mcp) |
134+
135+
### Specialty presets
136+
137+
| Preset | Target | What it does |
138+
|--------|--------|-------------|
139+
| `brownout` | LLM | Random LLM latency + rate limits |
140+
| `mcp-slow-tools` | MCP | 90% of MCP tool calls are slow |
141+
| `mcp-tool-failures` | MCP | 30% of MCP tool calls return 503 |
142+
| `mcp-mixed-transient` | MCP | Light MCP latency + errors |

0 commit comments

Comments
 (0)