The ai-blackteam batch command
ai-blackteam batch runs multiple attacks against a model in one go. By default, it runs them in parallel across 5 workers.
Selecting attacks
All attacks:Parallelism
By default, batch runs 5 attacks at the same time. Increase or decrease with-w:
--sequential:
All flags
| Flag | Short | Required | Description |
|---|---|---|---|
--provider | -p | Yes | Provider name |
--model | -m | No | Specific model |
--attacks | No | Comma-separated names or all (default: all) | |
--target | -t | Yes | Target behavior to test |
--system-prompt | No | System prompt defense to test | |
--system-prompt-file | No | Read system prompt from file | |
--workers | -w | No | Max parallel workers (default: 5) |
--verbose | No | Show full response text per attack | |
--quiet | No | Suppress output, exit code only | |
--sequential | No | Run attacks one at a time |
Progress bar
A live progress bar tracks how many attacks have completed:Summary table
When the batch finishes, you get a one-line summary:Exit codes
Same asai-blackteam run:
| Code | Meaning |
|---|---|
0 | Zero bypassed attacks |
1 | At least one attack bypassed |
2 | Configuration error |
Sensitive category warnings
When your batch includes attacks from sensitive categories (CBRN, weapons, infrastructure), ai-blackteam prints a warning:The ai-blackteam sweep command
ai-blackteam sweep runs all attacks against all configured providers in sequence. It’s a full cross-provider comparison in one command.
How it works
- ai-blackteam checks your config for providers with API keys set
- For each provider, it runs every registered attack sequentially
- At the end, you get a summary table comparing all providers
Sweep summary table
Sweep flags
| Flag | Short | Required | Description |
|---|---|---|---|
--target | -t | Yes | Target behavior to test |
--verbose | No | Show full response text | |
--quiet | No | Suppress output |