Execution
execution controls how the run behaves: the order attacks run in, how much runs at once, what happens after an error, and where results go. Every field has a safe default, so you can leave the whole section out.
execution
How the run behaves: ordering, limits, error handling, output and storage. Every field has a safe default.
| Field | Type | Default | Description |
|---|---|---|---|
mode | one of sequential, parallel | sequential | Run attacks one after another, or all at once within the shared limits. |
dry_run | boolean | false | Validate and build everything, but send no request. |
preflight | boolean | true | Check every model the campaign uses (target, guardrails, attack roles and embedders, judges, goal classifier) before attacking, so an unreachable endpoint fails fast with a clear message instead of mid-run. Turn it off to let a run proceed and record such failures as attempt errors. |
on_error | one of continue, stop | continue | After an attack fails, run the remaining ones or stop. |
escalate | boolean | false | Run attacks in order and drop a goal once an attack jailbreaks it, so later attacks only face the goals still standing. Implies sequential order; the remaining attacks are skipped once every goal has fallen. |
per_attack_timeout | typing.Annotated[float, Gt(gt=0)] | unset | Maximum seconds a single attack may run before it is stopped and marked failed. Leave unset for no limit. |
concurrency | ConcurrencySpec | see ConcurrencySpec | How much work may run in parallel. |
retries | RetrySpec | see RetrySpec | Extra attempts after a provider error. |
output | OutputSpec | see OutputSpec | Files written for the run. |
storage | StorageSpec | see StorageSpec | Where results are recorded. |
execution.concurrency
How much work may be in flight at once, shared by every attack.
| Field | Type | Default | Description |
|---|---|---|---|
attack | integer (>= 1) | 1 | How many goals may be generating requests at the same time. |
target | integer (>= 1) | 1 | How many requests may be waiting on the target at the same time. |
judge | integer (>= 1) | 1 | How many replies may be judged at the same time. |
execution.retries
Extra attempts after a provider error (timeouts, rate limits, 5xx).
| Field | Type | Default | Description |
|---|---|---|---|
target | integer (>= 0) | 0 | Extra attempts for a failed call to the target. |
roles | integer (>= 0) | 0 | Extra attempts for a failed call to an attack's helper models. |
judges | integer (>= 0) | 0 | Extra attempts for a failed call to a judge. |
execution.output
Files written for each run, next to the results stored in the database.
| Field | Type | Default | Description |
|---|---|---|---|
directory | string | ./logs/runs | Folder where runs are written, each in a subfolder named after its run id. |
run_id | string | unset | Fixed id for the run. Leave unset to generate a new one each time. |
formats | list of one of json, jsonl | ["json"] | File formats to write: json (one document) and/or jsonl (one line per attempt). |
save_prompts | boolean | true | Include the prompts sent to the target. |
save_responses | boolean | true | Include the target's replies. |
save_traces | boolean | true | Include the search traces of adaptive attacks (every call they made). |
execution.storage
Where results are recorded so they can be browsed later.
| Field | Type | Default | Description |
|---|---|---|---|
backend | one of local, remote | local | local writes to a SQLite file on this machine; remote sends results to the HackAgent server named below, authenticated with the key in the environment variable that api_key_env names. |
base_url | string | unset | Address of the remote server. Required when backend is remote. |
api_key_env | string | unset | Name of the environment variable holding the remote server's API key. Required when backend is remote. |
Examples
Fail fast on an unreachable endpoint, then run several goals at once
execution:
preflight: true
per_attack_timeout: 600
concurrency:
attack: 4
target: 8
judge: 4
Escalate: stop spending attacks on goals that already fell
execution:
escalate: true