Skip to main content

Runs and reports

Runs: a campaign run (a parent run) and its attack runs (child runs). Read their status and results, cancel and delete them, read the campaign run reports the dashboard shows (summary, goals, matrix, attempts, costs, comparison) and, for executors, the claim, heartbeat, report and finish protocol.

📄️Claim a queued run

Executor protocol. Claims a queued campaign run for the caller, which then executes it: a `local` run with an API key or login token of the run's organization (`hackagent run <id>` does this), a `cloud` run with the cloud worker's token only. The run becomes `RUNNING`. A cloud claim also returns the run's token (`run_token`) and the values of the secrets its spec references (`env`); a cloud run that can no longer run (its spec, endpoints or secrets changed) is failed instead. 409 when the run is no longer queued, says who has it, or when its organization has no free cloud slot.

📄️List a campaign run's goals

Returns the goals of a campaign run with their verdict and each attack run's outcome on them, ordered by goal index. Filter by `goal_index`, `category`, `subcategory`, `verdict` or a `search` in the goal text, and narrow to one attack run with `run_id`. Paginated with `page` and `page_size` (at most 1000). Accepts a login token or an API key (not a run token). Every response has a weak `ETag`: send it back as `If-None-Match` to get `304` without a body while nothing changed.

📄️Get a campaign run's report

Returns the full report of a campaign run: its summary and spec, each attack run with its own outcomes, the breakdowns by technique and by goal category, the judge audit, and the summary of the latest earlier completed run of the same campaign. With `run_id`, the outcomes cover that attack run only. Accepts a login token or an API key (not a run token). Every response has a weak `ETag`: send it back as `If-None-Match` to get `304` without a body while nothing changed.

📄️List campaign runs with their verdicts

Returns the caller's campaign runs (parent runs only), newest first, each with its goal verdicts over all its attack runs: how many goals were jailbroken, mitigated or are unresolved. Filter by `campaign`, `agent` or `status`; a malformed id matches nothing. Paginated with `page` and `page_size` (at most 100). This is the dashboard's run list. Accepts a login token or an API key (not a run token). Every response has a weak `ETag`: send it back as `If-None-Match` to get `304` without a body while nothing changed.