Skip to content

Executions

When you trigger a pipeline, an execution is created to track its progress. Executions contain the input, output, status, and timing information for each pipeline run.

pending → running → succeeded
↘ failed
↘ cancelled
StatusDescription
pendingExecution queued, waiting to start
runningCurrently processing
succeededCompleted successfully
failedCompleted with an error
cancelledManually cancelled

Executions are created when you trigger a pipeline:

Trigger pipeline execution

Terminal window
curl -X POST https://api.catalyzed.ai/pipelines/EMbMEFLyUWEgvnhMWXVVa/trigger \
-H "Authorization: Bearer $API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"input": {
"dataInputs": {
"query": "What are the key trends in Q4 sales?"
}
}
}'

Get execution details

Terminal window
curl https://api.catalyzed.ai/pipeline-executions/GkR8I6rHBms3W4Qfa2-FN \
-H "Authorization: Bearer $API_TOKEN"

Response:

{
"executionId": "GkR8I6rHBms3W4Qfa2-FN",
"pipelineId": "EMbMEFLyUWEgvnhMWXVVa",
"pipelineName": "Document Summarizer",
"pipelineHandlerType": "language_model",
"pipelineInputsSchema": {
"files": [],
"datasets": [],
"dataInputs": [
{
"id": "query",
"label": "Query",
"schema": { "type": "string" },
"required": true
}
]
},
"pipelineOutputsSchema": {
"files": [],
"datasets": [],
"dataInputs": [
{
"id": "summary",
"label": "Summary",
"schema": { "type": "string" },
"required": true
}
]
},
"pipelineConfiguration": {},
"status": "running",
"progressPct": 45,
"progressMessage": "Processing document chunks...",
"input": {
"dataInputs": {
"query": "What are the key trends in Q4 sales?"
}
},
"output": null,
"outputCitations": [],
"errorMessage": null,
"createdAt": "2024-01-15T10:30:00Z",
"startedAt": "2024-01-15T10:30:02Z",
"completedAt": null,
"createdBy": "usr_abc123"
}

For long-running executions, poll until completion:

async function waitForExecution(executionId: string) {
while (true) {
const response = await fetch(
`https://api.catalyzed.ai/pipeline-executions/${executionId}`,
{ headers: { Authorization: `Bearer ${apiToken}` } }
);
const execution = await response.json();
if (execution.status === "succeeded") {
return execution.output;
}
if (execution.status === "failed") {
throw new Error(execution.errorMessage);
}
if (execution.status === "cancelled") {
throw new Error("Execution was cancelled");
}
console.log(`Progress: ${execution.progressPct}% - ${execution.progressMessage}`);
await new Promise(r => setTimeout(r, 2000)); // Poll every 2 seconds
}
}

For real-time updates, use Server-Sent Events (SSE) instead of polling:

Stream execution updates via SSE

Terminal window
curl -N https://api.catalyzed.ai/pipeline-executions/GkR8I6rHBms3W4Qfa2-FN/stream \
-H "Authorization: Bearer $API_TOKEN" \
-H "Accept: text/event-stream"
EventDescription
execution-stateFull execution state (same structure as GET endpoint)
stream-completeSent when execution reaches terminal state (succeeded/failed/cancelled)
pingKeepalive event sent every 15 seconds
  • Immediate state: Current execution state is sent immediately on connect
  • Real-time updates: Updates are pushed as they occur
  • Auto-close: Stream automatically closes when execution reaches terminal state
  • Connection timeout: 5 minutes (reconnect if longer execution expected)
  • Keepalive: Ping events sent every 15 seconds to maintain connection

List pipeline executions

Terminal window
curl "https://api.catalyzed.ai/pipeline-executions?pipelineId=EMbMEFLyUWEgvnhMWXVVa" \
-H "Authorization: Bearer $API_TOKEN"
Terminal window
# Only failed executions
curl "https://api.catalyzed.ai/pipeline-executions?pipelineId=EMbMEFLyUWEgvnhMWXVVa&status=failed" \
-H "Authorization: Bearer $API_TOKEN"
# Only running executions
curl "https://api.catalyzed.ai/pipeline-executions?pipelineId=EMbMEFLyUWEgvnhMWXVVa&status=running" \
-H "Authorization: Bearer $API_TOKEN"
Terminal window
curl "https://api.catalyzed.ai/pipeline-executions?pipelineId=EMbMEFLyUWEgvnhMWXVVa&page=1&pageSize=10" \
-H "Authorization: Bearer $API_TOKEN"

Cancel a running or pending execution:

Cancel execution

Terminal window
curl -X POST https://api.catalyzed.ai/pipeline-executions/GkR8I6rHBms3W4Qfa2-FN/cancel \
-H "Authorization: Bearer $API_TOKEN"

When an execution succeeds, the output field contains the result. The outputCitations field contains citations that map output fields to source documents, enabling attribution and provenance tracking.

See the Citations guide for details on resolving and displaying citations.

