Schema
CycleResponse
Cycle response model.
| Field | Type | Description |
|---|---|---|
idrequired | string (uuid) | Cycle UUID |
permakey | string | null | Stable human-readable cycle key for the deep-link URL /workstreams/{ws}/cycles/{permakey}/instance/{task}. Null on legacy rows. |
workstream_id | string (uuid) | null | Parent workstream UUID. Populated for every cycle launched against a workstream definition; only null for legacy agentic/v2 cycles that have no workstream parent. |
workstream_permakey | string | null | Parent workstream's stable human-readable key (workstreams.workstream.permakey), resolved by joining on the same COALESCE(cycle.workstream_id, blueprint.workstream_id) that backs workstream_id. Lets the list/detail surfaces build the permakey-prefixed deep link /workstreams/{workstream_permakey}/cycles/{permakey} without a second fetch. Null when no workstream parent resolves (legacy agentic/v2 cycles, or a workstream that no longer exists). |
workstream_slug | string | null | Parent workstream's URL slug (workstreams.workstream.slug), resolved via the same join as workstream_permakey. Null when no workstream parent resolves. |
blueprint_id | string (uuid) | null | Workplan UUID (null for agentic cycles) |
blueprint_name | string | null | Workplan name (from join) |
client_id | string (uuid) | null | Client UUID (from workplan join) |
client_name | string | null | Client name (from workplan join) |
statusrequired | "created" | "planning" | "queued" | "running" | "paused" | "blocked" | "completed" | "failed" | "cancelled" | "skipped" | Status for execution cycles - matches DB check constraint.createdplanningqueuedrunningpausedblockedcompletedfailedcancelledskipped |
progress_pct | number | Progress percentage (computed) |
blueprint_snapshot | object | Workplan snapshot at cycle startshow nestedEmpty object. |
error_context | object | null | Error context if failed |
started_at | string (date-time) | null | Start timestamp |
completed_at | string (date-time) | null | Completion timestamp |
started_by | string (uuid) | null | Initiator user ID (started_by in DB) |
created_atrequired | string (date-time) | Creation timestamp |
updated_atrequired | string (date-time) | Last update timestamp |
current_step_name | string | null | Name of the currently active or next pending step |
completed_steps | integer | Number of completed/approved/skipped steps |
total_steps | integer | Total number of steps in cycle |
customer_cost_gbp | number | null | Customer-facing cost in GBP: £19/hr x elapsed time since cycle start. NULL when the cycle has not yet started. Uses completed_at if available, otherwise current wall-clock time. Distinct from cost_cents_total which tracks REAL compute token cost. |
cost_cents_total | integer | null | Real total compute (token) cost across all steps, in pence (SUM of workstreams.task.cost_cents). NULL when no step recorded a cost. Distinct from the hourly customer_cost_gbp price field. |
cost_gbp_total | number | null | Real total compute cost across all steps in GBP (cost_cents_total / 100). |
tokens_total_input | integer | null | Total input tokens across all steps. NULL when none recorded. |
tokens_total_output | integer | null | Total output tokens across all steps. NULL when none recorded. |
artifacts | CycleArtifactSummary[] | Artifacts produced by this cycle (workstreams.cycle_artifact, non-deleted), newest first, each with a download_url. Surfaced at CYCLE level — step→artifact attribution is a follow-up. Empty when the cycle produced no artifacts.item shape |
input_data | object | Launch inputs the cycle was started with (period, file refs, run_mode, etc.), read from workstreams.cycle.runtime_vars — the canonical input dict written verbatim on both the inline and containerized launch paths. Empty when the cycle has no recorded launch inputs. Within-workspace only (the endpoint is FGA- + workspace-scoped); redact file names / conversation_id before surfacing this on any cross-org surface.show nestedEmpty object. |