Implementation: DESIGN (server) · Exposure: PUBLIC PREVIEW (contract). The Agency API is not live yet. This page describes the published v0.3 contract so you can review and build against it; details may change before alpha.
A campaign is a persistent objective that wakes and drives runs over time. A campaign is not a cron job. It owns an objective, a budget, completion criteria and the logic for deciding when another check is useful. Wake triggers only make a wake eligible; the campaign then decides whether to start a run.
Scheduled waking is off. Campaigns can be created and wake triggers are accepted, but autonomous scheduled waking stays disabled until the API has passed alpha and conformance and an explicit go-live decision is made. Until then every campaign reports scheduling: "disabled_pending_golive", no wake fires, next_wake is null, and manual runs still work. The alpha itself opens only after a run can survive restart, resume, verify, replay and receipt-backed completion.

Endpoints

The Campaign object

Campaign IDs match ^cmp_[A-Za-z0-9]+$.

Status

CampaignStatus. Status is independent of scheduling.

Budget

CampaignBudget: caps for the whole campaign plus a per-run Budget applied to every child run. At least one of max_cost_usd or max_runs is required.

Wake policy

WakePolicy: when the campaign may consider waking. Limits are versioned defaults (defaults_version). Each trigger is a WakeTrigger, one of five variants selected by type:

Attention policy

AttentionPolicy: how attention requests from this campaign’s runs are delivered.

Create a campaign

Only objective is required. Workspace, authority, budget, completion criteria and wake policy resolve from the agent’s and profile’s defaults and are returned on Campaign.resolved before any run is created. There are no hidden permissive defaults: if a safe value cannot be resolved the request fails with ERR_DEFAULTS_UNRESOLVABLE.

Parameters

Request body

CampaignCreate workspace, authority and completion_criteria have the same shape as on a run request. See Create a run.

Responses

Example

List campaigns

Parameters

status takes a comma-separated list.

Responses

CampaignPage:

Example

The example item is shortened. Each item is a full Campaign.

Get a campaign

Parameters

Responses

Example

The response is one Campaign.

List campaign runs

Runs created by this campaign. You can also filter GET /v1/runs with campaign_id.

Parameters

Responses

Example

The response is a RunPage. Each run carries its own campaign_id and its own resolved block.

Pause a campaign

Asynchronous and idempotent. Stops future wakes. Runs already in flight are unaffected unless cascade is true.

Parameters

Request body

Optional. CampaignControlRequest

Responses

Example

The response is the Campaign.

Resume a campaign

Resumes a paused campaign. next_wake is recomputed. This operation takes no request body.

Parameters

Responses

Example

Cancel a campaign

Asynchronous, idempotent and terminal. With cascade (default true) every non-terminal child run is cancelled with run cancel semantics.

Parameters

Request body

Optional. CampaignControlRequest (reason, cascade).

Responses

Example

The response is the Campaign. Its status becomes cancelled once child runs have settled.