{
"executionId": "GkR8I6rHBms3W4Qfa2-FN",
"pipelineId": "EMbMEFLyUWEgvnhMWXVVa",
"pipelineName": "Document Summarizer",
"pipelineHandlerType": "language_model",
"pipelineInputsSchema": {
"files": [],
"datasets": [],
"dataInputs": [
{
"id": "query",
"label": "Query",
"schema": { "type": "string" },
"required": true
}
]
},
"pipelineOutputsSchema": {
"files": [],
"datasets": [],
"dataInputs": [
{
"id": "summary",
"label": "Summary",
"schema": { "type": "string" },
"required": true
}
]
},
"pipelineConfiguration": {},
"status": "succeeded",
"input": {
"dataInputs": {
"query": "What are the key trends in Q4 sales?"
}
},
"output": {
"summary": "Q4 sales showed a 15% increase year-over-year...",
"keyPoints": [
"Revenue grew 15% YoY",
"New customer acquisition up 22%",
"Average order value increased by $45"
]
},
"outputCitations": [
{
"outputPointer": "",
"citations": [
{
"type": "pdf_character_range",
"pdfFileExtractionId": "extr_abc123",
"charStart": 1500,
"charEnd": 1550
}
]
}
],
"errorMessage": null,
"progressPct": 100,
"progressMessage": "Complete",
"createdAt": "2024-01-15T10:30:00Z",
"startedAt": "2024-01-15T10:30:02Z",
"completedAt": "2024-01-15T10:32:15Z",
"createdBy": "usr_abc123"
}

When an execution fails, check the errorMessage:

{
"executionId": "GkR8I6rHBms3W4Qfa2-FN",
"pipelineId": "EMbMEFLyUWEgvnhMWXVVa",
"pipelineName": "Document Summarizer",
"pipelineHandlerType": "language_model",
"pipelineInputsSchema": {
"files": [],
"datasets": [],
"dataInputs": [
{
"id": "query",
"label": "Query",
"schema": { "type": "string" },
"required": true
}
]
},
"pipelineOutputsSchema": {
"files": [],
"datasets": [],
"dataInputs": [
{
"id": "summary",
"label": "Summary",
"schema": { "type": "string" },
"required": true
}
]
},
"pipelineConfiguration": {},
"status": "failed",
"input": {
"dataInputs": {
"query": "What are the key trends in Q4 sales?"
}
},
"output": null,
"outputCitations": [],
"errorMessage": "Rate limit exceeded",
"progressPct": 50,
"progressMessage": "Processing with language model...",
"createdAt": "2024-01-15T10:30:00Z",
"startedAt": "2024-01-15T10:30:02Z",
"completedAt": "2024-01-15T10:31:00Z",
"createdBy": "usr_abc123"
}
ErrorCauseResolution
Rate limit exceededToo many API callsRetry with backoff
Input validation failedInvalid input dataCheck input schema
Context too largeInput exceeds token limitReduce input size
Insufficient creditsTeam out of creditsAdd credits

Long-running executions report progress:

FieldDescription
progressPctCompletion percentage (0-100)
progressMessageHuman-readable status message

Example progress flow:

0% - "Initializing..."
20% - "Loading context documents..."
50% - "Processing with language model..."
80% - "Formatting results..."
100% - "Complete"
FieldTypeDescription
executionIdstringUnique identifier
pipelineIdstringParent pipeline
pipelineNamestringPipeline name (at execution time)
pipelineHandlerTypestringHandler type used for execution
pipelineInputsSchemaobjectInput schema at execution time (files, datasets, dataInputs)
pipelineOutputsSchemaobjectOutput schema at execution time (files, datasets, dataInputs)
pipelineConfigurationobjectPipeline config at execution time
statusstringCurrent status
progressPctnumberProgress percentage (0-100)
progressMessagestringStatus message
inputobjectInput data provided (files, datasets, dataInputs)
outputobjectResult (when succeeded)
outputCitationsarrayCitations mapping output fields to source documents
handlerOutputobjectHandler-specific runtime metadata (see below)
errorMessagestringError details (when failed)
createdAttimestampWhen execution was created
startedAttimestampWhen execution started running
completedAttimestampWhen execution finished
createdBystringUser who triggered this execution

The handlerOutput field contains handler-specific runtime metadata. The structure varies by handler type:

language_model:

{
"handlerType": "language_model",
"trace": { /* optional execution trace */ }
}

streaming_language_model:

{
"handlerType": "streaming_language_model",
"streamingChannelId": "ch_xyz123"
}

The streamingChannelId is used to subscribe to the token-level SSE stream at /channels/{channelId}/stream. Note: This field is null until the worker begins processing the execution.

code_agent_language_model:

{
"handlerType": "code_agent_language_model"
}

no_op:

{
"handlerType": "no_op"
}

The Catalyzed app provides a pipeline execution history view:

  1. Navigate to Pipelines
  2. Click on a pipeline
  3. Select the History tab

From here you can:

  • View all past executions
  • Filter by status
  • View execution details (input, output, timing)
  • Cancel running executions

Convert successful executions into ground truth examples for evaluations. You can either add to an existing example set or create a new one:

Option 1: Add to existing example set

Terminal window
curl -X POST https://api.catalyzed.ai/pipeline-executions/GkR8I6rHBms3W4Qfa2-FN/promote-to-example \
-H "Authorization: Bearer $API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"existingExampleSetId": "KjR8I6rHBms3W4Qfa2-FN",
"exampleName": "Verified production example",
"rationale": "Output verified by domain expert"
}'

Option 2: Create new example set

Terminal window
curl -X POST https://api.catalyzed.ai/pipeline-executions/GkR8I6rHBms3W4Qfa2-FN/promote-to-example \
-H "Authorization: Bearer $API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"newExampleSet": {
"name": "Production Examples",
"description": "Verified examples from production runs"
},
"exampleName": "Verified production example",
"rationale": "Output verified by domain expert"
}'

This creates an example using the execution’s input and output as ground truth. See the Promoting Executions Guide for details.

Pipeline executions include outputCitations that map output fields to source documents. To display citations in your UI:

  1. Extract citations from outputCitations
  2. Resolve them using /citations/resolve
  3. Display file names, page numbers, and cited text

See the Citations guide for complete documentation on working with citations.

See the Pipeline Executions API for complete endpoint documentation.