{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "Unique run UUID."
},
"status": {
"type": "string",
"enum": [
"pending",
"running",
"waiting",
"completed",
"failed",
"cancelled"
],
"description": "Current execution state."
},
"project_id": {
"type": "string",
"format": "uuid",
"description": "Project containing the run."
},
"target": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"agent",
"task",
"workflow",
"eval"
],
"description": "Execution definition type."
},
"id": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 512,
"pattern": "^\\S+$",
"description": "Unique identifier for the returned record."
},
{
"type": "null",
"description": "Unique identifier for the returned record."
}
],
"description": "Definition ID; null when unavailable on a historical run."
}
},
"required": [
"type",
"id"
],
"additionalProperties": false,
"description": "Execution definition; its ID may be null only on historical runs."
},
"input": {
"description": "Business input supplied when the run was created."
},
"output": {
"$ref": "#/properties/input",
"description": "Final business output; null until successful finalization."
},
"error": {
"type": "object",
"properties": {
"code": {
"type": "string",
"minLength": 1,
"maxLength": 128,
"description": "Stable failure code."
},
"message": {
"type": "string",
"minLength": 1,
"maxLength": 4000,
"description": "Human-readable failure message."
},
"details": {
"type": "object",
"additionalProperties": {
"$ref": "#/properties/input",
"description": "Additional structured values associated with this result."
},
"description": "Additional failure details."
}
},
"required": [
"code",
"message"
],
"additionalProperties": false,
"description": "Failure details, present only when the run failed."
},
"title": {
"type": "string",
"description": "Display title, omitted when unset."
},
"labels": {
"type": "object",
"additionalProperties": {
"type": "string",
"maxLength": 256,
"description": "Additional structured values associated with this result."
},
"description": "Labels used to organize runs."
},
"parent_run_id": {
"type": "string",
"format": "uuid",
"description": "Immediate parent run ID, present on child runs."
},
"root_run_id": {
"type": "string",
"format": "uuid",
"description": "Top-level ancestor run ID, present on child runs."
},
"created_at": {
"type": "string",
"format": "date-time",
"description": "When the run was accepted."
},
"updated_at": {
"type": "string",
"format": "date-time",
"description": "When the resource last changed, including usage updates."
},
"started_at": {
"type": "string",
"format": "date-time",
"description": "When the first execution attempt started, omitted before execution."
},
"finished_at": {
"type": "string",
"format": "date-time",
"description": "When the run completed, failed or was cancelled."
},
"config": {
"type": "object",
"additionalProperties": {
"$ref": "#/properties/input",
"description": "A JSON value."
},
"description": "Definition-specific execution configuration."
},
"execution": {
"type": "object",
"properties": {
"runtime": {
"anyOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"main_branch"
],
"description": "Runtime selection kind."
}
},
"required": [
"type"
],
"additionalProperties": false,
"description": "Selected main-branch deployment."
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"environment"
],
"description": "Runtime selection kind."
},
"id": {
"type": "string",
"format": "uuid",
"description": "Environment UUID."
}
},
"required": [
"type",
"id"
],
"additionalProperties": false,
"description": "Selected environment."
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"preview_branch"
],
"description": "Runtime selection kind."
},
"id": {
"type": "string",
"format": "uuid",
"description": "Preview branch UUID."
}
},
"required": [
"type",
"id"
],
"additionalProperties": false,
"description": "Selected preview branch."
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"registered"
],
"description": "Runtime selection kind."
},
"id": {
"type": "string",
"minLength": 1,
"maxLength": 128,
"description": "Registered runtime identifier."
}
},
"required": [
"type",
"id"
],
"additionalProperties": false,
"description": "Selected registered runtime."
}
],
"description": "Resolved logical runtime selection; main_branch identifies the selected main-branch deployment, not a worker process."
},
"timeout_seconds": {
"type": "integer",
"exclusiveMinimum": 0,
"description": "Deadline for the whole run in seconds, measured from its first start and including retries."
},
"retry_limit": {
"type": "integer",
"minimum": 0,
"description": "Maximum retries after the first attempt; only retryable failures are retried."
},
"attempt": {
"type": "integer",
"minimum": 1,
"description": "Current or last execution attempt, starting at 1; absent before execution."
},
"exit_code": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null",
"description": "The exit code returned by the tool."
}
],
"description": "Runtime process exit code, or null when no exit code was recorded."
},
"duration_ms": {
"anyOf": [
{
"type": "integer",
"minimum": 0
},
{
"type": "null",
"description": "The duration ms returned by the tool."
}
],
"description": "Elapsed time from first start to finish, including waits and retries; null when not finished."
},
"tool_error_count": {
"type": "integer",
"minimum": 0,
"description": "Recorded failed tool invocations during this run."
},
"logs": {
"type": "string",
"description": "Captured runtime text logs, when available."
},
"start_mode": {
"type": "string",
"description": "Recorded execution start mode, when available."
},
"worker": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "Agent worker ID."
},
"name": {
"type": "string",
"description": "Worker display name, omitted when the worker registered without one."
},
"claimed_at": {
"type": "string",
"format": "date-time",
"description": "When the worker claimed the run."
}
},
"required": [
"id",
"claimed_at"
],
"additionalProperties": false,
"description": "Agent worker that claimed and executed the run; present only on worker-executed runs."
}
},
"additionalProperties": false,
"description": "Resolved execution settings and diagnostics."
},
"control": {
"type": "object",
"properties": {
"waiting": {
"anyOf": [
{
"type": "object",
"properties": {
"resume_at": {
"type": "string",
"format": "date-time",
"description": "Scheduled automatic resume time."
},
"reason": {
"type": "string",
"enum": [
"manual_pause"
],
"description": "Condition required to resume the run."
}
},
"required": [
"reason"
],
"additionalProperties": false,
"description": "Waiting for manual resumption."
},
{
"type": "object",
"properties": {
"resume_at": {
"type": "string",
"format": "date-time",
"description": "Scheduled automatic resume time."
},
"reason": {
"type": "string",
"enum": [
"tool_result"
],
"description": "Condition required to resume the run."
},
"tool_call_id": {
"type": "string",
"minLength": 1,
"maxLength": 128,
"description": "Tool call awaiting a result."
}
},
"required": [
"reason",
"tool_call_id"
],
"additionalProperties": false,
"description": "Waiting for a tool result."
},
{
"type": "object",
"properties": {
"resume_at": {
"type": "string",
"format": "date-time",
"description": "Scheduled automatic resume time."
},
"reason": {
"type": "string",
"enum": [
"integration_connected"
],
"description": "Condition required to resume the run."
},
"integration": {
"type": "string",
"minLength": 1,
"maxLength": 128,
"description": "Integration awaiting connection."
}
},
"required": [
"reason",
"integration"
],
"additionalProperties": false,
"description": "Waiting for an integration connection."
},
{
"type": "object",
"properties": {
"resume_at": {
"type": "string",
"format": "date-time",
"description": "Scheduled automatic resume time."
},
"reason": {
"type": "string",
"enum": [
"approval"
],
"description": "Condition required to resume the run."
},
"wait_id": {
"type": "string",
"minLength": 1,
"maxLength": 128,
"description": "Durable wait identifier."
},
"node_ids": {
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 128
},
"minItems": 1,
"description": "Workflow nodes awaiting approval."
}
},
"required": [
"reason",
"wait_id",
"node_ids"
],
"additionalProperties": false,
"description": "Waiting for workflow approval."
},
{
"type": "object",
"properties": {
"resume_at": {
"type": "string",
"format": "date-time",
"description": "Scheduled automatic resume time."
},
"reason": {
"type": "string",
"enum": [
"event"
],
"description": "Condition required to resume the run."
},
"wait_id": {
"type": "string",
"minLength": 1,
"maxLength": 128,
"description": "Durable wait identifier."
},
"name": {
"type": "string",
"minLength": 1,
"maxLength": 128,
"description": "Event required to resume."
}
},
"required": [
"reason",
"wait_id",
"name"
],
"additionalProperties": false,
"description": "Waiting for a named event."
},
{
"type": "object",
"properties": {
"resume_at": {
"type": "string",
"format": "date-time",
"description": "Scheduled automatic resume time."
},
"reason": {
"type": "string",
"enum": [
"input_request"
],
"description": "Condition required to resume the run."
},
"input_request_ids": {
"type": "array",
"items": {
"type": "string",
"format": "uuid"
},
"minItems": 1,
"description": "Input requests awaiting responses."
}
},
"required": [
"reason",
"input_request_ids"
],
"additionalProperties": false,
"description": "Waiting for input responses."
},
{
"type": "object",
"properties": {
"resume_at": {
"type": "string",
"format": "date-time",
"description": "Scheduled automatic resume time."
},
"reason": {
"type": "string",
"enum": [
"child_run"
],
"description": "Condition required to resume the run."
},
"dependencies": {
"type": "array",
"items": {
"type": "object",
"properties": {
"run_id": {
"type": "string",
"format": "uuid",
"description": "Canonical UUID of the child run."
},
"correlation": {
"anyOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"tool_call"
],
"description": "Child invocation kind."
},
"id": {
"type": "string",
"minLength": 1,
"maxLength": 128,
"description": "Tool call identifier."
}
},
"required": [
"type",
"id"
],
"additionalProperties": false,
"description": "Child started by a tool call."
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"workflow_node"
],
"description": "Child invocation kind."
},
"id": {
"type": "string",
"minLength": 1,
"maxLength": 128,
"description": "Workflow node identifier."
}
},
"required": [
"type",
"id"
],
"additionalProperties": false,
"description": "Child started by a workflow node."
}
]
}
},
"required": [
"run_id",
"correlation"
],
"additionalProperties": false
},
"minItems": 1,
"description": "Child runs that must finish."
}
},
"required": [
"reason",
"dependencies"
],
"additionalProperties": false,
"description": "Waiting for child runs."
},
{
"type": "object",
"properties": {
"resume_at": {
"type": "string",
"format": "date-time",
"description": "Scheduled automatic resume time."
},
"reason": {
"type": "string",
"enum": [
"timer"
],
"description": "Condition required to resume the run."
}
},
"required": [
"resume_at",
"reason"
],
"additionalProperties": false,
"description": "Waiting until the scheduled resume time."
}
],
"description": "The current durable wait, with only the fields required to satisfy that wait."
},
"pause": {
"type": "object",
"properties": {
"requested_at": {
"type": "string",
"format": "date-time",
"description": "Time the pause was requested."
}
},
"required": [
"requested_at"
],
"additionalProperties": false,
"description": "When a pause was requested; control.waiting confirms when execution is paused."
},
"cancellation": {
"type": "object",
"properties": {
"requested_at": {
"type": "string",
"format": "date-time",
"description": "Time cancellation was requested."
},
"stopped_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null",
"description": "The stopped at returned by the tool."
}
],
"description": "Time the runtime confirmed its stop; null until confirmed."
}
},
"required": [
"requested_at",
"stopped_at"
],
"additionalProperties": false
}
},
"additionalProperties": false,
"description": "Pending control requests and the current wait."
},
"task_id": {
"type": "string",
"minLength": 1,
"maxLength": 200,
"description": "Orchestration task ID, distinct from the execution definition."
},
"conversation_id": {
"type": "string",
"format": "uuid",
"description": "Conversation containing the run."
},
"input_message_id": {
"type": "string",
"format": "uuid",
"description": "Conversation message that supplied the input."
},
"output_message_id": {
"type": "string",
"format": "uuid",
"description": "Conversation message containing the result."
},
"batch_id": {
"type": "string",
"format": "uuid",
"description": "Batch containing the run."
},
"trigger": {
"anyOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"user"
]
},
"id": {
"type": "string",
"format": "uuid",
"description": "Unique identifier for the returned record."
}
},
"required": [
"type",
"id"
],
"additionalProperties": false,
"description": "Structured option 1 details associated with this tool result."
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"api_key"
]
},
"id": {
"type": "string",
"minLength": 1,
"maxLength": 128,
"description": "Unique identifier for the returned record."
}
},
"required": [
"type",
"id"
],
"additionalProperties": false,
"description": "Structured option 2 details associated with this tool result."
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"service_account"
]
},
"id": {
"type": "string",
"minLength": 1,
"maxLength": 128,
"description": "Unique identifier for the returned record."
}
},
"required": [
"type",
"id"
],
"additionalProperties": false,
"description": "Structured option 3 details associated with this tool result."
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"system"
]
},
"id": {
"type": "string",
"minLength": 1,
"maxLength": 128,
"description": "Unique identifier for the returned record."
}
},
"required": [
"type",
"id"
],
"additionalProperties": false,
"description": "Structured option 4 details associated with this tool result."
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"schedule"
]
},
"id": {
"type": "string",
"format": "uuid",
"description": "Unique identifier for the returned record."
}
},
"required": [
"type",
"id"
],
"additionalProperties": false,
"description": "Structured option 5 details associated with this tool result."
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"webhook"
]
},
"id": {
"type": "string",
"minLength": 1,
"maxLength": 128,
"description": "Unique identifier for the returned record."
}
},
"required": [
"type",
"id"
],
"additionalProperties": false,
"description": "Structured option 6 details associated with this tool result."
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"agent"
]
},
"id": {
"type": "string",
"minLength": 1,
"maxLength": 512,
"pattern": "^\\S+$",
"description": "Unique identifier for the returned record."
},
"tool_call_id": {
"type": "string",
"minLength": 1,
"maxLength": 128,
"description": "Tool call identifier associated with this result."
}
},
"required": [
"type",
"id"
],
"additionalProperties": false,
"description": "Structured option 7 details associated with this tool result."
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"task"
]
},
"id": {
"type": "string",
"minLength": 1,
"maxLength": 512,
"pattern": "^\\S+$",
"description": "Unique identifier for the returned record."
}
},
"required": [
"type",
"id"
],
"additionalProperties": false,
"description": "Structured option 8 details associated with this tool result."
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"workflow"
]
},
"id": {
"type": "string",
"minLength": 1,
"maxLength": 512,
"pattern": "^\\S+$",
"description": "Unique identifier for the returned record."
},
"node_id": {
"type": "string",
"minLength": 1,
"maxLength": 128
}
},
"required": [
"type",
"id"
],
"additionalProperties": false,
"description": "Structured option 9 details associated with this tool result."
}
],
"description": "How execution was initiated."
},
"usage": {
"type": "object",
"properties": {
"tokens": {
"type": "object",
"properties": {
"input": {
"anyOf": [
{
"type": "integer",
"minimum": 0
},
{
"type": "null",
"description": "The input returned by the tool."
}
],
"description": "Input tokens excluding cache reads and writes."
},
"output": {
"anyOf": [
{
"type": "integer",
"minimum": 0
},
{
"type": "null",
"description": "The output returned by the tool."
}
],
"description": "Output tokens including reasoning."
},
"cache": {
"type": "object",
"properties": {
"read": {
"anyOf": [
{
"type": "integer",
"minimum": 0
},
{
"type": "null",
"description": "The read returned by the tool."
}
],
"description": "Tokens read from the provider cache."
},
"write": {
"anyOf": [
{
"type": "integer",
"minimum": 0
},
{
"type": "null",
"description": "The write returned by the tool."
}
],
"description": "Tokens written to the provider cache."
}
},
"required": [
"read",
"write"
],
"additionalProperties": false,
"description": "Structured cache details associated with this tool result."
},
"reasoning": {
"anyOf": [
{
"type": "integer",
"minimum": 0
},
{
"type": "null",
"description": "The reasoning returned by the tool."
}
],
"description": "Reasoning tokens included in output."
},
"total": {
"anyOf": [
{
"type": "integer",
"minimum": 0
},
{
"type": "null",
"description": "The total returned by the tool."
}
],
"description": "Sum of input, output, cache-read and cache-write tokens."
}
},
"required": [
"input",
"output",
"cache",
"total"
],
"additionalProperties": false,
"description": "Input excludes cache reads/writes; output includes reasoning. Total is input + output + cache.read + cache.write. Null means unknown, never zero."
},
"cost": {
"type": "object",
"properties": {
"currency": {
"type": "string",
"enum": [
"EUR"
],
"description": "Currency of reference usage value and provider costs."
},
"status": {
"type": "string",
"enum": [
"estimated",
"posted",
"unavailable"
],
"description": "Whether charges are estimated, posted or unavailable."
},
"provider": {
"anyOf": [
{
"type": "string",
"pattern": "^-?\\d+(\\.\\d{1,8})?$"
},
{
"type": "null",
"description": "The provider returned by the tool."
}
],
"description": "Recorded provider USD cost converted to EUR at the catalog reference rate; null when unknown."
},
"platform": {
"anyOf": [
{
"$ref": "#/properties/usage/properties/cost/properties/provider/anyOf/0",
"description": "The platform returned by the tool."
},
{
"type": "null",
"description": "The platform returned by the tool."
}
],
"description": "Reference usage value minus estimated provider cost; null when either amount is unknown."
},
"total": {
"anyOf": [
{
"$ref": "#/properties/usage/properties/cost/properties/provider/anyOf/0",
"description": "The total returned by the tool."
},
{
"type": "null",
"description": "The total returned by the tool."
}
],
"description": "Billed credits valued at EUR 0.10 per credit, independent of subscription or purchase discounts."
},
"credits": {
"anyOf": [
{
"$ref": "#/properties/usage/properties/cost/properties/provider/anyOf/0",
"description": "The credits returned by the tool."
},
{
"type": "null",
"description": "The credits returned by the tool."
}
],
"description": "Billed credit units."
}
},
"required": [
"currency",
"status",
"provider",
"platform",
"total",
"credits"
],
"additionalProperties": false,
"description": "Estimated EUR usage value before tax: total values billed credits at EUR 0.10 each; provider converts recorded USD cost at the catalog reference rate; platform is total minus provider and can be negative. These amounts are visible to authorized run readers and do not represent invoice charges or actual purchase prices. Descendants sum the same per-run amounts. Credits are exact billed units. Signed decimal strings have at most eight fractional digits. Unknown provider costs leave provider and platform null. Status is independent of token capture; unavailable requires all amounts null. Posted amounts come from the billing ledger and may change through later adjustments."
},
"model_calls": {
"anyOf": [
{
"type": "integer",
"minimum": 0
},
{
"type": "null",
"description": "The model calls returned by the tool."
}
],
"description": "Billed provider call count."
},
"capture_status": {
"type": "string",
"enum": [
"complete",
"partial",
"missing"
],
"description": "Token capture coverage."
}
},
"required": [
"tokens",
"cost",
"capture_status"
],
"additionalProperties": false,
"description": "Usage when available; unknown measurements are null."
},
"descendants": {
"type": "object",
"properties": {
"total": {
"type": "integer",
"minimum": 0,
"description": "Total descendants at every depth."
},
"active": {
"type": "integer",
"minimum": 0,
"description": "Descendants that are pending, running or waiting."
},
"has_failures": {
"type": "boolean",
"description": "Whether any descendant has failed."
},
"usage": {
"$ref": "#/properties/usage",
"description": "Aggregate usage of every descendant, excluding this run."
}
},
"required": [
"total",
"active",
"has_failures"
],
"additionalProperties": false,
"description": "Counts and usage across all descendant runs, excluding this run."
},
"artifacts": {
"type": "array",
"items": {
"type": "object",
"properties": {
"artifact_id": {
"type": "string",
"minLength": 1,
"maxLength": 128,
"description": "Immutable artifact identifier."
},
"type": {
"type": "string",
"minLength": 1,
"description": "Artifact kind."
},
"media_type": {
"type": "string",
"minLength": 1,
"description": "File media type."
},
"size_bytes": {
"type": "integer",
"minimum": 0,
"description": "File size in bytes."
},
"sha256": {
"type": "string",
"pattern": "^[a-f0-9]{64}$",
"description": "SHA-256 digest of the file."
},
"href": {
"type": "string",
"format": "uri",
"description": "Authorized artifact URL."
}
},
"required": [
"artifact_id",
"type",
"media_type",
"size_bytes",
"sha256",
"href"
],
"additionalProperties": false,
"description": "An immutable file reference authorized through the run’s project and conversation permissions."
},
"description": "Files produced by the run."
},
"schemas": {
"type": "object",
"properties": {
"input": {
"anyOf": [
{
"type": "object",
"properties": {
"schema": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "object",
"additionalProperties": {
"$ref": "#/properties/input",
"description": "A JSON value."
},
"description": "Structured option 2 details associated with this tool result."
}
],
"description": "JSON Schema captured for this run; object schemas and boolean schemas are supported."
},
"sha256": {
"type": "string",
"pattern": "^[a-f0-9]{64}$",
"description": "SHA-256 digest of the pinned schema."
}
},
"required": [
"schema",
"sha256"
],
"additionalProperties": false,
"description": "Structured input details associated with this tool result."
},
{
"type": "null",
"description": "The input returned by the tool."
}
]
},
"output": {
"anyOf": [
{
"type": "object",
"properties": {
"schema": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "object",
"additionalProperties": {
"$ref": "#/properties/input",
"description": "A JSON value."
},
"description": "Structured option 2 details associated with this tool result."
}
],
"description": "JSON Schema captured for this run; object schemas and boolean schemas are supported."
},
"sha256": {
"type": "string",
"pattern": "^[a-f0-9]{64}$",
"description": "SHA-256 digest of the pinned schema."
}
},
"required": [
"schema",
"sha256"
],
"additionalProperties": false,
"description": "Structured output details associated with this tool result."
},
{
"type": "null",
"description": "The output returned by the tool."
}
]
}
},
"required": [
"input",
"output"
],
"additionalProperties": false,
"description": "Pinned schemas for business input and output; null means no declared schema."
},
"metadata": {
"type": "object",
"additionalProperties": {
"$ref": "#/properties/input",
"description": "A JSON value."
},
"description": "Additional resource metadata."
}
},
"required": [
"id",
"status",
"project_id",
"target",
"input",
"output",
"created_at",
"updated_at"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "Structured result returned by the fail_run tool."
}