Read run events
Read the CloudEvents ledger or subscribe to live events.
Read the CloudEvents ledger or subscribe to live events. Return a CloudEvents ledger page by default; Accept: text/event-stream opens a live stream with ai.praxis.automation.run.status, ai.praxis.automation.run.progress, ai.praxis.automation.call.started, ai.praxis.automation.call.completed, ai.praxis.automation.task.started, ai.praxis.automation.task.completed and ai.praxis.automation.wait.created, ai.praxis.automation.wait.resolved event names. id is the resume cursor and Last-Event-ID takes precedence over cursor; : ping arrives every 20 seconds and event: end closes the stream after a terminal run.
GET /automation/v1/runs/{id}/events
Authentication
Authorization: Bearer $PRAXIS_API_KEY
Request fields
| Parameter | Type | Description |
|---|---|---|
| path: id | string | required; Run ID (run_). |
| query: limit | integer | optional; Page size: integer 1–100, default 50. minimum: 1; maximum: 100 |
| query: cursor | string | optional; Opaque next_cursor from the previous page; keep the original filters when paging. |
| header: Accept | "application/json" / "text/event-stream" | optional; application/json (default) reads a ledger page; text/event-stream subscribes to the live stream. |
| header: Last-Event-ID | string | optional; SSE resume cursor; read entries after this event. Takes precedence over cursor and applies only to streams. |
Examples
Set these environment variables to your own resources:
| Variable | Source |
|---|---|
| RUN_ID | Run id; suspend/resume require a workflow; cancel requires a nonterminal run |
: "${RUN_ID:?Set RUN_ID}"
curl --fail-with-body -X GET "https://api.deepraxis.ai/automation/v1/runs/${RUN_ID}/events" \
-H "Authorization: Bearer $PRAXIS_API_KEY" \
-H "Accept: text/event-stream"import { createAutomationClient } from '@deepraxis/sdk/automation';
function env(name: string): string {
const value = process.env[name];
if (!value) throw new Error(`Set ${name}`);
return value;
}
const automation = createAutomationClient({
apiKey: env('PRAXIS_API_KEY'),
baseUrl: 'https://api.deepraxis.ai',
maxRetries: 0,
timeoutMs: 90_000,
});
for await (const event of automation.runs.events({
"path": {
"id": env("RUN_ID")
}
})) {
console.log(event);
}Response
HTTP 200
Success
application/json
| Field | Type | Description |
|---|---|---|
| data | object / object / object / object / object[] | required; Ledger events (RunEvent) on this page, in ledger order. |
| data[] (variant 1).type | "ai.praxis.automation.run.status" | required; Event type: always ai.praxis.automation.run.status, the run status changed; data is the full run. |
| data[] (variant 1).data | object | required; Full state of one run: target, status, input and output, error, initiator, position in the run tree and its timestamps. no additional fields. |
| data[] (variant 1).data.id | string | required; Opaque run_ ID. New non-deterministic IDs have 78 characters: run_ + 10-character base36 millisecond timestamp + 64-character hexadecimal DO ID. Legacy random IDs have 46 characters; historical and deterministic IDs remain valid. Same-millisecond creation order is not guaranteed. |
| data[] (variant 1).data.kind | "script" / "workflow" | required; Orchestration kind. script is a TypeScript script that executes once; workflow is a YAML workflow made of steps that can wait for events, timers or child runs and can be suspended. |
| data[] (variant 1).data.number | null / number | required; Increasing sequence number of the run within its script or workflow; null for ad-hoc runs. |
| data[] (variant 1).data.definition | null / object | required; The script or workflow {namespace, name} the run belongs to; null for ad-hoc runs created with source. |
| data[] (variant 1).data.definition (variant 2).namespace | string | required; Namespace of the script or workflow. |
| data[] (variant 1).data.definition (variant 2).name | string | required; Name of the script or workflow. |
| data[] (variant 1).data.target | null / string | required; The target string as supplied at creation (for example acme/report@latest); null for ad-hoc runs. |
| data[] (variant 1).data.resolved_version | null / string | required; Exact version the target resolved to; null for ad-hoc runs. |
| data[] (variant 1).data.source_digest | null / string | required; Digest of the source of an ad-hoc run, usable to read that source; null for runs started from a published definition. |
| data[] (variant 1).data.language | "ts" / "yaml" | required; Source language. ts is a TypeScript script; yaml is workflow YAML. |
| data[] (variant 1).data.status | "running" / "completed" / "faulted" / "cancelled" / "pending" / "waiting" / "suspended" | required; Run status. pending is created but not started; running is executing; waiting means a workflow is waiting on an event, timer or child run; suspended means a workflow was suspended; cancelled was cancelled; faulted failed and error says why; completed finished successfully and output holds the result. The last three are terminal. |
| data[] (variant 1).data.progress | null / object | required; Latest progress reported by the run as {label, current, total, updated_at}; null if none was reported. |
| data[] (variant 1).data.progress (variant 2).label | string | required; Short progress label, such as the current stage. |
| data[] (variant 1).data.progress (variant 2).current | null / number | required; Amount completed so far, or null if not reported. |
| data[] (variant 1).data.progress (variant 2).total | null / number | required; Total amount, or null when unknown. |
| data[] (variant 1).data.progress (variant 2).updated_at | string | required; Time progress was last updated (RFC 3339 UTC). |
| data[] (variant 1).data.current_wait | null / object | required; The wait point the run is currently blocked on, or null when it is not waiting. |
| data[] (variant 1).data.current_wait (variant 2).id | string | required; Wait point id, prefixed wait_; use it as wait_id when completing an event wait. |
| data[] (variant 1).data.current_wait (variant 2).run_id | string | required; Id (run_) of the run this wait belongs to. |
| data[] (variant 1).data.current_wait (variant 2).kind | "event" / "timer" / "child" | required; Wait kind. event waits for an external event that can be submitted with runs.completeWait; timer waits until resume_at; child waits for a child run to finish. |
| data[] (variant 1).data.current_wait (variant 2).state | "cancelled" / "open" / "resolved" / "expired" | required; Wait point state. open is still waiting; resolved was satisfied; expired passed its expires_at; cancelled was cancelled and can no longer be satisfied. |
| data[] (variant 1).data.current_wait (variant 2).task | null / object | required; The workflow step {reference, name} that produced the wait; null when there is no such step. |
| data[] (variant 1).data.current_wait (variant 2).task (variant 2).reference | string | required; JSON Pointer of the step, for example /do/2/wait_payment. |
| data[] (variant 1).data.current_wait (variant 2).task (variant 2).name | string | required; Step name, the key in the workflow YAML. |
| data[] (variant 1).data.current_wait (variant 2).resume_at | null / string | required; For kind=timer, the instant the run resumes (RFC 3339 UTC); null for other kinds. |
| data[] (variant 1).data.current_wait (variant 2).event_type | null / string | required; For kind=event, the event type being awaited; null for other kinds. |
| data[] (variant 1).data.current_wait (variant 2).child_run_id | null / string | required; For kind=child, the id of the child run being awaited; null for other kinds. |
| data[] (variant 1).data.current_wait (variant 2).created_at | string | required; Time the wait point was created (RFC 3339 UTC). |
| data[] (variant 1).data.current_wait (variant 2).expires_at | null / string | required; Time the wait point expires (RFC 3339 UTC), or null if it has no deadline. |
| data[] (variant 1).data.current_wait (variant 2).resolved_at | null / string | required; Time the wait point was resolved (RFC 3339 UTC), or null if still open. |
| data[] (variant 1).data.counters | object | required; Cumulative counters of a run. no additional fields. |
| data[] (variant 1).data.counters.calls | number | required; Total number of calls the script made. |
| data[] (variant 1).data.counters.action_calls | number | required; How many of those calls invoked actions. |
| data[] (variant 1).data.counters.child_runs | number | required; Number of child runs started. |
| data[] (variant 1).data.counters.tasks_completed | number | required; Number of workflow steps completed. |
| data[] (variant 1).data.counters.tasks_total | null / number | required; Number of top-level steps in the workflow; null for script runs. |
| data[] (variant 1).data.input | null / string / number / boolean / object / JSON[] | required; Any JSON value: null, boolean, number, string, array or object. |
| data[] (variant 1).data.input (variant 5).* | null / string / number / boolean / object / JSON[] | Recursive JSON value. |
| data[] (variant 1).data.input (variant 6)[] | null / string / number / boolean / object / JSON[] | Recursive JSON value. |
| data[] (variant 1).data.output | null / string / number / boolean / object / JSON[] | required; Any JSON value: null, boolean, number, string, array or object. |
| data[] (variant 1).data.output (variant 5).* | null / string / number / boolean / object / JSON[] | Recursive JSON value. |
| data[] (variant 1).data.output (variant 6)[] | null / string / number / boolean / object / JSON[] | Recursive JSON value. |
| data[] (variant 1).data.error | null / object | required; Error details when the run faulted; null otherwise. |
| data[] (variant 1).data.error (variant 2).type | string | required; Platform error category, or the verbatim URI defined by a workflow raise. |
| data[] (variant 1).data.error (variant 2).code | null / string | required; Stable error code callers can branch on, or null. |
| data[] (variant 1).data.error (variant 2).title | string | required; Short error title. |
| data[] (variant 1).data.error (variant 2).detail | null / string | required; Detailed explanation of the error, or null. |
| data[] (variant 1).data.error (variant 2).source | null / object | required; Where the error happened: a workflow step or script call; null when unknown. |
| data[] (variant 1).data.error (variant 2).source (variant 2).kind | "call" / "task" | required; Location kind. task is a workflow step; call is a call in a script. |
| data[] (variant 1).data.error (variant 2).source (variant 2).reference | string | optional; For task: the JSON Pointer of the failing step. |
| data[] (variant 1).data.error (variant 2).source (variant 2).seq | number | optional; For call: sequence number of the failing call (matches Call.seq). |
| data[] (variant 1).data.error (variant 2).source (variant 2).action | object | optional; The failing action {name, revision}; present only when the error came from an action. no additional fields. |
| data[] (variant 1).data.error (variant 2).source (variant 2).action.name | string | required; Full action name, ns/name. |
| data[] (variant 1).data.error (variant 2).source (variant 2).action.revision | string | required; Id (actr_) of the action revision that ran. |
| data[] (variant 1).data.error (variant 2).request_id | string / null | optional; X-Request-Id of the downstream response that caused the failure; null or omitted when unavailable. |
| data[] (variant 1).data.error (variant 2).errors | object[] | optional; Field validation errors with RFC 6901 pointers and Chinese correction details. |
| data[] (variant 1).data.error (variant 2).errors[].pointer | string | required; RFC 6901 field pointer. TypeScript source diagnostics use /source for scripts or /implementation/source for actions; line/column are separate, not pointer segments. |
| data[] (variant 1).data.error (variant 2).errors[].detail | string | required; Chinese correction text saying what is wrong at this location and how to fix it. |
| data[] (variant 1).data.error (variant 2).errors[].hint | string | optional; Optional extra hint giving an actionable next step, such as using a different endpoint. |
| data[] (variant 1).data.error (variant 2).errors[].line | integer | optional; Line number, 1-based; present only when a source location is available. minimum: 1 |
| data[] (variant 1).data.error (variant 2).errors[].column | integer | optional; Column number, 1-based; present only when a source location is available. minimum: 1 |
| data[] (variant 1).data.error (variant 2).status | number | optional; Optional HTTP-style status declared by a workflow raise; platform errors may omit it. |
| data[] (variant 1).data.initiator | object | required; Principal {type, id} injected by the gateway that says who initiated or acted. This service does not resolve names; the console resolves them in batches. no additional fields. |
| data[] (variant 1).data.initiator.type | "user" / "api_key" / "agent" / "run" / "trigger" | required; Principal type. user is a signed-in user; api_key is a platform API key; agent is an agent; run is an action performed by a run itself (for example a parent run); trigger is a trigger. |
| data[] (variant 1).data.initiator.id | string | required; Principal identifier whose meaning follows type: a user, API key, agent, run or trigger id. Treat it as an opaque string. |
| data[] (variant 1).data.channel | "run" / "console" / "api" / "internal" / "trigger" | required; Entry channel of the request. console is the console (through its BFF); api is a public API call; internal is an internal platform call; run is a child run created by another run; trigger is started by a trigger. |
| data[] (variant 1).data.owner | string | required; Tenant that owns the run, injected by the gateway; treat it as an opaque string. |
| data[] (variant 1).data.parent | null / object | required; The parent run {id, number, definition} that derived this run, or null for root runs. |
| data[] (variant 1).data.parent (variant 2).id | string | required; Id (run_) of the parent run. |
| data[] (variant 1).data.parent (variant 2).number | null / number | required; Sequence number of the parent run within its definition; null when the parent is ad-hoc. |
| data[] (variant 1).data.parent (variant 2).definition | null / object | required; Script or workflow {namespace, name} of the parent run; null for an ad-hoc parent. |
| data[] (variant 1).data.parent (variant 2).definition (variant 2).namespace | string | required; Namespace of the parent run's definition. |
| data[] (variant 1).data.parent (variant 2).definition (variant 2).name | string | required; Name of the parent run's definition. |
| data[] (variant 1).data.parent_run_id | string / null | required; ID of the parent run that derived this run; null for root runs |
| data[] (variant 1).data.root_run_id | string | required; Id of the root run of this run tree; a root run points to itself. |
| data[] (variant 1).data.depth | number | required; Depth in the run tree: 0 for the root run, plus 1 per child level, at most 10. |
| data[] (variant 1).data.attach | null / "wait" / "detach" | required; Relationship of a child run to its parent. wait means the parent waits for the child and the child's deadline is not later than the parent's; detach means the parent does not wait and the child is not cancelled when the parent is; null for root runs. |
| data[] (variant 1).data.deadline_at | string | required; Deadline of the run (RFC 3339 UTC): creation time plus deadline_seconds (scripts default to and are capped at 300 seconds; workflows default to 86400 and are capped at 604800), and an awaited child ends at least 1 second before its parent's deadline. |
| data[] (variant 1).data.created_at | string | required; Time the run was created (RFC 3339 UTC). |
| data[] (variant 1).data.started_at | null / string | required; Time execution started (RFC 3339 UTC), or null while still queued. |
| data[] (variant 1).data.ended_at | null / string | required; Time the run reached a terminal status (RFC 3339 UTC), or null while it is still active. |
| data[] (variant 1).data.updated_at | string | required; Time the run record was last updated (RFC 3339 UTC). |
| data[] (variant 1).data.heartbeat_at | null / string | required; Time of the executor's last liveness signal (RFC 3339 UTC), or null before the run starts. |
| data[] (variant 1).data.cancel_requested_at | null / string | required; Time the cancellation was requested (RFC 3339 UTC), or null. |
| data[] (variant 1).data.cancelled_by | null / object | required; Principal that requested cancellation, or null if not cancelled or not requested by a principal. |
| data[] (variant 1).data.cancelled_by (variant 2).type | "user" / "api_key" / "agent" / "run" / "trigger" | required; Principal type. user is a signed-in user; api_key is a platform API key; agent is an agent; run is an action performed by a run itself (for example a parent run); trigger is a trigger. |
| data[] (variant 1).data.cancelled_by (variant 2).id | string | required; Principal identifier whose meaning follows type: a user, API key, agent, run or trigger id. Treat it as an opaque string. |
| data[] (variant 1).data.cancel_reason | null / "user" / "parent_cancelled" / "deadline" / "executor_lost" | required; Why the run was cancelled. user is a user request; parent_cancelled is a cascade from a cancelled parent run; deadline means the deadline passed; executor_lost means the executor was lost; null if not cancelled. |
| data[] (variant 1).data.suspend_requested_at | null / string | required; Time suspension of the workflow was requested (RFC 3339 UTC), or null. |
| data[] (variant 1).data.suspended_by | null / object | required; Principal that requested suspension, or null. |
| data[] (variant 1).data.suspended_by (variant 2).type | "user" / "api_key" / "agent" / "run" / "trigger" | required; Principal type. user is a signed-in user; api_key is a platform API key; agent is an agent; run is an action performed by a run itself (for example a parent run); trigger is a trigger. |
| data[] (variant 1).data.suspended_by (variant 2).id | string | required; Principal identifier whose meaning follows type: a user, API key, agent, run or trigger id. Treat it as an opaque string. |
| data[] (variant 1).data.queued_ms | null / number | required; Milliseconds between creation and the start of execution; null until the run starts. |
| data[] (variant 1).data.run_ms | null / number | required; Milliseconds spent executing, excluding time spent waiting on wait points; fixed once the run ends. |
| data[] (variant 1).data.wait_ms | null / number | required; Total milliseconds spent waiting on wait points; null before any wait. |
| data[] (variant 1).data.usage | object / null | required; Returned only in single-run details (including expand); null in lists. Runs themselves are free; these are actual charges for capabilities such as models and search called during the run, attributed by call. Unrated usage is included later. Aggregation failure or timeout (1.5 seconds) returns null while details still return 200. |
| data[] (variant 1).data.usage (variant 1).currency | "USD" | required; Charge currency, always USD. |
| data[] (variant 1).data.usage (variant 1).cost | string | required; Rated actual charges for this run alone, excluding descendants, as an exact dollar decimal string with six fractional digits; 0.000000 when there is no usage. pattern: "^[0-9]+\.[0-9]{6}$" |
| data[] (variant 1).data.usage (variant 1).pending_events | integer | required; Number of this run's own unrated usage events whose charges will be included later. minimum: 0 |
| data[] (variant 1).data.usage (variant 1).by_service | object[] | required; This run's actual charges grouped by service, each with service and cost (a six-decimal dollar string); empty when there is no usage. |
| data[] (variant 1).data.usage (variant 1).by_service[].service | string | required; Name of the service that incurred the usage, for example router or search. |
| data[] (variant 1).data.usage (variant 1).by_service[].cost | string | required; Rated actual charges for that service as an exact dollar decimal string with six fractional digits. pattern: "^[0-9]+\.[0-9]{6}$" |
| data[] (variant 1).data.usage (variant 1).tree_cost | string / null | required; Rated actual charges for the entire run tree including the root, as a six-decimal dollar string; null for child runs. |
| data[] (variant 1).data.rerun_of | null / string | required; If this run was created by re-running another run, that run's id (run_); otherwise null. |
| data[] (variant 1).data.labels | object | required; User labels and system labels; trigger runs support 64 user labels, excluding system labels. |
| data[] (variant 1).data.trigger | object / null | required; Trigger {id, name} that started this run, or null when it was not started by a trigger. |
| data[] (variant 1).data.trigger (variant 1).id | string | required; Id (trg_) of the trigger that started this run. |
| data[] (variant 1).data.trigger (variant 1).name | string | required; Name of the trigger that started this run. |
| data[] (variant 1).data.cancel_message | string / null | required; User cancellation note (1–500 characters), or null when omitted. The cancel_reason enum is unchanged. |
| data[] (variant 1).data.input_truncated | boolean | optional; True when the list omits blob-backed input, setting input to null; inline values remain intact and run details return the full value. |
| data[] (variant 1).data.output_truncated | boolean | optional; True when the list omits blob-backed output, setting output to null; inline values remain intact and run details return the full value. |
| data[] (variant 1).specversion | "1.0" | required; CloudEvents specification version, always 1.0. |
| data[] (variant 1).id | string | required; Event id, unique within the run's ledger. |
| data[] (variant 1).source | string | required; Event source, of the form /automation/v1/runs/{id}. |
| data[] (variant 1).time | string | required; Time the event occurred (RFC 3339 UTC). |
| data[] (variant 1).cursor | string | required; Event cursor; use it as cursor to page, or as Last-Event-ID to resume an SSE stream. |
| data[] (variant 1).seq | number | required; Position of the event in the run's ledger, strictly increasing. |
| data[] (variant 2).type | "ai.praxis.automation.run.progress" | required; Event type: always ai.praxis.automation.run.progress, the run reported new progress; data is the progress. |
| data[] (variant 2).data | object | required; Progress reported by a run: a label, the amount completed and the total. no additional fields. |
| data[] (variant 2).data.label | string | required; Short progress label, such as the current stage. |
| data[] (variant 2).data.current | null / number | required; Amount completed so far, or null if not reported. |
| data[] (variant 2).data.total | null / number | required; Total amount, or null when unknown. |
| data[] (variant 2).data.updated_at | string | required; Time progress was last updated (RFC 3339 UTC). |
| data[] (variant 2).specversion | "1.0" | required; CloudEvents specification version, always 1.0. |
| data[] (variant 2).id | string | required; Event id, unique within the run's ledger. |
| data[] (variant 2).source | string | required; Event source, of the form /automation/v1/runs/{id}. |
| data[] (variant 2).time | string | required; Time the event occurred (RFC 3339 UTC). |
| data[] (variant 2).cursor | string | required; Event cursor; use it as cursor to page, or as Last-Event-ID to resume an SSE stream. |
| data[] (variant 2).seq | number | required; Position of the event in the run's ledger, strictly increasing. |
| data[] (variant 3).type | "ai.praxis.automation.call.started" / "ai.praxis.automation.call.completed" | required; Event type. ai.praxis.automation.call.started means a call started; ai.praxis.automation.call.completed means a call ended, successfully or not; data is the call record. |
| data[] (variant 3).data | object | required; Record of one call made during a script run (an action, platform API, script or workflow), ordered by seq. no additional fields. |
| data[] (variant 3).data.id | string | required; Call id, prefixed call_. |
| data[] (variant 3).data.run_id | string | required; Id (run_) of the script run that made the call. |
| data[] (variant 3).data.seq | number | required; Position of the call within the run, increasing in call order; together with run_id it locates the call. |
| data[] (variant 3).data.target | object | required; The target that was called: {kind, name, revision?, version?}. no additional fields. |
| data[] (variant 3).data.target.kind | "action" / "script" / "workflow" / "platform_api" | required; Target kind. action is an action; platform_api is a platform API operation; script is a script; workflow is a workflow. |
| data[] (variant 3).data.target.name | string | required; Target name: ns/name for an action, the operation name for a platform API, ns/name for a script or workflow. |
| data[] (variant 3).data.target.revision | string | optional; Id (actr_) of the action revision that executed; present only for action calls. |
| data[] (variant 3).data.target.version | string | optional; Exact version that ran; present only for script and workflow calls. |
| data[] (variant 3).data.args_preview | string | required; Single-line preview of the call arguments, truncated on the server; payloads over 32 KB are kept in object storage rather than inline. |
| data[] (variant 3).data.result_preview | null / string | required; Single-line preview of the returned value, truncated on the server; null until the call ends. |
| data[] (variant 3).data.status | "running" / "completed" / "faulted" / "cancelled" | required; Call status. running means still executing; completed means it returned normally; faulted means it failed and error explains why; cancelled means it was stopped because the run was cancelled. |
| data[] (variant 3).data.started_at | string | required; Time the call started (RFC 3339 UTC). |
| data[] (variant 3).data.ended_at | null / string | required; Time the call ended (RFC 3339 UTC), or null while it is running. |
| data[] (variant 3).data.duration_ms | null / number | required; Milliseconds from start to end, or null while the call is running. |
| data[] (variant 3).data.error | null / object | required; Error details when the call failed; null if it succeeded or is still running. |
| data[] (variant 3).data.error (variant 2).type | string | required; Platform error category, or the verbatim URI defined by a workflow raise. |
| data[] (variant 3).data.error (variant 2).code | null / string | required; Stable error code callers can branch on, or null. |
| data[] (variant 3).data.error (variant 2).title | string | required; Short error title. |
| data[] (variant 3).data.error (variant 2).detail | null / string | required; Detailed explanation of the error, or null. |
| data[] (variant 3).data.error (variant 2).source | null / object | required; Where the error happened: a workflow step or script call; null when unknown. |
| data[] (variant 3).data.error (variant 2).source (variant 2).kind | "call" / "task" | required; Location kind. task is a workflow step; call is a call in a script. |
| data[] (variant 3).data.error (variant 2).source (variant 2).reference | string | optional; For task: the JSON Pointer of the failing step. |
| data[] (variant 3).data.error (variant 2).source (variant 2).seq | number | optional; For call: sequence number of the failing call (matches Call.seq). |
| data[] (variant 3).data.error (variant 2).source (variant 2).action | object | optional; The failing action {name, revision}; present only when the error came from an action. no additional fields. |
| data[] (variant 3).data.error (variant 2).source (variant 2).action.name | string | required; Full action name, ns/name. |
| data[] (variant 3).data.error (variant 2).source (variant 2).action.revision | string | required; Id (actr_) of the action revision that ran. |
| data[] (variant 3).data.error (variant 2).request_id | string / null | optional; X-Request-Id of the downstream response that caused the failure; null or omitted when unavailable. |
| data[] (variant 3).data.error (variant 2).errors | object[] | optional; Field validation errors with RFC 6901 pointers and Chinese correction details. |
| data[] (variant 3).data.error (variant 2).errors[].pointer | string | required; RFC 6901 field pointer. TypeScript source diagnostics use /source for scripts or /implementation/source for actions; line/column are separate, not pointer segments. |
| data[] (variant 3).data.error (variant 2).errors[].detail | string | required; Chinese correction text saying what is wrong at this location and how to fix it. |
| data[] (variant 3).data.error (variant 2).errors[].hint | string | optional; Optional extra hint giving an actionable next step, such as using a different endpoint. |
| data[] (variant 3).data.error (variant 2).errors[].line | integer | optional; Line number, 1-based; present only when a source location is available. minimum: 1 |
| data[] (variant 3).data.error (variant 2).errors[].column | integer | optional; Column number, 1-based; present only when a source location is available. minimum: 1 |
| data[] (variant 3).data.error (variant 2).status | number | optional; Optional HTTP-style status declared by a workflow raise; platform errors may omit it. |
| data[] (variant 3).data.child_run_id | null / string | required; When the target is a script or workflow, the id of the child run this call started; null for action and platform API calls. |
| data[] (variant 3).data.invocation_key | string | required; Key identifying this logical call, sent downstream so that retries under at-least-once delivery can be deduplicated. |
| data[] (variant 3).data.request_id | string / null | required; Downstream response X-Request-Id, or null before a response or when the header is absent. |
| data[] (variant 3).specversion | "1.0" | required; CloudEvents specification version, always 1.0. |
| data[] (variant 3).id | string | required; Event id, unique within the run's ledger. |
| data[] (variant 3).source | string | required; Event source, of the form /automation/v1/runs/{id}. |
| data[] (variant 3).time | string | required; Time the event occurred (RFC 3339 UTC). |
| data[] (variant 3).cursor | string | required; Event cursor; use it as cursor to page, or as Last-Event-ID to resume an SSE stream. |
| data[] (variant 3).seq | number | required; Position of the event in the run's ledger, strictly increasing. |
| data[] (variant 4).type | "ai.praxis.automation.task.started" / "ai.praxis.automation.task.completed" | required; Event type. ai.praxis.automation.task.started means a step started; ai.praxis.automation.task.completed means a step ended; data is the step record. |
| data[] (variant 4).data | object | required; Record of one execution of a workflow step. A loop produces several records for the same step (different iteration) and a retry increments attempt. no additional fields. |
| data[] (variant 4).data.id | string | required; Identifier of this step execution record; treat it as an opaque string. |
| data[] (variant 4).data.run_id | string | required; ID of the owning run. |
| data[] (variant 4).data.reference | string | required; JSON Pointer of the step in the workflow document, for example /do/0/start. |
| data[] (variant 4).data.name | string | required; Step name, the key of the step in the workflow YAML. |
| data[] (variant 4).data.kind | "run" / "call" / "wait" / "set" / "for" / "fork" / "try" / "switch" / "emit" / "raise" / "listen" / "do" | required; Workflow step kind. call invokes an action; run starts a child script or workflow; wait pauses for a duration; set assigns variables; for loops; fork runs parallel branches; try is a block with catch; switch branches on conditions; emit publishes an event; raise throws an error; listen waits for an event; do is a block of sequential steps. |
| data[] (variant 4).data.iteration | number[] | required; Current iteration indexes of enclosing for loops, outermost first; an empty array outside loops. |
| data[] (variant 4).data.attempt | number | required; Attempt number of this execution; it increases when the step is re-executed by a retry. |
| data[] (variant 4).data.status | "running" / "completed" / "faulted" / "cancelled" / "pending" / "waiting" / "suspended" | required; Step status, with the same values as run status. pending is not started; running is executing; waiting is waiting on an event, timer or child run; suspended is held because the run was suspended; cancelled was cancelled; faulted failed; completed succeeded. |
| data[] (variant 4).data.skipped | boolean | required; true when the step was skipped without actually executing. |
| data[] (variant 4).data.started_at | null / string | required; Time the step started (RFC 3339 UTC), or null. |
| data[] (variant 4).data.ended_at | null / string | required; Time the step ended (RFC 3339 UTC), or null. |
| data[] (variant 4).data.duration_ms | null / number | required; Execution time in milliseconds, or null until it ends. |
| data[] (variant 4).data.input | null / string / number / boolean / object / JSON[] | required; Any JSON value: null, boolean, number, string, array or object. |
| data[] (variant 4).data.input (variant 5).* | null / string / number / boolean / object / JSON[] | Recursive JSON value. |
| data[] (variant 4).data.input (variant 6)[] | null / string / number / boolean / object / JSON[] | Recursive JSON value. |
| data[] (variant 4).data.input_truncated | boolean | required; true when input exceeded 32 KB and was truncated. |
| data[] (variant 4).data.output | null / string / number / boolean / object / JSON[] | required; Any JSON value: null, boolean, number, string, array or object. |
| data[] (variant 4).data.output (variant 5).* | null / string / number / boolean / object / JSON[] | Recursive JSON value. |
| data[] (variant 4).data.output (variant 6)[] | null / string / number / boolean / object / JSON[] | Recursive JSON value. |
| data[] (variant 4).data.output_truncated | boolean | required; True when output is omitted because it exceeds the inline limit. |
| data[] (variant 4).data.error | null / object | required; Error details when the step failed; null otherwise. |
| data[] (variant 4).data.error (variant 2).type | string | required; Platform error category, or the verbatim URI defined by a workflow raise. |
| data[] (variant 4).data.error (variant 2).code | null / string | required; Stable error code callers can branch on, or null. |
| data[] (variant 4).data.error (variant 2).title | string | required; Short error title. |
| data[] (variant 4).data.error (variant 2).detail | null / string | required; Detailed explanation of the error, or null. |
| data[] (variant 4).data.error (variant 2).source | null / object | required; Where the error happened: a workflow step or script call; null when unknown. |
| data[] (variant 4).data.error (variant 2).source (variant 2).kind | "call" / "task" | required; Location kind. task is a workflow step; call is a call in a script. |
| data[] (variant 4).data.error (variant 2).source (variant 2).reference | string | optional; For task: the JSON Pointer of the failing step. |
| data[] (variant 4).data.error (variant 2).source (variant 2).seq | number | optional; For call: sequence number of the failing call (matches Call.seq). |
| data[] (variant 4).data.error (variant 2).source (variant 2).action | object | optional; The failing action {name, revision}; present only when the error came from an action. no additional fields. |
| data[] (variant 4).data.error (variant 2).source (variant 2).action.name | string | required; Full action name, ns/name. |
| data[] (variant 4).data.error (variant 2).source (variant 2).action.revision | string | required; Id (actr_) of the action revision that ran. |
| data[] (variant 4).data.error (variant 2).request_id | string / null | optional; X-Request-Id of the downstream response that caused the failure; null or omitted when unavailable. |
| data[] (variant 4).data.error (variant 2).errors | object[] | optional; Field validation errors with RFC 6901 pointers and Chinese correction details. |
| data[] (variant 4).data.error (variant 2).errors[].pointer | string | required; RFC 6901 field pointer. TypeScript source diagnostics use /source for scripts or /implementation/source for actions; line/column are separate, not pointer segments. |
| data[] (variant 4).data.error (variant 2).errors[].detail | string | required; Chinese correction text saying what is wrong at this location and how to fix it. |
| data[] (variant 4).data.error (variant 2).errors[].hint | string | optional; Optional extra hint giving an actionable next step, such as using a different endpoint. |
| data[] (variant 4).data.error (variant 2).errors[].line | integer | optional; Line number, 1-based; present only when a source location is available. minimum: 1 |
| data[] (variant 4).data.error (variant 2).errors[].column | integer | optional; Column number, 1-based; present only when a source location is available. minimum: 1 |
| data[] (variant 4).data.error (variant 2).status | number | optional; Optional HTTP-style status declared by a workflow raise; platform errors may omit it. |
| data[] (variant 4).data.action | null / object | required; Action {name, revision} a call step executed; null for other steps. |
| data[] (variant 4).data.action (variant 2).name | string | required; Full action name, ns/name. |
| data[] (variant 4).data.action (variant 2).revision | string | required; Id (actr_) of the action revision that ran. |
| data[] (variant 4).data.child_run | null / object | required; Summary {id, number, status, resolved_version} of the child run a run step started; null for other steps. |
| data[] (variant 4).data.child_run (variant 2).id | string | required; Id (run_) of the child run, readable as soon as it is created. |
| data[] (variant 4).data.child_run (variant 2).number | null / number | required; Sequence number of the child run within its definition; null for ad-hoc runs. |
| data[] (variant 4).data.child_run (variant 2).status | "running" / "completed" / "faulted" / "cancelled" / "pending" / "waiting" / "suspended" | required; Status of the child run. pending is not started; running is executing; waiting is waiting; suspended is suspended; cancelled was cancelled; faulted failed; completed succeeded. An awaited child is updated to its terminal status when it ends; a detached child keeps the status at launch. |
| data[] (variant 4).data.child_run (variant 2).resolved_version | null / string | required; Exact version the child run resolved to; null for ad-hoc runs. |
| data[] (variant 4).specversion | "1.0" | required; CloudEvents specification version, always 1.0. |
| data[] (variant 4).id | string | required; Event id, unique within the run's ledger. |
| data[] (variant 4).source | string | required; Event source, of the form /automation/v1/runs/{id}. |
| data[] (variant 4).time | string | required; Time the event occurred (RFC 3339 UTC). |
| data[] (variant 4).cursor | string | required; Event cursor; use it as cursor to page, or as Last-Event-ID to resume an SSE stream. |
| data[] (variant 4).seq | number | required; Position of the event in the run's ledger, strictly increasing. |
| data[] (variant 5).type | "ai.praxis.automation.wait.created" / "ai.praxis.automation.wait.resolved" | required; Event type. ai.praxis.automation.wait.created means a wait point was created; ai.praxis.automation.wait.resolved means it was satisfied, expired or cancelled; data is the wait point. |
| data[] (variant 5).data | object | required; A wait point on a run; the workflow does not continue until it is resolved, expires or is cancelled. no additional fields. |
| data[] (variant 5).data.id | string | required; Wait point id, prefixed wait_; use it as wait_id when completing an event wait. |
| data[] (variant 5).data.run_id | string | required; Id (run_) of the run this wait belongs to. |
| data[] (variant 5).data.kind | "event" / "timer" / "child" | required; Wait kind. event waits for an external event that can be submitted with runs.completeWait; timer waits until resume_at; child waits for a child run to finish. |
| data[] (variant 5).data.state | "cancelled" / "open" / "resolved" / "expired" | required; Wait point state. open is still waiting; resolved was satisfied; expired passed its expires_at; cancelled was cancelled and can no longer be satisfied. |
| data[] (variant 5).data.task | null / object | required; The workflow step {reference, name} that produced the wait; null when there is no such step. |
| data[] (variant 5).data.task (variant 2).reference | string | required; JSON Pointer of the step, for example /do/2/wait_payment. |
| data[] (variant 5).data.task (variant 2).name | string | required; Step name, the key in the workflow YAML. |
| data[] (variant 5).data.resume_at | null / string | required; For kind=timer, the instant the run resumes (RFC 3339 UTC); null for other kinds. |
| data[] (variant 5).data.event_type | null / string | required; For kind=event, the event type being awaited; null for other kinds. |
| data[] (variant 5).data.child_run_id | null / string | required; For kind=child, the id of the child run being awaited; null for other kinds. |
| data[] (variant 5).data.created_at | string | required; Time the wait point was created (RFC 3339 UTC). |
| data[] (variant 5).data.expires_at | null / string | required; Time the wait point expires (RFC 3339 UTC), or null if it has no deadline. |
| data[] (variant 5).data.resolved_at | null / string | required; Time the wait point was resolved (RFC 3339 UTC), or null if still open. |
| data[] (variant 5).specversion | "1.0" | required; CloudEvents specification version, always 1.0. |
| data[] (variant 5).id | string | required; Event id, unique within the run's ledger. |
| data[] (variant 5).source | string | required; Event source, of the form /automation/v1/runs/{id}. |
| data[] (variant 5).time | string | required; Time the event occurred (RFC 3339 UTC). |
| data[] (variant 5).cursor | string | required; Event cursor; use it as cursor to page, or as Last-Event-ID to resume an SSE stream. |
| data[] (variant 5).seq | number | required; Position of the event in the run's ledger, strictly increasing. |
| next_cursor | null / string | required; Cursor for the next page: pass it unchanged as cursor with the same filters; null when there are no more pages. No total is returned. |
text/event-stream
| Field | Type | Description |
|---|---|---|
| id | string | optional; Resume cursor of this entry; send it back as Last-Event-ID, or as cursor on the JSON form, to continue after it. Absent on the end event. |
| event | "ai.praxis.automation.run.status" / "ai.praxis.automation.run.progress" / "ai.praxis.automation.call.started" / "ai.praxis.automation.call.completed" / "ai.praxis.automation.task.started" / "ai.praxis.automation.task.completed" / "ai.praxis.automation.wait.created" / "ai.praxis.automation.wait.resolved" / "end" | required; SSE event name: one of ai.praxis.automation.run.status, ai.praxis.automation.run.progress, ai.praxis.automation.call.started, ai.praxis.automation.call.completed, ai.praxis.automation.task.started, ai.praxis.automation.task.completed, ai.praxis.automation.wait.created, ai.praxis.automation.wait.resolved, naming the RunEvent type carried in data; end is sent once when the run has reached a terminal status and closes the stream. |
| data | object / object / object / object / object / object | required; Decoded JSON of one run event, whose shape is selected by its type; for the end event, an empty object. |
| data (variant 1) (variant 1).type | "ai.praxis.automation.run.status" | required; Event type: always ai.praxis.automation.run.status, the run status changed; data is the full run. |
| data (variant 1) (variant 1).data | object | required; Full state of one run: target, status, input and output, error, initiator, position in the run tree and its timestamps. no additional fields. |
| data (variant 1) (variant 1).data.id | string | required; Opaque run_ ID. New non-deterministic IDs have 78 characters: run_ + 10-character base36 millisecond timestamp + 64-character hexadecimal DO ID. Legacy random IDs have 46 characters; historical and deterministic IDs remain valid. Same-millisecond creation order is not guaranteed. |
| data (variant 1) (variant 1).data.kind | "script" / "workflow" | required; Orchestration kind. script is a TypeScript script that executes once; workflow is a YAML workflow made of steps that can wait for events, timers or child runs and can be suspended. |
| data (variant 1) (variant 1).data.number | null / number | required; Increasing sequence number of the run within its script or workflow; null for ad-hoc runs. |
| data (variant 1) (variant 1).data.definition | null / object | required; The script or workflow {namespace, name} the run belongs to; null for ad-hoc runs created with source. |
| data (variant 1) (variant 1).data.definition (variant 2).namespace | string | required; Namespace of the script or workflow. |
| data (variant 1) (variant 1).data.definition (variant 2).name | string | required; Name of the script or workflow. |
| data (variant 1) (variant 1).data.target | null / string | required; The target string as supplied at creation (for example acme/report@latest); null for ad-hoc runs. |
| data (variant 1) (variant 1).data.resolved_version | null / string | required; Exact version the target resolved to; null for ad-hoc runs. |
| data (variant 1) (variant 1).data.source_digest | null / string | required; Digest of the source of an ad-hoc run, usable to read that source; null for runs started from a published definition. |
| data (variant 1) (variant 1).data.language | "ts" / "yaml" | required; Source language. ts is a TypeScript script; yaml is workflow YAML. |
| data (variant 1) (variant 1).data.status | "running" / "completed" / "faulted" / "cancelled" / "pending" / "waiting" / "suspended" | required; Run status. pending is created but not started; running is executing; waiting means a workflow is waiting on an event, timer or child run; suspended means a workflow was suspended; cancelled was cancelled; faulted failed and error says why; completed finished successfully and output holds the result. The last three are terminal. |
| data (variant 1) (variant 1).data.progress | null / object | required; Latest progress reported by the run as {label, current, total, updated_at}; null if none was reported. |
| data (variant 1) (variant 1).data.progress (variant 2).label | string | required; Short progress label, such as the current stage. |
| data (variant 1) (variant 1).data.progress (variant 2).current | null / number | required; Amount completed so far, or null if not reported. |
| data (variant 1) (variant 1).data.progress (variant 2).total | null / number | required; Total amount, or null when unknown. |
| data (variant 1) (variant 1).data.progress (variant 2).updated_at | string | required; Time progress was last updated (RFC 3339 UTC). |
| data (variant 1) (variant 1).data.current_wait | null / object | required; The wait point the run is currently blocked on, or null when it is not waiting. |
| data (variant 1) (variant 1).data.current_wait (variant 2).id | string | required; Wait point id, prefixed wait_; use it as wait_id when completing an event wait. |
| data (variant 1) (variant 1).data.current_wait (variant 2).run_id | string | required; Id (run_) of the run this wait belongs to. |
| data (variant 1) (variant 1).data.current_wait (variant 2).kind | "event" / "timer" / "child" | required; Wait kind. event waits for an external event that can be submitted with runs.completeWait; timer waits until resume_at; child waits for a child run to finish. |
| data (variant 1) (variant 1).data.current_wait (variant 2).state | "cancelled" / "open" / "resolved" / "expired" | required; Wait point state. open is still waiting; resolved was satisfied; expired passed its expires_at; cancelled was cancelled and can no longer be satisfied. |
| data (variant 1) (variant 1).data.current_wait (variant 2).task | null / object | required; The workflow step {reference, name} that produced the wait; null when there is no such step. |
| data (variant 1) (variant 1).data.current_wait (variant 2).task (variant 2).reference | string | required; JSON Pointer of the step, for example /do/2/wait_payment. |
| data (variant 1) (variant 1).data.current_wait (variant 2).task (variant 2).name | string | required; Step name, the key in the workflow YAML. |
| data (variant 1) (variant 1).data.current_wait (variant 2).resume_at | null / string | required; For kind=timer, the instant the run resumes (RFC 3339 UTC); null for other kinds. |
| data (variant 1) (variant 1).data.current_wait (variant 2).event_type | null / string | required; For kind=event, the event type being awaited; null for other kinds. |
| data (variant 1) (variant 1).data.current_wait (variant 2).child_run_id | null / string | required; For kind=child, the id of the child run being awaited; null for other kinds. |
| data (variant 1) (variant 1).data.current_wait (variant 2).created_at | string | required; Time the wait point was created (RFC 3339 UTC). |
| data (variant 1) (variant 1).data.current_wait (variant 2).expires_at | null / string | required; Time the wait point expires (RFC 3339 UTC), or null if it has no deadline. |
| data (variant 1) (variant 1).data.current_wait (variant 2).resolved_at | null / string | required; Time the wait point was resolved (RFC 3339 UTC), or null if still open. |
| data (variant 1) (variant 1).data.counters | object | required; Cumulative counters of a run. no additional fields. |
| data (variant 1) (variant 1).data.counters.calls | number | required; Total number of calls the script made. |
| data (variant 1) (variant 1).data.counters.action_calls | number | required; How many of those calls invoked actions. |
| data (variant 1) (variant 1).data.counters.child_runs | number | required; Number of child runs started. |
| data (variant 1) (variant 1).data.counters.tasks_completed | number | required; Number of workflow steps completed. |
| data (variant 1) (variant 1).data.counters.tasks_total | null / number | required; Number of top-level steps in the workflow; null for script runs. |
| data (variant 1) (variant 1).data.input | null / string / number / boolean / object / JSON[] | required; Any JSON value: null, boolean, number, string, array or object. |
| data (variant 1) (variant 1).data.input (variant 5).* | null / string / number / boolean / object / JSON[] | Recursive JSON value. |
| data (variant 1) (variant 1).data.input (variant 6)[] | null / string / number / boolean / object / JSON[] | Recursive JSON value. |
| data (variant 1) (variant 1).data.output | null / string / number / boolean / object / JSON[] | required; Any JSON value: null, boolean, number, string, array or object. |
| data (variant 1) (variant 1).data.output (variant 5).* | null / string / number / boolean / object / JSON[] | Recursive JSON value. |
| data (variant 1) (variant 1).data.output (variant 6)[] | null / string / number / boolean / object / JSON[] | Recursive JSON value. |
| data (variant 1) (variant 1).data.error | null / object | required; Error details when the run faulted; null otherwise. |
| data (variant 1) (variant 1).data.error (variant 2).type | string | required; Platform error category, or the verbatim URI defined by a workflow raise. |
| data (variant 1) (variant 1).data.error (variant 2).code | null / string | required; Stable error code callers can branch on, or null. |
| data (variant 1) (variant 1).data.error (variant 2).title | string | required; Short error title. |
| data (variant 1) (variant 1).data.error (variant 2).detail | null / string | required; Detailed explanation of the error, or null. |
| data (variant 1) (variant 1).data.error (variant 2).source | null / object | required; Where the error happened: a workflow step or script call; null when unknown. |
| data (variant 1) (variant 1).data.error (variant 2).source (variant 2).kind | "call" / "task" | required; Location kind. task is a workflow step; call is a call in a script. |
| data (variant 1) (variant 1).data.error (variant 2).source (variant 2).reference | string | optional; For task: the JSON Pointer of the failing step. |
| data (variant 1) (variant 1).data.error (variant 2).source (variant 2).seq | number | optional; For call: sequence number of the failing call (matches Call.seq). |
| data (variant 1) (variant 1).data.error (variant 2).source (variant 2).action | object | optional; The failing action {name, revision}; present only when the error came from an action. no additional fields. |
| data (variant 1) (variant 1).data.error (variant 2).source (variant 2).action.name | string | required; Full action name, ns/name. |
| data (variant 1) (variant 1).data.error (variant 2).source (variant 2).action.revision | string | required; Id (actr_) of the action revision that ran. |
| data (variant 1) (variant 1).data.error (variant 2).request_id | string / null | optional; X-Request-Id of the downstream response that caused the failure; null or omitted when unavailable. |
| data (variant 1) (variant 1).data.error (variant 2).errors | object[] | optional; Field validation errors with RFC 6901 pointers and Chinese correction details. |
| data (variant 1) (variant 1).data.error (variant 2).errors[].pointer | string | required; RFC 6901 field pointer. TypeScript source diagnostics use /source for scripts or /implementation/source for actions; line/column are separate, not pointer segments. |
| data (variant 1) (variant 1).data.error (variant 2).errors[].detail | string | required; Chinese correction text saying what is wrong at this location and how to fix it. |
| data (variant 1) (variant 1).data.error (variant 2).errors[].hint | string | optional; Optional extra hint giving an actionable next step, such as using a different endpoint. |
| data (variant 1) (variant 1).data.error (variant 2).errors[].line | integer | optional; Line number, 1-based; present only when a source location is available. minimum: 1 |
| data (variant 1) (variant 1).data.error (variant 2).errors[].column | integer | optional; Column number, 1-based; present only when a source location is available. minimum: 1 |
| data (variant 1) (variant 1).data.error (variant 2).status | number | optional; Optional HTTP-style status declared by a workflow raise; platform errors may omit it. |
| data (variant 1) (variant 1).data.initiator | object | required; Principal {type, id} injected by the gateway that says who initiated or acted. This service does not resolve names; the console resolves them in batches. no additional fields. |
| data (variant 1) (variant 1).data.initiator.type | "user" / "api_key" / "agent" / "run" / "trigger" | required; Principal type. user is a signed-in user; api_key is a platform API key; agent is an agent; run is an action performed by a run itself (for example a parent run); trigger is a trigger. |
| data (variant 1) (variant 1).data.initiator.id | string | required; Principal identifier whose meaning follows type: a user, API key, agent, run or trigger id. Treat it as an opaque string. |
| data (variant 1) (variant 1).data.channel | "run" / "console" / "api" / "internal" / "trigger" | required; Entry channel of the request. console is the console (through its BFF); api is a public API call; internal is an internal platform call; run is a child run created by another run; trigger is started by a trigger. |
| data (variant 1) (variant 1).data.owner | string | required; Tenant that owns the run, injected by the gateway; treat it as an opaque string. |
| data (variant 1) (variant 1).data.parent | null / object | required; The parent run {id, number, definition} that derived this run, or null for root runs. |
| data (variant 1) (variant 1).data.parent (variant 2).id | string | required; Id (run_) of the parent run. |
| data (variant 1) (variant 1).data.parent (variant 2).number | null / number | required; Sequence number of the parent run within its definition; null when the parent is ad-hoc. |
| data (variant 1) (variant 1).data.parent (variant 2).definition | null / object | required; Script or workflow {namespace, name} of the parent run; null for an ad-hoc parent. |
| data (variant 1) (variant 1).data.parent (variant 2).definition (variant 2).namespace | string | required; Namespace of the parent run's definition. |
| data (variant 1) (variant 1).data.parent (variant 2).definition (variant 2).name | string | required; Name of the parent run's definition. |
| data (variant 1) (variant 1).data.parent_run_id | string / null | required; ID of the parent run that derived this run; null for root runs |
| data (variant 1) (variant 1).data.root_run_id | string | required; Id of the root run of this run tree; a root run points to itself. |
| data (variant 1) (variant 1).data.depth | number | required; Depth in the run tree: 0 for the root run, plus 1 per child level, at most 10. |
| data (variant 1) (variant 1).data.attach | null / "wait" / "detach" | required; Relationship of a child run to its parent. wait means the parent waits for the child and the child's deadline is not later than the parent's; detach means the parent does not wait and the child is not cancelled when the parent is; null for root runs. |
| data (variant 1) (variant 1).data.deadline_at | string | required; Deadline of the run (RFC 3339 UTC): creation time plus deadline_seconds (scripts default to and are capped at 300 seconds; workflows default to 86400 and are capped at 604800), and an awaited child ends at least 1 second before its parent's deadline. |
| data (variant 1) (variant 1).data.created_at | string | required; Time the run was created (RFC 3339 UTC). |
| data (variant 1) (variant 1).data.started_at | null / string | required; Time execution started (RFC 3339 UTC), or null while still queued. |
| data (variant 1) (variant 1).data.ended_at | null / string | required; Time the run reached a terminal status (RFC 3339 UTC), or null while it is still active. |
| data (variant 1) (variant 1).data.updated_at | string | required; Time the run record was last updated (RFC 3339 UTC). |
| data (variant 1) (variant 1).data.heartbeat_at | null / string | required; Time of the executor's last liveness signal (RFC 3339 UTC), or null before the run starts. |
| data (variant 1) (variant 1).data.cancel_requested_at | null / string | required; Time the cancellation was requested (RFC 3339 UTC), or null. |
| data (variant 1) (variant 1).data.cancelled_by | null / object | required; Principal that requested cancellation, or null if not cancelled or not requested by a principal. |
| data (variant 1) (variant 1).data.cancelled_by (variant 2).type | "user" / "api_key" / "agent" / "run" / "trigger" | required; Principal type. user is a signed-in user; api_key is a platform API key; agent is an agent; run is an action performed by a run itself (for example a parent run); trigger is a trigger. |
| data (variant 1) (variant 1).data.cancelled_by (variant 2).id | string | required; Principal identifier whose meaning follows type: a user, API key, agent, run or trigger id. Treat it as an opaque string. |
| data (variant 1) (variant 1).data.cancel_reason | null / "user" / "parent_cancelled" / "deadline" / "executor_lost" | required; Why the run was cancelled. user is a user request; parent_cancelled is a cascade from a cancelled parent run; deadline means the deadline passed; executor_lost means the executor was lost; null if not cancelled. |
| data (variant 1) (variant 1).data.suspend_requested_at | null / string | required; Time suspension of the workflow was requested (RFC 3339 UTC), or null. |
| data (variant 1) (variant 1).data.suspended_by | null / object | required; Principal that requested suspension, or null. |
| data (variant 1) (variant 1).data.suspended_by (variant 2).type | "user" / "api_key" / "agent" / "run" / "trigger" | required; Principal type. user is a signed-in user; api_key is a platform API key; agent is an agent; run is an action performed by a run itself (for example a parent run); trigger is a trigger. |
| data (variant 1) (variant 1).data.suspended_by (variant 2).id | string | required; Principal identifier whose meaning follows type: a user, API key, agent, run or trigger id. Treat it as an opaque string. |
| data (variant 1) (variant 1).data.queued_ms | null / number | required; Milliseconds between creation and the start of execution; null until the run starts. |
| data (variant 1) (variant 1).data.run_ms | null / number | required; Milliseconds spent executing, excluding time spent waiting on wait points; fixed once the run ends. |
| data (variant 1) (variant 1).data.wait_ms | null / number | required; Total milliseconds spent waiting on wait points; null before any wait. |
| data (variant 1) (variant 1).data.usage | object / null | required; Returned only in single-run details (including expand); null in lists. Runs themselves are free; these are actual charges for capabilities such as models and search called during the run, attributed by call. Unrated usage is included later. Aggregation failure or timeout (1.5 seconds) returns null while details still return 200. |
| data (variant 1) (variant 1).data.usage (variant 1).currency | "USD" | required; Charge currency, always USD. |
| data (variant 1) (variant 1).data.usage (variant 1).cost | string | required; Rated actual charges for this run alone, excluding descendants, as an exact dollar decimal string with six fractional digits; 0.000000 when there is no usage. pattern: "^[0-9]+\.[0-9]{6}$" |
| data (variant 1) (variant 1).data.usage (variant 1).pending_events | integer | required; Number of this run's own unrated usage events whose charges will be included later. minimum: 0 |
| data (variant 1) (variant 1).data.usage (variant 1).by_service | object[] | required; This run's actual charges grouped by service, each with service and cost (a six-decimal dollar string); empty when there is no usage. |
| data (variant 1) (variant 1).data.usage (variant 1).by_service[].service | string | required; Name of the service that incurred the usage, for example router or search. |
| data (variant 1) (variant 1).data.usage (variant 1).by_service[].cost | string | required; Rated actual charges for that service as an exact dollar decimal string with six fractional digits. pattern: "^[0-9]+\.[0-9]{6}$" |
| data (variant 1) (variant 1).data.usage (variant 1).tree_cost | string / null | required; Rated actual charges for the entire run tree including the root, as a six-decimal dollar string; null for child runs. |
| data (variant 1) (variant 1).data.rerun_of | null / string | required; If this run was created by re-running another run, that run's id (run_); otherwise null. |
| data (variant 1) (variant 1).data.labels | object | required; User labels and system labels; trigger runs support 64 user labels, excluding system labels. |
| data (variant 1) (variant 1).data.trigger | object / null | required; Trigger {id, name} that started this run, or null when it was not started by a trigger. |
| data (variant 1) (variant 1).data.trigger (variant 1).id | string | required; Id (trg_) of the trigger that started this run. |
| data (variant 1) (variant 1).data.trigger (variant 1).name | string | required; Name of the trigger that started this run. |
| data (variant 1) (variant 1).data.cancel_message | string / null | required; User cancellation note (1–500 characters), or null when omitted. The cancel_reason enum is unchanged. |
| data (variant 1) (variant 1).data.input_truncated | boolean | optional; True when the list omits blob-backed input, setting input to null; inline values remain intact and run details return the full value. |
| data (variant 1) (variant 1).data.output_truncated | boolean | optional; True when the list omits blob-backed output, setting output to null; inline values remain intact and run details return the full value. |
| data (variant 1) (variant 1).specversion | "1.0" | required; CloudEvents specification version, always 1.0. |
| data (variant 1) (variant 1).id | string | required; Event id, unique within the run's ledger. |
| data (variant 1) (variant 1).source | string | required; Event source, of the form /automation/v1/runs/{id}. |
| data (variant 1) (variant 1).time | string | required; Time the event occurred (RFC 3339 UTC). |
| data (variant 1) (variant 1).cursor | string | required; Event cursor; use it as cursor to page, or as Last-Event-ID to resume an SSE stream. |
| data (variant 1) (variant 1).seq | number | required; Position of the event in the run's ledger, strictly increasing. |
| data (variant 1) (variant 2).type | "ai.praxis.automation.run.progress" | required; Event type: always ai.praxis.automation.run.progress, the run reported new progress; data is the progress. |
| data (variant 1) (variant 2).data | object | required; Progress reported by a run: a label, the amount completed and the total. no additional fields. |
| data (variant 1) (variant 2).data.label | string | required; Short progress label, such as the current stage. |
| data (variant 1) (variant 2).data.current | null / number | required; Amount completed so far, or null if not reported. |
| data (variant 1) (variant 2).data.total | null / number | required; Total amount, or null when unknown. |
| data (variant 1) (variant 2).data.updated_at | string | required; Time progress was last updated (RFC 3339 UTC). |
| data (variant 1) (variant 2).specversion | "1.0" | required; CloudEvents specification version, always 1.0. |
| data (variant 1) (variant 2).id | string | required; Event id, unique within the run's ledger. |
| data (variant 1) (variant 2).source | string | required; Event source, of the form /automation/v1/runs/{id}. |
| data (variant 1) (variant 2).time | string | required; Time the event occurred (RFC 3339 UTC). |
| data (variant 1) (variant 2).cursor | string | required; Event cursor; use it as cursor to page, or as Last-Event-ID to resume an SSE stream. |
| data (variant 1) (variant 2).seq | number | required; Position of the event in the run's ledger, strictly increasing. |
| data (variant 1) (variant 3).type | "ai.praxis.automation.call.started" / "ai.praxis.automation.call.completed" | required; Event type. ai.praxis.automation.call.started means a call started; ai.praxis.automation.call.completed means a call ended, successfully or not; data is the call record. |
| data (variant 1) (variant 3).data | object | required; Record of one call made during a script run (an action, platform API, script or workflow), ordered by seq. no additional fields. |
| data (variant 1) (variant 3).data.id | string | required; Call id, prefixed call_. |
| data (variant 1) (variant 3).data.run_id | string | required; Id (run_) of the script run that made the call. |
| data (variant 1) (variant 3).data.seq | number | required; Position of the call within the run, increasing in call order; together with run_id it locates the call. |
| data (variant 1) (variant 3).data.target | object | required; The target that was called: {kind, name, revision?, version?}. no additional fields. |
| data (variant 1) (variant 3).data.target.kind | "action" / "script" / "workflow" / "platform_api" | required; Target kind. action is an action; platform_api is a platform API operation; script is a script; workflow is a workflow. |
| data (variant 1) (variant 3).data.target.name | string | required; Target name: ns/name for an action, the operation name for a platform API, ns/name for a script or workflow. |
| data (variant 1) (variant 3).data.target.revision | string | optional; Id (actr_) of the action revision that executed; present only for action calls. |
| data (variant 1) (variant 3).data.target.version | string | optional; Exact version that ran; present only for script and workflow calls. |
| data (variant 1) (variant 3).data.args_preview | string | required; Single-line preview of the call arguments, truncated on the server; payloads over 32 KB are kept in object storage rather than inline. |
| data (variant 1) (variant 3).data.result_preview | null / string | required; Single-line preview of the returned value, truncated on the server; null until the call ends. |
| data (variant 1) (variant 3).data.status | "running" / "completed" / "faulted" / "cancelled" | required; Call status. running means still executing; completed means it returned normally; faulted means it failed and error explains why; cancelled means it was stopped because the run was cancelled. |
| data (variant 1) (variant 3).data.started_at | string | required; Time the call started (RFC 3339 UTC). |
| data (variant 1) (variant 3).data.ended_at | null / string | required; Time the call ended (RFC 3339 UTC), or null while it is running. |
| data (variant 1) (variant 3).data.duration_ms | null / number | required; Milliseconds from start to end, or null while the call is running. |
| data (variant 1) (variant 3).data.error | null / object | required; Error details when the call failed; null if it succeeded or is still running. |
| data (variant 1) (variant 3).data.error (variant 2).type | string | required; Platform error category, or the verbatim URI defined by a workflow raise. |
| data (variant 1) (variant 3).data.error (variant 2).code | null / string | required; Stable error code callers can branch on, or null. |
| data (variant 1) (variant 3).data.error (variant 2).title | string | required; Short error title. |
| data (variant 1) (variant 3).data.error (variant 2).detail | null / string | required; Detailed explanation of the error, or null. |
| data (variant 1) (variant 3).data.error (variant 2).source | null / object | required; Where the error happened: a workflow step or script call; null when unknown. |
| data (variant 1) (variant 3).data.error (variant 2).source (variant 2).kind | "call" / "task" | required; Location kind. task is a workflow step; call is a call in a script. |
| data (variant 1) (variant 3).data.error (variant 2).source (variant 2).reference | string | optional; For task: the JSON Pointer of the failing step. |
| data (variant 1) (variant 3).data.error (variant 2).source (variant 2).seq | number | optional; For call: sequence number of the failing call (matches Call.seq). |
| data (variant 1) (variant 3).data.error (variant 2).source (variant 2).action | object | optional; The failing action {name, revision}; present only when the error came from an action. no additional fields. |
| data (variant 1) (variant 3).data.error (variant 2).source (variant 2).action.name | string | required; Full action name, ns/name. |
| data (variant 1) (variant 3).data.error (variant 2).source (variant 2).action.revision | string | required; Id (actr_) of the action revision that ran. |
| data (variant 1) (variant 3).data.error (variant 2).request_id | string / null | optional; X-Request-Id of the downstream response that caused the failure; null or omitted when unavailable. |
| data (variant 1) (variant 3).data.error (variant 2).errors | object[] | optional; Field validation errors with RFC 6901 pointers and Chinese correction details. |
| data (variant 1) (variant 3).data.error (variant 2).errors[].pointer | string | required; RFC 6901 field pointer. TypeScript source diagnostics use /source for scripts or /implementation/source for actions; line/column are separate, not pointer segments. |
| data (variant 1) (variant 3).data.error (variant 2).errors[].detail | string | required; Chinese correction text saying what is wrong at this location and how to fix it. |
| data (variant 1) (variant 3).data.error (variant 2).errors[].hint | string | optional; Optional extra hint giving an actionable next step, such as using a different endpoint. |
| data (variant 1) (variant 3).data.error (variant 2).errors[].line | integer | optional; Line number, 1-based; present only when a source location is available. minimum: 1 |
| data (variant 1) (variant 3).data.error (variant 2).errors[].column | integer | optional; Column number, 1-based; present only when a source location is available. minimum: 1 |
| data (variant 1) (variant 3).data.error (variant 2).status | number | optional; Optional HTTP-style status declared by a workflow raise; platform errors may omit it. |
| data (variant 1) (variant 3).data.child_run_id | null / string | required; When the target is a script or workflow, the id of the child run this call started; null for action and platform API calls. |
| data (variant 1) (variant 3).data.invocation_key | string | required; Key identifying this logical call, sent downstream so that retries under at-least-once delivery can be deduplicated. |
| data (variant 1) (variant 3).data.request_id | string / null | required; Downstream response X-Request-Id, or null before a response or when the header is absent. |
| data (variant 1) (variant 3).specversion | "1.0" | required; CloudEvents specification version, always 1.0. |
| data (variant 1) (variant 3).id | string | required; Event id, unique within the run's ledger. |
| data (variant 1) (variant 3).source | string | required; Event source, of the form /automation/v1/runs/{id}. |
| data (variant 1) (variant 3).time | string | required; Time the event occurred (RFC 3339 UTC). |
| data (variant 1) (variant 3).cursor | string | required; Event cursor; use it as cursor to page, or as Last-Event-ID to resume an SSE stream. |
| data (variant 1) (variant 3).seq | number | required; Position of the event in the run's ledger, strictly increasing. |
| data (variant 1) (variant 4).type | "ai.praxis.automation.task.started" / "ai.praxis.automation.task.completed" | required; Event type. ai.praxis.automation.task.started means a step started; ai.praxis.automation.task.completed means a step ended; data is the step record. |
| data (variant 1) (variant 4).data | object | required; Record of one execution of a workflow step. A loop produces several records for the same step (different iteration) and a retry increments attempt. no additional fields. |
| data (variant 1) (variant 4).data.id | string | required; Identifier of this step execution record; treat it as an opaque string. |
| data (variant 1) (variant 4).data.run_id | string | required; ID of the owning run. |
| data (variant 1) (variant 4).data.reference | string | required; JSON Pointer of the step in the workflow document, for example /do/0/start. |
| data (variant 1) (variant 4).data.name | string | required; Step name, the key of the step in the workflow YAML. |
| data (variant 1) (variant 4).data.kind | "run" / "call" / "wait" / "set" / "for" / "fork" / "try" / "switch" / "emit" / "raise" / "listen" / "do" | required; Workflow step kind. call invokes an action; run starts a child script or workflow; wait pauses for a duration; set assigns variables; for loops; fork runs parallel branches; try is a block with catch; switch branches on conditions; emit publishes an event; raise throws an error; listen waits for an event; do is a block of sequential steps. |
| data (variant 1) (variant 4).data.iteration | number[] | required; Current iteration indexes of enclosing for loops, outermost first; an empty array outside loops. |
| data (variant 1) (variant 4).data.attempt | number | required; Attempt number of this execution; it increases when the step is re-executed by a retry. |
| data (variant 1) (variant 4).data.status | "running" / "completed" / "faulted" / "cancelled" / "pending" / "waiting" / "suspended" | required; Step status, with the same values as run status. pending is not started; running is executing; waiting is waiting on an event, timer or child run; suspended is held because the run was suspended; cancelled was cancelled; faulted failed; completed succeeded. |
| data (variant 1) (variant 4).data.skipped | boolean | required; true when the step was skipped without actually executing. |
| data (variant 1) (variant 4).data.started_at | null / string | required; Time the step started (RFC 3339 UTC), or null. |
| data (variant 1) (variant 4).data.ended_at | null / string | required; Time the step ended (RFC 3339 UTC), or null. |
| data (variant 1) (variant 4).data.duration_ms | null / number | required; Execution time in milliseconds, or null until it ends. |
| data (variant 1) (variant 4).data.input | null / string / number / boolean / object / JSON[] | required; Any JSON value: null, boolean, number, string, array or object. |
| data (variant 1) (variant 4).data.input (variant 5).* | null / string / number / boolean / object / JSON[] | Recursive JSON value. |
| data (variant 1) (variant 4).data.input (variant 6)[] | null / string / number / boolean / object / JSON[] | Recursive JSON value. |
| data (variant 1) (variant 4).data.input_truncated | boolean | required; true when input exceeded 32 KB and was truncated. |
| data (variant 1) (variant 4).data.output | null / string / number / boolean / object / JSON[] | required; Any JSON value: null, boolean, number, string, array or object. |
| data (variant 1) (variant 4).data.output (variant 5).* | null / string / number / boolean / object / JSON[] | Recursive JSON value. |
| data (variant 1) (variant 4).data.output (variant 6)[] | null / string / number / boolean / object / JSON[] | Recursive JSON value. |
| data (variant 1) (variant 4).data.output_truncated | boolean | required; True when output is omitted because it exceeds the inline limit. |
| data (variant 1) (variant 4).data.error | null / object | required; Error details when the step failed; null otherwise. |
| data (variant 1) (variant 4).data.error (variant 2).type | string | required; Platform error category, or the verbatim URI defined by a workflow raise. |
| data (variant 1) (variant 4).data.error (variant 2).code | null / string | required; Stable error code callers can branch on, or null. |
| data (variant 1) (variant 4).data.error (variant 2).title | string | required; Short error title. |
| data (variant 1) (variant 4).data.error (variant 2).detail | null / string | required; Detailed explanation of the error, or null. |
| data (variant 1) (variant 4).data.error (variant 2).source | null / object | required; Where the error happened: a workflow step or script call; null when unknown. |
| data (variant 1) (variant 4).data.error (variant 2).source (variant 2).kind | "call" / "task" | required; Location kind. task is a workflow step; call is a call in a script. |
| data (variant 1) (variant 4).data.error (variant 2).source (variant 2).reference | string | optional; For task: the JSON Pointer of the failing step. |
| data (variant 1) (variant 4).data.error (variant 2).source (variant 2).seq | number | optional; For call: sequence number of the failing call (matches Call.seq). |
| data (variant 1) (variant 4).data.error (variant 2).source (variant 2).action | object | optional; The failing action {name, revision}; present only when the error came from an action. no additional fields. |
| data (variant 1) (variant 4).data.error (variant 2).source (variant 2).action.name | string | required; Full action name, ns/name. |
| data (variant 1) (variant 4).data.error (variant 2).source (variant 2).action.revision | string | required; Id (actr_) of the action revision that ran. |
| data (variant 1) (variant 4).data.error (variant 2).request_id | string / null | optional; X-Request-Id of the downstream response that caused the failure; null or omitted when unavailable. |
| data (variant 1) (variant 4).data.error (variant 2).errors | object[] | optional; Field validation errors with RFC 6901 pointers and Chinese correction details. |
| data (variant 1) (variant 4).data.error (variant 2).errors[].pointer | string | required; RFC 6901 field pointer. TypeScript source diagnostics use /source for scripts or /implementation/source for actions; line/column are separate, not pointer segments. |
| data (variant 1) (variant 4).data.error (variant 2).errors[].detail | string | required; Chinese correction text saying what is wrong at this location and how to fix it. |
| data (variant 1) (variant 4).data.error (variant 2).errors[].hint | string | optional; Optional extra hint giving an actionable next step, such as using a different endpoint. |
| data (variant 1) (variant 4).data.error (variant 2).errors[].line | integer | optional; Line number, 1-based; present only when a source location is available. minimum: 1 |
| data (variant 1) (variant 4).data.error (variant 2).errors[].column | integer | optional; Column number, 1-based; present only when a source location is available. minimum: 1 |
| data (variant 1) (variant 4).data.error (variant 2).status | number | optional; Optional HTTP-style status declared by a workflow raise; platform errors may omit it. |
| data (variant 1) (variant 4).data.action | null / object | required; Action {name, revision} a call step executed; null for other steps. |
| data (variant 1) (variant 4).data.action (variant 2).name | string | required; Full action name, ns/name. |
| data (variant 1) (variant 4).data.action (variant 2).revision | string | required; Id (actr_) of the action revision that ran. |
| data (variant 1) (variant 4).data.child_run | null / object | required; Summary {id, number, status, resolved_version} of the child run a run step started; null for other steps. |
| data (variant 1) (variant 4).data.child_run (variant 2).id | string | required; Id (run_) of the child run, readable as soon as it is created. |
| data (variant 1) (variant 4).data.child_run (variant 2).number | null / number | required; Sequence number of the child run within its definition; null for ad-hoc runs. |
| data (variant 1) (variant 4).data.child_run (variant 2).status | "running" / "completed" / "faulted" / "cancelled" / "pending" / "waiting" / "suspended" | required; Status of the child run. pending is not started; running is executing; waiting is waiting; suspended is suspended; cancelled was cancelled; faulted failed; completed succeeded. An awaited child is updated to its terminal status when it ends; a detached child keeps the status at launch. |
| data (variant 1) (variant 4).data.child_run (variant 2).resolved_version | null / string | required; Exact version the child run resolved to; null for ad-hoc runs. |
| data (variant 1) (variant 4).specversion | "1.0" | required; CloudEvents specification version, always 1.0. |
| data (variant 1) (variant 4).id | string | required; Event id, unique within the run's ledger. |
| data (variant 1) (variant 4).source | string | required; Event source, of the form /automation/v1/runs/{id}. |
| data (variant 1) (variant 4).time | string | required; Time the event occurred (RFC 3339 UTC). |
| data (variant 1) (variant 4).cursor | string | required; Event cursor; use it as cursor to page, or as Last-Event-ID to resume an SSE stream. |
| data (variant 1) (variant 4).seq | number | required; Position of the event in the run's ledger, strictly increasing. |
| data (variant 1) (variant 5).type | "ai.praxis.automation.wait.created" / "ai.praxis.automation.wait.resolved" | required; Event type. ai.praxis.automation.wait.created means a wait point was created; ai.praxis.automation.wait.resolved means it was satisfied, expired or cancelled; data is the wait point. |
| data (variant 1) (variant 5).data | object | required; A wait point on a run; the workflow does not continue until it is resolved, expires or is cancelled. no additional fields. |
| data (variant 1) (variant 5).data.id | string | required; Wait point id, prefixed wait_; use it as wait_id when completing an event wait. |
| data (variant 1) (variant 5).data.run_id | string | required; Id (run_) of the run this wait belongs to. |
| data (variant 1) (variant 5).data.kind | "event" / "timer" / "child" | required; Wait kind. event waits for an external event that can be submitted with runs.completeWait; timer waits until resume_at; child waits for a child run to finish. |
| data (variant 1) (variant 5).data.state | "cancelled" / "open" / "resolved" / "expired" | required; Wait point state. open is still waiting; resolved was satisfied; expired passed its expires_at; cancelled was cancelled and can no longer be satisfied. |
| data (variant 1) (variant 5).data.task | null / object | required; The workflow step {reference, name} that produced the wait; null when there is no such step. |
| data (variant 1) (variant 5).data.task (variant 2).reference | string | required; JSON Pointer of the step, for example /do/2/wait_payment. |
| data (variant 1) (variant 5).data.task (variant 2).name | string | required; Step name, the key in the workflow YAML. |
| data (variant 1) (variant 5).data.resume_at | null / string | required; For kind=timer, the instant the run resumes (RFC 3339 UTC); null for other kinds. |
| data (variant 1) (variant 5).data.event_type | null / string | required; For kind=event, the event type being awaited; null for other kinds. |
| data (variant 1) (variant 5).data.child_run_id | null / string | required; For kind=child, the id of the child run being awaited; null for other kinds. |
| data (variant 1) (variant 5).data.created_at | string | required; Time the wait point was created (RFC 3339 UTC). |
| data (variant 1) (variant 5).data.expires_at | null / string | required; Time the wait point expires (RFC 3339 UTC), or null if it has no deadline. |
| data (variant 1) (variant 5).data.resolved_at | null / string | required; Time the wait point was resolved (RFC 3339 UTC), or null if still open. |
| data (variant 1) (variant 5).specversion | "1.0" | required; CloudEvents specification version, always 1.0. |
| data (variant 1) (variant 5).id | string | required; Event id, unique within the run's ledger. |
| data (variant 1) (variant 5).source | string | required; Event source, of the form /automation/v1/runs/{id}. |
| data (variant 1) (variant 5).time | string | required; Time the event occurred (RFC 3339 UTC). |
| data (variant 1) (variant 5).cursor | string | required; Event cursor; use it as cursor to page, or as Last-Event-ID to resume an SSE stream. |
| data (variant 1) (variant 5).seq | number | required; Position of the event in the run's ledger, strictly increasing. |
| (variant 1).event | "ai.praxis.automation.run.status" / "ai.praxis.automation.run.progress" / "ai.praxis.automation.call.started" / "ai.praxis.automation.call.completed" / "ai.praxis.automation.task.started" / "ai.praxis.automation.task.completed" / "ai.praxis.automation.wait.created" / "ai.praxis.automation.wait.resolved" | optional; SSE event name: one of ai.praxis.automation.run.status, ai.praxis.automation.run.progress, ai.praxis.automation.call.started, ai.praxis.automation.call.completed, ai.praxis.automation.task.started, ai.praxis.automation.task.completed, ai.praxis.automation.wait.created, ai.praxis.automation.wait.resolved, naming the RunEvent type carried in data. |
| (variant 1).data | object / object / object / object / object | optional; One CloudEvents entry in a run's ledger; the payload carries the full projection so no re-fetch is needed. type decides the shape of data: run.status carries a run, run.progress a progress, call.* a call, task.* a step and wait.* a wait point. |
| (variant 1).data (variant 1).type | "ai.praxis.automation.run.status" | required; Event type: always ai.praxis.automation.run.status, the run status changed; data is the full run. |
| (variant 1).data (variant 1).data | object | required; Full state of one run: target, status, input and output, error, initiator, position in the run tree and its timestamps. no additional fields. |
| (variant 1).data (variant 1).data.id | string | required; Opaque run_ ID. New non-deterministic IDs have 78 characters: run_ + 10-character base36 millisecond timestamp + 64-character hexadecimal DO ID. Legacy random IDs have 46 characters; historical and deterministic IDs remain valid. Same-millisecond creation order is not guaranteed. |
| (variant 1).data (variant 1).data.kind | "script" / "workflow" | required; Orchestration kind. script is a TypeScript script that executes once; workflow is a YAML workflow made of steps that can wait for events, timers or child runs and can be suspended. |
| (variant 1).data (variant 1).data.number | null / number | required; Increasing sequence number of the run within its script or workflow; null for ad-hoc runs. |
| (variant 1).data (variant 1).data.definition | null / object | required; The script or workflow {namespace, name} the run belongs to; null for ad-hoc runs created with source. |
| (variant 1).data (variant 1).data.definition (variant 2).namespace | string | required; Namespace of the script or workflow. |
| (variant 1).data (variant 1).data.definition (variant 2).name | string | required; Name of the script or workflow. |
| (variant 1).data (variant 1).data.target | null / string | required; The target string as supplied at creation (for example acme/report@latest); null for ad-hoc runs. |
| (variant 1).data (variant 1).data.resolved_version | null / string | required; Exact version the target resolved to; null for ad-hoc runs. |
| (variant 1).data (variant 1).data.source_digest | null / string | required; Digest of the source of an ad-hoc run, usable to read that source; null for runs started from a published definition. |
| (variant 1).data (variant 1).data.language | "ts" / "yaml" | required; Source language. ts is a TypeScript script; yaml is workflow YAML. |
| (variant 1).data (variant 1).data.status | "running" / "completed" / "faulted" / "cancelled" / "pending" / "waiting" / "suspended" | required; Run status. pending is created but not started; running is executing; waiting means a workflow is waiting on an event, timer or child run; suspended means a workflow was suspended; cancelled was cancelled; faulted failed and error says why; completed finished successfully and output holds the result. The last three are terminal. |
| (variant 1).data (variant 1).data.progress | null / object | required; Latest progress reported by the run as {label, current, total, updated_at}; null if none was reported. |
| (variant 1).data (variant 1).data.progress (variant 2).label | string | required; Short progress label, such as the current stage. |
| (variant 1).data (variant 1).data.progress (variant 2).current | null / number | required; Amount completed so far, or null if not reported. |
| (variant 1).data (variant 1).data.progress (variant 2).total | null / number | required; Total amount, or null when unknown. |
| (variant 1).data (variant 1).data.progress (variant 2).updated_at | string | required; Time progress was last updated (RFC 3339 UTC). |
| (variant 1).data (variant 1).data.current_wait | null / object | required; The wait point the run is currently blocked on, or null when it is not waiting. |
| (variant 1).data (variant 1).data.current_wait (variant 2).id | string | required; Wait point id, prefixed wait_; use it as wait_id when completing an event wait. |
| (variant 1).data (variant 1).data.current_wait (variant 2).run_id | string | required; Id (run_) of the run this wait belongs to. |
| (variant 1).data (variant 1).data.current_wait (variant 2).kind | "event" / "timer" / "child" | required; Wait kind. event waits for an external event that can be submitted with runs.completeWait; timer waits until resume_at; child waits for a child run to finish. |
| (variant 1).data (variant 1).data.current_wait (variant 2).state | "cancelled" / "open" / "resolved" / "expired" | required; Wait point state. open is still waiting; resolved was satisfied; expired passed its expires_at; cancelled was cancelled and can no longer be satisfied. |
| (variant 1).data (variant 1).data.current_wait (variant 2).task | null / object | required; The workflow step {reference, name} that produced the wait; null when there is no such step. |
| (variant 1).data (variant 1).data.current_wait (variant 2).task (variant 2).reference | string | required; JSON Pointer of the step, for example /do/2/wait_payment. |
| (variant 1).data (variant 1).data.current_wait (variant 2).task (variant 2).name | string | required; Step name, the key in the workflow YAML. |
| (variant 1).data (variant 1).data.current_wait (variant 2).resume_at | null / string | required; For kind=timer, the instant the run resumes (RFC 3339 UTC); null for other kinds. |
| (variant 1).data (variant 1).data.current_wait (variant 2).event_type | null / string | required; For kind=event, the event type being awaited; null for other kinds. |
| (variant 1).data (variant 1).data.current_wait (variant 2).child_run_id | null / string | required; For kind=child, the id of the child run being awaited; null for other kinds. |
| (variant 1).data (variant 1).data.current_wait (variant 2).created_at | string | required; Time the wait point was created (RFC 3339 UTC). |
| (variant 1).data (variant 1).data.current_wait (variant 2).expires_at | null / string | required; Time the wait point expires (RFC 3339 UTC), or null if it has no deadline. |
| (variant 1).data (variant 1).data.current_wait (variant 2).resolved_at | null / string | required; Time the wait point was resolved (RFC 3339 UTC), or null if still open. |
| (variant 1).data (variant 1).data.counters | object | required; Cumulative counters of a run. no additional fields. |
| (variant 1).data (variant 1).data.counters.calls | number | required; Total number of calls the script made. |
| (variant 1).data (variant 1).data.counters.action_calls | number | required; How many of those calls invoked actions. |
| (variant 1).data (variant 1).data.counters.child_runs | number | required; Number of child runs started. |
| (variant 1).data (variant 1).data.counters.tasks_completed | number | required; Number of workflow steps completed. |
| (variant 1).data (variant 1).data.counters.tasks_total | null / number | required; Number of top-level steps in the workflow; null for script runs. |
| (variant 1).data (variant 1).data.input | null / string / number / boolean / object / JSON[] | required; Any JSON value: null, boolean, number, string, array or object. |
| (variant 1).data (variant 1).data.input (variant 5).* | null / string / number / boolean / object / JSON[] | Recursive JSON value. |
| (variant 1).data (variant 1).data.input (variant 6)[] | null / string / number / boolean / object / JSON[] | Recursive JSON value. |
| (variant 1).data (variant 1).data.output | null / string / number / boolean / object / JSON[] | required; Any JSON value: null, boolean, number, string, array or object. |
| (variant 1).data (variant 1).data.output (variant 5).* | null / string / number / boolean / object / JSON[] | Recursive JSON value. |
| (variant 1).data (variant 1).data.output (variant 6)[] | null / string / number / boolean / object / JSON[] | Recursive JSON value. |
| (variant 1).data (variant 1).data.error | null / object | required; Error details when the run faulted; null otherwise. |
| (variant 1).data (variant 1).data.error (variant 2).type | string | required; Platform error category, or the verbatim URI defined by a workflow raise. |
| (variant 1).data (variant 1).data.error (variant 2).code | null / string | required; Stable error code callers can branch on, or null. |
| (variant 1).data (variant 1).data.error (variant 2).title | string | required; Short error title. |
| (variant 1).data (variant 1).data.error (variant 2).detail | null / string | required; Detailed explanation of the error, or null. |
| (variant 1).data (variant 1).data.error (variant 2).source | null / object | required; Where the error happened: a workflow step or script call; null when unknown. |
| (variant 1).data (variant 1).data.error (variant 2).source (variant 2).kind | "call" / "task" | required; Location kind. task is a workflow step; call is a call in a script. |
| (variant 1).data (variant 1).data.error (variant 2).source (variant 2).reference | string | optional; For task: the JSON Pointer of the failing step. |
| (variant 1).data (variant 1).data.error (variant 2).source (variant 2).seq | number | optional; For call: sequence number of the failing call (matches Call.seq). |
| (variant 1).data (variant 1).data.error (variant 2).source (variant 2).action | object | optional; The failing action {name, revision}; present only when the error came from an action. no additional fields. |
| (variant 1).data (variant 1).data.error (variant 2).source (variant 2).action.name | string | required; Full action name, ns/name. |
| (variant 1).data (variant 1).data.error (variant 2).source (variant 2).action.revision | string | required; Id (actr_) of the action revision that ran. |
| (variant 1).data (variant 1).data.error (variant 2).request_id | string / null | optional; X-Request-Id of the downstream response that caused the failure; null or omitted when unavailable. |
| (variant 1).data (variant 1).data.error (variant 2).errors | object[] | optional; Field validation errors with RFC 6901 pointers and Chinese correction details. |
| (variant 1).data (variant 1).data.error (variant 2).errors[].pointer | string | required; RFC 6901 field pointer. TypeScript source diagnostics use /source for scripts or /implementation/source for actions; line/column are separate, not pointer segments. |
| (variant 1).data (variant 1).data.error (variant 2).errors[].detail | string | required; Chinese correction text saying what is wrong at this location and how to fix it. |
| (variant 1).data (variant 1).data.error (variant 2).errors[].hint | string | optional; Optional extra hint giving an actionable next step, such as using a different endpoint. |
| (variant 1).data (variant 1).data.error (variant 2).errors[].line | integer | optional; Line number, 1-based; present only when a source location is available. minimum: 1 |
| (variant 1).data (variant 1).data.error (variant 2).errors[].column | integer | optional; Column number, 1-based; present only when a source location is available. minimum: 1 |
| (variant 1).data (variant 1).data.error (variant 2).status | number | optional; Optional HTTP-style status declared by a workflow raise; platform errors may omit it. |
| (variant 1).data (variant 1).data.initiator | object | required; Principal {type, id} injected by the gateway that says who initiated or acted. This service does not resolve names; the console resolves them in batches. no additional fields. |
| (variant 1).data (variant 1).data.initiator.type | "user" / "api_key" / "agent" / "run" / "trigger" | required; Principal type. user is a signed-in user; api_key is a platform API key; agent is an agent; run is an action performed by a run itself (for example a parent run); trigger is a trigger. |
| (variant 1).data (variant 1).data.initiator.id | string | required; Principal identifier whose meaning follows type: a user, API key, agent, run or trigger id. Treat it as an opaque string. |
| (variant 1).data (variant 1).data.channel | "run" / "console" / "api" / "internal" / "trigger" | required; Entry channel of the request. console is the console (through its BFF); api is a public API call; internal is an internal platform call; run is a child run created by another run; trigger is started by a trigger. |
| (variant 1).data (variant 1).data.owner | string | required; Tenant that owns the run, injected by the gateway; treat it as an opaque string. |
| (variant 1).data (variant 1).data.parent | null / object | required; The parent run {id, number, definition} that derived this run, or null for root runs. |
| (variant 1).data (variant 1).data.parent (variant 2).id | string | required; Id (run_) of the parent run. |
| (variant 1).data (variant 1).data.parent (variant 2).number | null / number | required; Sequence number of the parent run within its definition; null when the parent is ad-hoc. |
| (variant 1).data (variant 1).data.parent (variant 2).definition | null / object | required; Script or workflow {namespace, name} of the parent run; null for an ad-hoc parent. |
| (variant 1).data (variant 1).data.parent (variant 2).definition (variant 2).namespace | string | required; Namespace of the parent run's definition. |
| (variant 1).data (variant 1).data.parent (variant 2).definition (variant 2).name | string | required; Name of the parent run's definition. |
| (variant 1).data (variant 1).data.parent_run_id | string / null | required; ID of the parent run that derived this run; null for root runs |
| (variant 1).data (variant 1).data.root_run_id | string | required; Id of the root run of this run tree; a root run points to itself. |
| (variant 1).data (variant 1).data.depth | number | required; Depth in the run tree: 0 for the root run, plus 1 per child level, at most 10. |
| (variant 1).data (variant 1).data.attach | null / "wait" / "detach" | required; Relationship of a child run to its parent. wait means the parent waits for the child and the child's deadline is not later than the parent's; detach means the parent does not wait and the child is not cancelled when the parent is; null for root runs. |
| (variant 1).data (variant 1).data.deadline_at | string | required; Deadline of the run (RFC 3339 UTC): creation time plus deadline_seconds (scripts default to and are capped at 300 seconds; workflows default to 86400 and are capped at 604800), and an awaited child ends at least 1 second before its parent's deadline. |
| (variant 1).data (variant 1).data.created_at | string | required; Time the run was created (RFC 3339 UTC). |
| (variant 1).data (variant 1).data.started_at | null / string | required; Time execution started (RFC 3339 UTC), or null while still queued. |
| (variant 1).data (variant 1).data.ended_at | null / string | required; Time the run reached a terminal status (RFC 3339 UTC), or null while it is still active. |
| (variant 1).data (variant 1).data.updated_at | string | required; Time the run record was last updated (RFC 3339 UTC). |
| (variant 1).data (variant 1).data.heartbeat_at | null / string | required; Time of the executor's last liveness signal (RFC 3339 UTC), or null before the run starts. |
| (variant 1).data (variant 1).data.cancel_requested_at | null / string | required; Time the cancellation was requested (RFC 3339 UTC), or null. |
| (variant 1).data (variant 1).data.cancelled_by | null / object | required; Principal that requested cancellation, or null if not cancelled or not requested by a principal. |
| (variant 1).data (variant 1).data.cancelled_by (variant 2).type | "user" / "api_key" / "agent" / "run" / "trigger" | required; Principal type. user is a signed-in user; api_key is a platform API key; agent is an agent; run is an action performed by a run itself (for example a parent run); trigger is a trigger. |
| (variant 1).data (variant 1).data.cancelled_by (variant 2).id | string | required; Principal identifier whose meaning follows type: a user, API key, agent, run or trigger id. Treat it as an opaque string. |
| (variant 1).data (variant 1).data.cancel_reason | null / "user" / "parent_cancelled" / "deadline" / "executor_lost" | required; Why the run was cancelled. user is a user request; parent_cancelled is a cascade from a cancelled parent run; deadline means the deadline passed; executor_lost means the executor was lost; null if not cancelled. |
| (variant 1).data (variant 1).data.suspend_requested_at | null / string | required; Time suspension of the workflow was requested (RFC 3339 UTC), or null. |
| (variant 1).data (variant 1).data.suspended_by | null / object | required; Principal that requested suspension, or null. |
| (variant 1).data (variant 1).data.suspended_by (variant 2).type | "user" / "api_key" / "agent" / "run" / "trigger" | required; Principal type. user is a signed-in user; api_key is a platform API key; agent is an agent; run is an action performed by a run itself (for example a parent run); trigger is a trigger. |
| (variant 1).data (variant 1).data.suspended_by (variant 2).id | string | required; Principal identifier whose meaning follows type: a user, API key, agent, run or trigger id. Treat it as an opaque string. |
| (variant 1).data (variant 1).data.queued_ms | null / number | required; Milliseconds between creation and the start of execution; null until the run starts. |
| (variant 1).data (variant 1).data.run_ms | null / number | required; Milliseconds spent executing, excluding time spent waiting on wait points; fixed once the run ends. |
| (variant 1).data (variant 1).data.wait_ms | null / number | required; Total milliseconds spent waiting on wait points; null before any wait. |
| (variant 1).data (variant 1).data.usage | object / null | required; Returned only in single-run details (including expand); null in lists. Runs themselves are free; these are actual charges for capabilities such as models and search called during the run, attributed by call. Unrated usage is included later. Aggregation failure or timeout (1.5 seconds) returns null while details still return 200. |
| (variant 1).data (variant 1).data.usage (variant 1).currency | "USD" | required; Charge currency, always USD. |
| (variant 1).data (variant 1).data.usage (variant 1).cost | string | required; Rated actual charges for this run alone, excluding descendants, as an exact dollar decimal string with six fractional digits; 0.000000 when there is no usage. pattern: "^[0-9]+\.[0-9]{6}$" |
| (variant 1).data (variant 1).data.usage (variant 1).pending_events | integer | required; Number of this run's own unrated usage events whose charges will be included later. minimum: 0 |
| (variant 1).data (variant 1).data.usage (variant 1).by_service | object[] | required; This run's actual charges grouped by service, each with service and cost (a six-decimal dollar string); empty when there is no usage. |
| (variant 1).data (variant 1).data.usage (variant 1).by_service[].service | string | required; Name of the service that incurred the usage, for example router or search. |
| (variant 1).data (variant 1).data.usage (variant 1).by_service[].cost | string | required; Rated actual charges for that service as an exact dollar decimal string with six fractional digits. pattern: "^[0-9]+\.[0-9]{6}$" |
| (variant 1).data (variant 1).data.usage (variant 1).tree_cost | string / null | required; Rated actual charges for the entire run tree including the root, as a six-decimal dollar string; null for child runs. |
| (variant 1).data (variant 1).data.rerun_of | null / string | required; If this run was created by re-running another run, that run's id (run_); otherwise null. |
| (variant 1).data (variant 1).data.labels | object | required; User labels and system labels; trigger runs support 64 user labels, excluding system labels. |
| (variant 1).data (variant 1).data.trigger | object / null | required; Trigger {id, name} that started this run, or null when it was not started by a trigger. |
| (variant 1).data (variant 1).data.trigger (variant 1).id | string | required; Id (trg_) of the trigger that started this run. |
| (variant 1).data (variant 1).data.trigger (variant 1).name | string | required; Name of the trigger that started this run. |
| (variant 1).data (variant 1).data.cancel_message | string / null | required; User cancellation note (1–500 characters), or null when omitted. The cancel_reason enum is unchanged. |
| (variant 1).data (variant 1).data.input_truncated | boolean | optional; True when the list omits blob-backed input, setting input to null; inline values remain intact and run details return the full value. |
| (variant 1).data (variant 1).data.output_truncated | boolean | optional; True when the list omits blob-backed output, setting output to null; inline values remain intact and run details return the full value. |
| (variant 1).data (variant 1).specversion | "1.0" | required; CloudEvents specification version, always 1.0. |
| (variant 1).data (variant 1).id | string | required; Event id, unique within the run's ledger. |
| (variant 1).data (variant 1).source | string | required; Event source, of the form /automation/v1/runs/{id}. |
| (variant 1).data (variant 1).time | string | required; Time the event occurred (RFC 3339 UTC). |
| (variant 1).data (variant 1).cursor | string | required; Event cursor; use it as cursor to page, or as Last-Event-ID to resume an SSE stream. |
| (variant 1).data (variant 1).seq | number | required; Position of the event in the run's ledger, strictly increasing. |
| (variant 1).data (variant 2).type | "ai.praxis.automation.run.progress" | required; Event type: always ai.praxis.automation.run.progress, the run reported new progress; data is the progress. |
| (variant 1).data (variant 2).data | object | required; Progress reported by a run: a label, the amount completed and the total. no additional fields. |
| (variant 1).data (variant 2).data.label | string | required; Short progress label, such as the current stage. |
| (variant 1).data (variant 2).data.current | null / number | required; Amount completed so far, or null if not reported. |
| (variant 1).data (variant 2).data.total | null / number | required; Total amount, or null when unknown. |
| (variant 1).data (variant 2).data.updated_at | string | required; Time progress was last updated (RFC 3339 UTC). |
| (variant 1).data (variant 2).specversion | "1.0" | required; CloudEvents specification version, always 1.0. |
| (variant 1).data (variant 2).id | string | required; Event id, unique within the run's ledger. |
| (variant 1).data (variant 2).source | string | required; Event source, of the form /automation/v1/runs/{id}. |
| (variant 1).data (variant 2).time | string | required; Time the event occurred (RFC 3339 UTC). |
| (variant 1).data (variant 2).cursor | string | required; Event cursor; use it as cursor to page, or as Last-Event-ID to resume an SSE stream. |
| (variant 1).data (variant 2).seq | number | required; Position of the event in the run's ledger, strictly increasing. |
| (variant 1).data (variant 3).type | "ai.praxis.automation.call.started" / "ai.praxis.automation.call.completed" | required; Event type. ai.praxis.automation.call.started means a call started; ai.praxis.automation.call.completed means a call ended, successfully or not; data is the call record. |
| (variant 1).data (variant 3).data | object | required; Record of one call made during a script run (an action, platform API, script or workflow), ordered by seq. no additional fields. |
| (variant 1).data (variant 3).data.id | string | required; Call id, prefixed call_. |
| (variant 1).data (variant 3).data.run_id | string | required; Id (run_) of the script run that made the call. |
| (variant 1).data (variant 3).data.seq | number | required; Position of the call within the run, increasing in call order; together with run_id it locates the call. |
| (variant 1).data (variant 3).data.target | object | required; The target that was called: {kind, name, revision?, version?}. no additional fields. |
| (variant 1).data (variant 3).data.target.kind | "action" / "script" / "workflow" / "platform_api" | required; Target kind. action is an action; platform_api is a platform API operation; script is a script; workflow is a workflow. |
| (variant 1).data (variant 3).data.target.name | string | required; Target name: ns/name for an action, the operation name for a platform API, ns/name for a script or workflow. |
| (variant 1).data (variant 3).data.target.revision | string | optional; Id (actr_) of the action revision that executed; present only for action calls. |
| (variant 1).data (variant 3).data.target.version | string | optional; Exact version that ran; present only for script and workflow calls. |
| (variant 1).data (variant 3).data.args_preview | string | required; Single-line preview of the call arguments, truncated on the server; payloads over 32 KB are kept in object storage rather than inline. |
| (variant 1).data (variant 3).data.result_preview | null / string | required; Single-line preview of the returned value, truncated on the server; null until the call ends. |
| (variant 1).data (variant 3).data.status | "running" / "completed" / "faulted" / "cancelled" | required; Call status. running means still executing; completed means it returned normally; faulted means it failed and error explains why; cancelled means it was stopped because the run was cancelled. |
| (variant 1).data (variant 3).data.started_at | string | required; Time the call started (RFC 3339 UTC). |
| (variant 1).data (variant 3).data.ended_at | null / string | required; Time the call ended (RFC 3339 UTC), or null while it is running. |
| (variant 1).data (variant 3).data.duration_ms | null / number | required; Milliseconds from start to end, or null while the call is running. |
| (variant 1).data (variant 3).data.error | null / object | required; Error details when the call failed; null if it succeeded or is still running. |
| (variant 1).data (variant 3).data.error (variant 2).type | string | required; Platform error category, or the verbatim URI defined by a workflow raise. |
| (variant 1).data (variant 3).data.error (variant 2).code | null / string | required; Stable error code callers can branch on, or null. |
| (variant 1).data (variant 3).data.error (variant 2).title | string | required; Short error title. |
| (variant 1).data (variant 3).data.error (variant 2).detail | null / string | required; Detailed explanation of the error, or null. |
| (variant 1).data (variant 3).data.error (variant 2).source | null / object | required; Where the error happened: a workflow step or script call; null when unknown. |
| (variant 1).data (variant 3).data.error (variant 2).source (variant 2).kind | "call" / "task" | required; Location kind. task is a workflow step; call is a call in a script. |
| (variant 1).data (variant 3).data.error (variant 2).source (variant 2).reference | string | optional; For task: the JSON Pointer of the failing step. |
| (variant 1).data (variant 3).data.error (variant 2).source (variant 2).seq | number | optional; For call: sequence number of the failing call (matches Call.seq). |
| (variant 1).data (variant 3).data.error (variant 2).source (variant 2).action | object | optional; The failing action {name, revision}; present only when the error came from an action. no additional fields. |
| (variant 1).data (variant 3).data.error (variant 2).source (variant 2).action.name | string | required; Full action name, ns/name. |
| (variant 1).data (variant 3).data.error (variant 2).source (variant 2).action.revision | string | required; Id (actr_) of the action revision that ran. |
| (variant 1).data (variant 3).data.error (variant 2).request_id | string / null | optional; X-Request-Id of the downstream response that caused the failure; null or omitted when unavailable. |
| (variant 1).data (variant 3).data.error (variant 2).errors | object[] | optional; Field validation errors with RFC 6901 pointers and Chinese correction details. |
| (variant 1).data (variant 3).data.error (variant 2).errors[].pointer | string | required; RFC 6901 field pointer. TypeScript source diagnostics use /source for scripts or /implementation/source for actions; line/column are separate, not pointer segments. |
| (variant 1).data (variant 3).data.error (variant 2).errors[].detail | string | required; Chinese correction text saying what is wrong at this location and how to fix it. |
| (variant 1).data (variant 3).data.error (variant 2).errors[].hint | string | optional; Optional extra hint giving an actionable next step, such as using a different endpoint. |
| (variant 1).data (variant 3).data.error (variant 2).errors[].line | integer | optional; Line number, 1-based; present only when a source location is available. minimum: 1 |
| (variant 1).data (variant 3).data.error (variant 2).errors[].column | integer | optional; Column number, 1-based; present only when a source location is available. minimum: 1 |
| (variant 1).data (variant 3).data.error (variant 2).status | number | optional; Optional HTTP-style status declared by a workflow raise; platform errors may omit it. |
| (variant 1).data (variant 3).data.child_run_id | null / string | required; When the target is a script or workflow, the id of the child run this call started; null for action and platform API calls. |
| (variant 1).data (variant 3).data.invocation_key | string | required; Key identifying this logical call, sent downstream so that retries under at-least-once delivery can be deduplicated. |
| (variant 1).data (variant 3).data.request_id | string / null | required; Downstream response X-Request-Id, or null before a response or when the header is absent. |
| (variant 1).data (variant 3).specversion | "1.0" | required; CloudEvents specification version, always 1.0. |
| (variant 1).data (variant 3).id | string | required; Event id, unique within the run's ledger. |
| (variant 1).data (variant 3).source | string | required; Event source, of the form /automation/v1/runs/{id}. |
| (variant 1).data (variant 3).time | string | required; Time the event occurred (RFC 3339 UTC). |
| (variant 1).data (variant 3).cursor | string | required; Event cursor; use it as cursor to page, or as Last-Event-ID to resume an SSE stream. |
| (variant 1).data (variant 3).seq | number | required; Position of the event in the run's ledger, strictly increasing. |
| (variant 1).data (variant 4).type | "ai.praxis.automation.task.started" / "ai.praxis.automation.task.completed" | required; Event type. ai.praxis.automation.task.started means a step started; ai.praxis.automation.task.completed means a step ended; data is the step record. |
| (variant 1).data (variant 4).data | object | required; Record of one execution of a workflow step. A loop produces several records for the same step (different iteration) and a retry increments attempt. no additional fields. |
| (variant 1).data (variant 4).data.id | string | required; Identifier of this step execution record; treat it as an opaque string. |
| (variant 1).data (variant 4).data.run_id | string | required; ID of the owning run. |
| (variant 1).data (variant 4).data.reference | string | required; JSON Pointer of the step in the workflow document, for example /do/0/start. |
| (variant 1).data (variant 4).data.name | string | required; Step name, the key of the step in the workflow YAML. |
| (variant 1).data (variant 4).data.kind | "run" / "call" / "wait" / "set" / "for" / "fork" / "try" / "switch" / "emit" / "raise" / "listen" / "do" | required; Workflow step kind. call invokes an action; run starts a child script or workflow; wait pauses for a duration; set assigns variables; for loops; fork runs parallel branches; try is a block with catch; switch branches on conditions; emit publishes an event; raise throws an error; listen waits for an event; do is a block of sequential steps. |
| (variant 1).data (variant 4).data.iteration | number[] | required; Current iteration indexes of enclosing for loops, outermost first; an empty array outside loops. |
| (variant 1).data (variant 4).data.attempt | number | required; Attempt number of this execution; it increases when the step is re-executed by a retry. |
| (variant 1).data (variant 4).data.status | "running" / "completed" / "faulted" / "cancelled" / "pending" / "waiting" / "suspended" | required; Step status, with the same values as run status. pending is not started; running is executing; waiting is waiting on an event, timer or child run; suspended is held because the run was suspended; cancelled was cancelled; faulted failed; completed succeeded. |
| (variant 1).data (variant 4).data.skipped | boolean | required; true when the step was skipped without actually executing. |
| (variant 1).data (variant 4).data.started_at | null / string | required; Time the step started (RFC 3339 UTC), or null. |
| (variant 1).data (variant 4).data.ended_at | null / string | required; Time the step ended (RFC 3339 UTC), or null. |
| (variant 1).data (variant 4).data.duration_ms | null / number | required; Execution time in milliseconds, or null until it ends. |
| (variant 1).data (variant 4).data.input | null / string / number / boolean / object / JSON[] | required; Any JSON value: null, boolean, number, string, array or object. |
| (variant 1).data (variant 4).data.input (variant 5).* | null / string / number / boolean / object / JSON[] | Recursive JSON value. |
| (variant 1).data (variant 4).data.input (variant 6)[] | null / string / number / boolean / object / JSON[] | Recursive JSON value. |
| (variant 1).data (variant 4).data.input_truncated | boolean | required; true when input exceeded 32 KB and was truncated. |
| (variant 1).data (variant 4).data.output | null / string / number / boolean / object / JSON[] | required; Any JSON value: null, boolean, number, string, array or object. |
| (variant 1).data (variant 4).data.output (variant 5).* | null / string / number / boolean / object / JSON[] | Recursive JSON value. |
| (variant 1).data (variant 4).data.output (variant 6)[] | null / string / number / boolean / object / JSON[] | Recursive JSON value. |
| (variant 1).data (variant 4).data.output_truncated | boolean | required; True when output is omitted because it exceeds the inline limit. |
| (variant 1).data (variant 4).data.error | null / object | required; Error details when the step failed; null otherwise. |
| (variant 1).data (variant 4).data.error (variant 2).type | string | required; Platform error category, or the verbatim URI defined by a workflow raise. |
| (variant 1).data (variant 4).data.error (variant 2).code | null / string | required; Stable error code callers can branch on, or null. |
| (variant 1).data (variant 4).data.error (variant 2).title | string | required; Short error title. |
| (variant 1).data (variant 4).data.error (variant 2).detail | null / string | required; Detailed explanation of the error, or null. |
| (variant 1).data (variant 4).data.error (variant 2).source | null / object | required; Where the error happened: a workflow step or script call; null when unknown. |
| (variant 1).data (variant 4).data.error (variant 2).source (variant 2).kind | "call" / "task" | required; Location kind. task is a workflow step; call is a call in a script. |
| (variant 1).data (variant 4).data.error (variant 2).source (variant 2).reference | string | optional; For task: the JSON Pointer of the failing step. |
| (variant 1).data (variant 4).data.error (variant 2).source (variant 2).seq | number | optional; For call: sequence number of the failing call (matches Call.seq). |
| (variant 1).data (variant 4).data.error (variant 2).source (variant 2).action | object | optional; The failing action {name, revision}; present only when the error came from an action. no additional fields. |
| (variant 1).data (variant 4).data.error (variant 2).source (variant 2).action.name | string | required; Full action name, ns/name. |
| (variant 1).data (variant 4).data.error (variant 2).source (variant 2).action.revision | string | required; Id (actr_) of the action revision that ran. |
| (variant 1).data (variant 4).data.error (variant 2).request_id | string / null | optional; X-Request-Id of the downstream response that caused the failure; null or omitted when unavailable. |
| (variant 1).data (variant 4).data.error (variant 2).errors | object[] | optional; Field validation errors with RFC 6901 pointers and Chinese correction details. |
| (variant 1).data (variant 4).data.error (variant 2).errors[].pointer | string | required; RFC 6901 field pointer. TypeScript source diagnostics use /source for scripts or /implementation/source for actions; line/column are separate, not pointer segments. |
| (variant 1).data (variant 4).data.error (variant 2).errors[].detail | string | required; Chinese correction text saying what is wrong at this location and how to fix it. |
| (variant 1).data (variant 4).data.error (variant 2).errors[].hint | string | optional; Optional extra hint giving an actionable next step, such as using a different endpoint. |
| (variant 1).data (variant 4).data.error (variant 2).errors[].line | integer | optional; Line number, 1-based; present only when a source location is available. minimum: 1 |
| (variant 1).data (variant 4).data.error (variant 2).errors[].column | integer | optional; Column number, 1-based; present only when a source location is available. minimum: 1 |
| (variant 1).data (variant 4).data.error (variant 2).status | number | optional; Optional HTTP-style status declared by a workflow raise; platform errors may omit it. |
| (variant 1).data (variant 4).data.action | null / object | required; Action {name, revision} a call step executed; null for other steps. |
| (variant 1).data (variant 4).data.action (variant 2).name | string | required; Full action name, ns/name. |
| (variant 1).data (variant 4).data.action (variant 2).revision | string | required; Id (actr_) of the action revision that ran. |
| (variant 1).data (variant 4).data.child_run | null / object | required; Summary {id, number, status, resolved_version} of the child run a run step started; null for other steps. |
| (variant 1).data (variant 4).data.child_run (variant 2).id | string | required; Id (run_) of the child run, readable as soon as it is created. |
| (variant 1).data (variant 4).data.child_run (variant 2).number | null / number | required; Sequence number of the child run within its definition; null for ad-hoc runs. |
| (variant 1).data (variant 4).data.child_run (variant 2).status | "running" / "completed" / "faulted" / "cancelled" / "pending" / "waiting" / "suspended" | required; Status of the child run. pending is not started; running is executing; waiting is waiting; suspended is suspended; cancelled was cancelled; faulted failed; completed succeeded. An awaited child is updated to its terminal status when it ends; a detached child keeps the status at launch. |
| (variant 1).data (variant 4).data.child_run (variant 2).resolved_version | null / string | required; Exact version the child run resolved to; null for ad-hoc runs. |
| (variant 1).data (variant 4).specversion | "1.0" | required; CloudEvents specification version, always 1.0. |
| (variant 1).data (variant 4).id | string | required; Event id, unique within the run's ledger. |
| (variant 1).data (variant 4).source | string | required; Event source, of the form /automation/v1/runs/{id}. |
| (variant 1).data (variant 4).time | string | required; Time the event occurred (RFC 3339 UTC). |
| (variant 1).data (variant 4).cursor | string | required; Event cursor; use it as cursor to page, or as Last-Event-ID to resume an SSE stream. |
| (variant 1).data (variant 4).seq | number | required; Position of the event in the run's ledger, strictly increasing. |
| (variant 1).data (variant 5).type | "ai.praxis.automation.wait.created" / "ai.praxis.automation.wait.resolved" | required; Event type. ai.praxis.automation.wait.created means a wait point was created; ai.praxis.automation.wait.resolved means it was satisfied, expired or cancelled; data is the wait point. |
| (variant 1).data (variant 5).data | object | required; A wait point on a run; the workflow does not continue until it is resolved, expires or is cancelled. no additional fields. |
| (variant 1).data (variant 5).data.id | string | required; Wait point id, prefixed wait_; use it as wait_id when completing an event wait. |
| (variant 1).data (variant 5).data.run_id | string | required; Id (run_) of the run this wait belongs to. |
| (variant 1).data (variant 5).data.kind | "event" / "timer" / "child" | required; Wait kind. event waits for an external event that can be submitted with runs.completeWait; timer waits until resume_at; child waits for a child run to finish. |
| (variant 1).data (variant 5).data.state | "cancelled" / "open" / "resolved" / "expired" | required; Wait point state. open is still waiting; resolved was satisfied; expired passed its expires_at; cancelled was cancelled and can no longer be satisfied. |
| (variant 1).data (variant 5).data.task | null / object | required; The workflow step {reference, name} that produced the wait; null when there is no such step. |
| (variant 1).data (variant 5).data.task (variant 2).reference | string | required; JSON Pointer of the step, for example /do/2/wait_payment. |
| (variant 1).data (variant 5).data.task (variant 2).name | string | required; Step name, the key in the workflow YAML. |
| (variant 1).data (variant 5).data.resume_at | null / string | required; For kind=timer, the instant the run resumes (RFC 3339 UTC); null for other kinds. |
| (variant 1).data (variant 5).data.event_type | null / string | required; For kind=event, the event type being awaited; null for other kinds. |
| (variant 1).data (variant 5).data.child_run_id | null / string | required; For kind=child, the id of the child run being awaited; null for other kinds. |
| (variant 1).data (variant 5).data.created_at | string | required; Time the wait point was created (RFC 3339 UTC). |
| (variant 1).data (variant 5).data.expires_at | null / string | required; Time the wait point expires (RFC 3339 UTC), or null if it has no deadline. |
| (variant 1).data (variant 5).data.resolved_at | null / string | required; Time the wait point was resolved (RFC 3339 UTC), or null if still open. |
| (variant 1).data (variant 5).specversion | "1.0" | required; CloudEvents specification version, always 1.0. |
| (variant 1).data (variant 5).id | string | required; Event id, unique within the run's ledger. |
| (variant 1).data (variant 5).source | string | required; Event source, of the form /automation/v1/runs/{id}. |
| (variant 1).data (variant 5).time | string | required; Time the event occurred (RFC 3339 UTC). |
| (variant 1).data (variant 5).cursor | string | required; Event cursor; use it as cursor to page, or as Last-Event-ID to resume an SSE stream. |
| (variant 1).data (variant 5).seq | number | required; Position of the event in the run's ledger, strictly increasing. |
| (variant 2).event | "end" | optional; SSE event name end: sent once when the run has reached a terminal status, and the stream then closes. |
| (variant 2).data | object | optional; Always an empty object for the end event. |
Measured response
HTTP 200
id: WyJydW5fMDBtdjY3bWRsbTVkNWQ3MDdjZDAzMTc0NGU4NDM3ZjY3ZjZhY2YwMmFmYWFiZDE4ZTc2YmY4ZGI5ZDY3NDMzM2RlNmYxZmIyZjE6ZXZlbnRzIiwxXQ==
event: ai.praxis.automation.run.status
data: {"type":"ai.praxis.automation.run.status","data":{"id":"run_00mv67mdlm5d5d707cd031744e8437f67f6acf02afaabd18e76bf8db9d674333de6f1fb2f1","kind":"script","number":null,"definition":null,"target":null,"resolved_version":null,"source_digest":"7ae6678882a4ef2ea96e401c105d5c6ef512917cd72a9235289d2a3bf1f1b49d","language":"ts","status":"pending","progress":null,"current_wait":null,"counters":{"calls":0,"action_calls":0,"child_runs":0,"tasks_completed":0,"tasks_total":null},"input":{"n":41},"output":null,"error":null,"initiator":{"type":"api_key","id":"key_3e00b8984967"},"channel":"api","owner":"tnt_3a9759864ccb4e00","trigger":null,"parent":null,"parent_run_id":null,"root_run_id":"run_00mv67mdlm5d5d707cd031744e8437f67f6acf02afaabd18e76bf8db9d674333de6f1fb2f1","depth":0,"attach":null,"deadline_at":"2026-10-13T05:02:40.954Z","created_at":"2026-10-13T04:57:40.954Z","started_at":null,"ended_at":null,"updated_at":"2026-10-13T04:57:40.954Z","heartbeat_at":null,"cancel_requested_at":null,"cancelled_by":null,"cancel_reason":null,"cancel_message":null,"suspend_requested_at":null,"suspended_by":null,"queued_ms":null,"run_ms":null,"wait_ms":null,"usage":null,"rerun_of":null,"labels":{"namespace":"docs-samples","name":"sample-run-1791867412840-b05e8a"}},"specversion":"1.0","id":"WyJydW5fMDBtdjY3bWRsbTVkNWQ3MDdjZDAzMTc0NGU4NDM3ZjY3ZjZhY2YwMmFmYWFiZDE4ZTc2YmY4ZGI5ZDY3NDMzM2RlNmYxZmIyZjE6ZXZlbnRzIiwxXQ==","cursor":"WyJydW5fMDBtdjY3bWRsbTVkNWQ3MDdjZDAzMTc0NGU4NDM3ZjY3ZjZhY2YwMmFmYWFiZDE4ZTc2YmY4ZGI5ZDY3NDMzM2RlNmYxZmIyZjE6ZXZlbnRzIiwxXQ==","seq":1,"source":"/automation/v1/runs/run_00mv67mdlm5d5d707cd031744e8437f67f6acf02afaabd18e76bf8db9d674333de6f1fb2f1","time":"2026-10-13T04:57:40.954Z"}
id: WyJydW5fMDBtdjY3bWRsbTVkNWQ3MDdjZDAzMTc0NGU4NDM3ZjY3ZjZhY2YwMmFmYWFiZDE4ZTc2YmY4ZGI5ZDY3NDMzM2RlNmYxZmIyZjE6ZXZlbnRzIiwyXQ==
event: ai.praxis.automation.run.status
data: {"type":"ai.praxis.automation.run.status","data":{"id":"run_00mv67mdlm5d5d707cd031744e8437f67f6acf02afaabd18e76bf8db9d674333de6f1fb2f1","kind":"script","number":null,"definition":null,"target":null,"resolved_version":null,"source_digest":"7ae6678882a4ef2ea96e401c105d5c6ef512917cd72a9235289d2a3bf1f1b49d","language":"ts","status":"running","progress":null,"current_wait":null,"counters":{"calls":0,"action_calls":0,"child_runs":0,"tasks_completed":0,"tasks_total":null},"input":{"n":41},"output":null,"error":null,"initiator":{"type":"api_key","id":"key_3e00b8984967"},"channel":"api","owner":"tnt_3a9759864ccb4e00","trigger":null,"parent":null,"parent_run_id":null,"root_run_id":"run_00mv67mdlm5d5d707cd031744e8437f67f6acf02afaabd18e76bf8db9d674333de6f1fb2f1","depth":0,"attach":null,"deadline_at":"2026-10-13T05:02:40.954Z","created_at":"2026-10-13T04:57:40.954Z","started_at":"2026-10-13T04:57:42.283Z","ended_at":null,"updated_at":"2026-10-13T04:57:42.283Z","heartbeat_at":"2026-10-13T04:57:42.283Z","cancel_requested_at":null,"cancelled_by":null,"cancel_reason":null,"cancel_message":null,"suspend_requested_at":null,"suspended_by":null,"queued_ms":1329,"run_ms":null,"wait_ms":null,"usage":null,"rerun_of":null,"labels":{"namespace":"docs-samples","name":"sample-run-1791867412840-b05e8a"}},"specversion":"1.0","id":"WyJydW5fMDBtdjY3bWRsbTVkNWQ3MDdjZDAzMTc0NGU4NDM3ZjY3ZjZhY2YwMmFmYWFiZDE4ZTc2YmY4ZGI5ZDY3NDMzM2RlNmYxZmIyZjE6ZXZlbnRzIiwyXQ==","cursor":"WyJydW5fMDBtdjY3bWRsbTVkNWQ3MDdjZDAzMTc0NGU4NDM3ZjY3ZjZhY2YwMmFmYWFiZDE4ZTc2YmY4ZGI5ZDY3NDMzM2RlNmYxZmIyZjE6ZXZlbnRzIiwyXQ==","seq":2,"source":"/automation/v1/runs/run_00mv67mdlm5d5d707cd031744e8437f67f6acf02afaabd18e76bf8db9d674333de6f1fb2f1","time":"2026-10-13T04:57:42.283Z"}
id: WyJydW5fMDBtdjY3bWRsbTVkNWQ3MDdjZDAzMTc0NGU4NDM3ZjY3ZjZhY2YwMmFmYWFiZDE4ZTc2YmY4ZGI5ZDY3NDMzM2RlNmYxZmIyZjE6ZXZlbnRzIiwzXQ==
event: ai.praxis.automation.run.status
data: {"type":"ai.praxis.automation.run.status","data":{"id":"run_00mv67mdlm5d5d707cd031744e8437f67f6acf02afaabd18e76bf8db9d674333de6f1fb2f1","kind":"script","number":null,"definition":null,"target":null,"resolved_version":null,"source_digest":"7ae6678882a4ef2ea96e401c105d5c6ef512917cd72a9235289d2a3bf1f1b49d","language":"ts","status":"completed","progress":null,"current_wait":null,"counters":{"calls":0,"action_calls":0,"child_runs":0,"tasks_completed":0,"tasks_total":null},"input":{"n":41},"output":{"answer":42},"error":null,"initiator":{"type":"api_key","id":"key_3e00b8984967"},"channel":"api","owner":"tnt_3a9759864ccb4e00","trigger":null,"parent":null,"parent_run_id":null,"root_run_id":"run_00mv67mdlm5d5d707cd031744e8437f67f6acf02afaabd18e76bf8db9d674333de6f1fb2f1","depth":0,"attach":null,"deadline_at":"2026-10-13T05:02:40.954Z","created_at":"2026-10-13T04:57:40.954Z","started_at":"2026-10-13T04:57:42.283Z","ended_at":"2026-10-13T04:57:42.367Z","updated_at":"2026-10-13T04:57:42.367Z","heartbeat_at":"2026-10-13T04:57:42.283Z","cancel_requested_at":null,"cancelled_by":null,"cancel_reason":null,"cancel_message":null,"suspend_requested_at":null,"suspended_by":null,"queued_ms":1329,"run_ms":84,"wait_ms":null,"usage":null,"rerun_of":null,"labels":{"namespace":"docs-samples","name":"sample-run-1791867412840-b05e8a"}},"specversion":"1.0","id":"WyJydW5fMDBtdjY3bWRsbTVkNWQ3MDdjZDAzMTc0NGU4NDM3ZjY3ZjZhY2YwMmFmYWFiZDE4ZTc2YmY4ZGI5ZDY3NDMzM2RlNmYxZmIyZjE6ZXZlbnRzIiwzXQ==","cursor":"WyJydW5fMDBtdjY3bWRsbTVkNWQ3MDdjZDAzMTc0NGU4NDM3ZjY3ZjZhY2YwMmFmYWFiZDE4ZTc2YmY4ZGI5ZDY3NDMzM2RlNmYxZmIyZjE6ZXZlbnRzIiwzXQ==","seq":3,"source":"/automation/v1/runs/run_00mv67mdlm5d5d707cd031744e8437f67f6acf02afaabd18e76bf8db9d674333de6f1fb2f1","time":"2026-10-13T04:57:42.367Z"}
event: end
data: {}
Errors
| HTTP | Codes and description |
|---|---|
| 400 | INVALID_PARAMS: Invalid request parameters, path, cursor, or body format. |
| 404 | RUN_NOT_FOUND: The run does not exist or is not visible to this tenant. |
| default | RFC 9457 automation problem. 429 includes Retry-After. |
Authentication and common errors · Retain the X-Request-Id response header for troubleshooting.