Campaigns and cycles

The read side. A campaign owns one or more cycles; a cycle is one run and its rounds. Reads are scoped to the caller: another owner’s campaign and a missing one both answer 404.

Campaigns

Under /api/v1
Method Path What it does
GET /campaigns Every campaign in one store owned by the caller, newest first.
GET /campaigns/{campaign_id} Campaign manifest detail.
GET /campaigns/{campaign_id}/pipeline What this campaign runs.
GET /campaigns/{campaign_id}/checkin Re-open a check-in campaign: its draft and its last resolver turn.
GET /campaigns/{campaign_id}/config-map One campaign’s knob coupling and provenance map.
GET /campaigns/{campaign_id}/storage On-disk size of the campaign tree.
POST /campaigns/{campaign_id}/fork-preview The fork gate’s own verdict, asked without forking.
GET /evidence The evidence behind a subject: a campaign, a course or a candidate.
GET /workspace/storage On-disk size per campaign across the caller’s workspace, fattest first.
GET /workspace/storage-by-dataset On-disk size per dataset, every campaign of it pooled.

GET /campaigns

Answers campaigns, an array, and total. Each entry carries these fields:

campaign_id
dataset_name
label
display_name
id_suffix
line
created_at
updated_at
root_cycle_id
backend_id
backend_type
self_optimization
owner_user_id
lifecycle_status
spend_lifetime
spend_metered
bench
runs_with
comparison

Cycles

Under /api/v1/campaigns/{campaign_id}/cycles/{cycle_id}
Method Path What it does
GET /dashboard Live telemetry for the viewed cycle: its own dashboard.json.
GET /rounds/{n} One closed round, whole. 404 until the round has closed.
GET /rounds/{n}/audit The round’s audit twin: the per-node LLM input and output.
GET /tree The cycle’s candidate tree.
GET /ray One merged, ordered sequence of what happened across this cycle, its forks and its inner runs.
GET /files The file tree of the cycle directory plus the campaign-level artifacts.
GET /file The contents of one file under the cycle or campaign scope.
Under /api/v1
Method Path What it does
GET /cycles Every cycle in one store plus that store’s active pointer.
GET /sessions/active The caller’s active-session pointer: its latest launch from any entry point.

/sessions/active answers tenant_id, campaign_id and cycle_id; the last two are null when no session is active. It never answers 404.

Query parameters

By route
RouteParametersNotes
/campaigns dataset, lifecycle, descend lifecycle is one of active, archived, deleted, checkin, all.
…/dashboard descend, at at re-reads a past moment. Honors If-Modified-Since with a 304.
…/tree lens, samples, at, at_cycle
…/ray limit, before Answers with an ETag.
…/file scope, path scope is cycle or campaign.
/cycles descend, campaign, attached
/evidence subject, dataset subject is campaign:<id>, course:<campaign_id>/<cycle_id> or candidate:…

The same results are on disk as files, and those are the pinned contract. Where runs live