WorkflowRunOutput

Attributes of WorkflowRunOutput, the events streamed during a workflow run, and workflow metrics.

WorkflowRunOutput Attributes

ParameterTypeDefaultDescription
inputOptional[Union[str, Dict[str, Any], List[Any], BaseModel]]NoneInput passed to the workflow run
contentOptional[Union[str, Dict[str, Any], List[Any], BaseModel, Any]]NoneMain content/output from the workflow execution
content_typestr"str"Type of the content (e.g., "str", "json", etc.)
workflow_idOptional[str]NoneUnique identifier of the executed workflow
workflow_nameOptional[str]NoneName of the executed workflow
run_idOptional[str]NoneUnique identifier for this specific run
session_idOptional[str]NoneSession UUID associated with this run
user_idOptional[str]NoneUser ID associated with the run
parent_run_idOptional[str]NoneParent workflow run ID, set for nested workflows
workflow_step_idOptional[str]NoneID of the parent workflow step, set for nested workflows
imagesOptional[List[Image]]NoneList of image artifacts generated
videosOptional[List[Video]]NoneList of video artifacts generated
audioOptional[List[Audio]]NoneList of audio artifacts generated
filesOptional[List[File]]NoneList of file artifacts generated
response_audioOptional[Audio]NoneAudio response from the workflow
step_resultsList[Union[StepOutput, List[StepOutput]]][]Actual step execution results as StepOutput objects
step_executor_runsOptional[List[Union[RunOutput, TeamRunOutput, WorkflowRunOutput]]]NoneStore agent/team/nested workflow responses separately with parent_run_id references
workflow_agent_runOptional[RunOutput]NoneFull RunOutput of the workflow agent, when one is used. Its parent_run_id points to this run
eventsOptional[List[WorkflowRunOutputEvent]]NoneEvents captured during workflow execution
metricsOptional[WorkflowMetrics]NoneWorkflow metrics including duration and step-level data
metadataOptional[Dict[str, Any]]NoneAdditional metadata stored with the response
created_atintint(time())Unix timestamp when the response was created
statusRunStatusRunStatus.pendingCurrent status of the workflow run
queue_attemptOptional[int]NoneDurable queue attempt that owns this run output
step_requirementsOptional[List[StepRequirement]]NoneHITL requirements to resolve before continuing the run. Accumulates across pauses; the last entry is the active one. See HITL overview.
error_requirementsOptional[List[ErrorRequirement]]NoneError-level HITL requirements when a step failed with on_error="pause". See Error Handling.
paused_step_indexOptional[int]NoneIndex of the paused step
paused_step_nameOptional[str]NoneName of the paused step
pause_kindOptional[Union[PauseKind, str]]NoneActive pause kind: "step" or "executor". None when not paused.

HITL Properties

Read-only properties that filter step_requirements for common cases:

PropertyReturnsDescription
is_pausedboolTrue if the workflow is paused (status == RunStatus.paused)
is_cancelledboolTrue if the workflow was cancelled
active_step_requirementsList[StepRequirement]Requirements that have not been resolved yet
steps_requiring_confirmationList[StepRequirement]Requirements needing confirm/reject
steps_requiring_user_inputList[StepRequirement]Requirements needing user input values
steps_requiring_output_reviewList[StepRequirement]Requirements needing output review
steps_requiring_routeList[StepRequirement]Routers needing route selection
steps_requiring_executor_resolutionList[StepRequirement]Steps with a paused agent/team tool call
active_error_requirementsList[ErrorRequirement]Error requirements that still need user decision
steps_with_errorsList[ErrorRequirement]Error requirements that still need a retry/skip decision

WorkflowRunOutputEvent Types and Attributes

BaseWorkflowRunOutputEvent Attributes

ParameterTypeDefaultDescription
created_atintint(time())Unix timestamp when the event was created
eventstr""Type of the event (e.g., "WorkflowStarted")
workflow_idOptional[str]NoneUnique identifier of the workflow
workflow_nameOptional[str]NoneName of the workflow
session_idOptional[str]NoneSession UUID associated with the workflow
run_idOptional[str]NoneUnique identifier for the workflow run
step_idOptional[str]NoneUnique identifier for the current step
parent_step_idOptional[str]NoneUnique identifier for the parent step (for nested steps)
event_indexOptional[int]NoneMonotonic replay cursor for the stream. Values may contain gaps across retries and continued runs
nested_depthint0Nesting depth of the workflow. 0 for top-level, incremented for each nested workflow

WorkflowStartedEvent Attributes

ParameterTypeDefaultDescription
eventstrWorkflowRunEvent.workflow_started.valueEvent type identifier
Inherits all fields from BaseWorkflowRunOutputEvent

WorkflowCompletedEvent Attributes

ParameterTypeDefaultDescription
eventstrWorkflowRunEvent.workflow_completed.valueEvent type identifier
contentOptional[Any]NoneFinal output content from the workflow
content_typestr"str"Type of the content
step_resultsList[StepOutput][]List of all step execution results
step_executor_runsOptional[List[Union[RunOutput, TeamRunOutput, WorkflowRunOutput]]]NoneUnderlying agent, team, and nested workflow runs
metadataOptional[Dict[str, Any]]NoneAdditional metadata from workflow execution
metricsOptional[WorkflowMetrics]NoneAggregated workflow execution metrics
run_outputOptional[WorkflowRunOutput]NoneFull workflow run output, set for nested workflows
Inherits all fields from BaseWorkflowRunOutputEvent

WorkflowPausedEvent Attributes

Emitted after the inner step-level pause event (StepPaused, StepExecutorPaused, or RouterPaused). Carries the full paused workflow state so clients can issue a continue without merging multiple events.

ParameterTypeDefaultDescription
eventstrWorkflowRunEvent.workflow_paused.valueEvent type identifier
statusOptional[str]NoneStatus of the paused run
paused_step_indexOptional[int]NoneIndex of the paused step
paused_step_nameOptional[str]NoneName of the paused step
pause_kindOptional[Union[PauseKind, str]]NoneActive pause kind: "step" or "executor"
step_requirementsOptional[List[StepRequirement]]NoneHITL requirements to resolve before continuing
step_resultsOptional[List[Union[StepOutput, List[StepOutput]]]]NoneStep results so far. Nested lists support parallel and loop iterations
step_executor_runsOptional[List[Union[RunOutput, TeamRunOutput, WorkflowRunOutput]]]NoneUnderlying agent, team, and nested workflow runs
contentOptional[Any]NoneConvenience content field
metadataOptional[Dict[str, Any]]NoneAdditional metadata
Inherits all fields from BaseWorkflowRunOutputEvent

WorkflowCancelledEvent Attributes

ParameterTypeDefaultDescription
eventstrWorkflowRunEvent.workflow_cancelled.valueEvent type identifier
reasonOptional[str]NoneReason for workflow cancellation
contentOptional[str]NoneCancellation message
is_cancelledboolTrueProperty indicating the workflow was cancelled
Inherits all fields from BaseWorkflowRunOutputEvent

WorkflowErrorEvent Attributes

ParameterTypeDefaultDescription
eventstrWorkflowRunEvent.workflow_error.valueEvent type identifier
errorOptional[str]NoneError message
error_typeOptional[str]NoneType of the exception that caused the error
error_idOptional[str]NoneID of the error, from the exception
additional_dataOptional[Dict[str, Any]]NoneExtra data attached to the exception
Inherits all fields from BaseWorkflowRunOutputEvent

WorkflowAgentStartedEvent Attributes

Emitted when the workflow agent starts, before it decides to run the workflow or answer directly.

ParameterTypeDefaultDescription
eventstrWorkflowRunEvent.workflow_agent_started.valueEvent type identifier
Inherits all fields from BaseWorkflowRunOutputEvent

WorkflowAgentCompletedEvent Attributes

Emitted when the workflow agent completes, after running the workflow or answering directly.

ParameterTypeDefaultDescription
eventstrWorkflowRunEvent.workflow_agent_completed.valueEvent type identifier
contentOptional[Any]NoneContent produced by the workflow agent
Inherits all fields from BaseWorkflowRunOutputEvent

StepStartedEvent Attributes

ParameterTypeDefaultDescription
eventstrWorkflowRunEvent.step_started.valueEvent type identifier
step_nameOptional[str]NoneName of the step being started
step_indexOptional[Union[int, tuple]]NoneIndex or position of the step
Inherits all fields from BaseWorkflowRunOutputEvent

StepCompletedEvent Attributes

ParameterTypeDefaultDescription
eventstrWorkflowRunEvent.step_completed.valueEvent type identifier
step_nameOptional[str]NoneName of the step that completed
step_indexOptional[Union[int, tuple]]NoneIndex or position of the step
contentOptional[Any]NoneContent output from the step
content_typestr"str"Type of the content
imagesOptional[List[Image]]NoneImage artifacts from the step
videosOptional[List[Video]]NoneVideo artifacts from the step
audioOptional[List[Audio]]NoneAudio artifacts from the step
response_audioOptional[Audio]NoneAudio response from the step
step_responseOptional[StepOutput]NoneComplete step execution result object
Inherits all fields from BaseWorkflowRunOutputEvent

StepPausedEvent Attributes

Emitted when step-level HITL pauses a step before execution.

ParameterTypeDefaultDescription
eventstrWorkflowRunEvent.step_paused.valueEvent type identifier
step_nameOptional[str]NoneName of the paused step
step_indexOptional[Union[int, tuple]]NoneIndex of the paused step
step_idOptional[str]NoneUnique step identifier
requires_confirmationboolFalsePause is for confirmation
confirmation_messageOptional[str]NoneMessage shown to the user
requires_user_inputboolFalsePause is for user input
user_input_messageOptional[str]NoneMessage shown to the user
user_input_schemaOptional[List[Dict[str, Any]]]NoneSchema describing the requested input fields
Inherits all fields from BaseWorkflowRunOutputEvent

StepContinuedEvent Attributes

Emitted when a paused step resumes after step-level HITL is resolved.

ParameterTypeDefaultDescription
eventstrWorkflowRunEvent.step_continued.valueEvent type identifier
step_nameOptional[str]NoneName of the resuming step
step_indexOptional[Union[int, tuple]]NoneIndex of the step
step_idOptional[str]NoneUnique step identifier
Inherits all fields from BaseWorkflowRunOutputEvent

StepExecutorPausedEvent Attributes

Emitted when the agent or team running a step pauses on a tool call that requires HITL. See Executor HITL.

ParameterTypeDefaultDescription
eventstrWorkflowRunEvent.step_executor_paused.valueEvent type identifier
step_nameOptional[str]NoneName of the step containing the executor
step_indexOptional[Union[int, tuple]]NoneIndex of the step
step_idOptional[str]NoneUnique step identifier
executor_idOptional[str]NoneID of the paused agent or team
executor_nameOptional[str]NoneName of the paused agent or team
executor_run_idOptional[str]NoneRun ID of the paused executor
executor_typeOptional[Union[ExecutorType, str]]None"agent" or "team"
executor_requirementsOptional[List[Any]]NoneTool-level HITL requirements awaiting resolution
Inherits all fields from BaseWorkflowRunOutputEvent

StepExecutorContinuedEvent Attributes

Emitted when a paused executor resumes after executor-level HITL is resolved.

ParameterTypeDefaultDescription
eventstrWorkflowRunEvent.step_executor_continued.valueEvent type identifier
step_nameOptional[str]NoneName of the step containing the executor
step_indexOptional[Union[int, tuple]]NoneIndex of the step
step_idOptional[str]NoneUnique step identifier
executor_idOptional[str]NoneID of the resuming agent or team
executor_nameOptional[str]NoneName of the resuming agent or team
executor_run_idOptional[str]NoneRun ID of the resuming executor
executor_typeOptional[Union[ExecutorType, str]]None"agent" or "team"
Inherits all fields from BaseWorkflowRunOutputEvent

StepOutputReviewEvent Attributes

Emitted when a step requires post-execution output review. See Output Review.

ParameterTypeDefaultDescription
eventstrWorkflowRunEvent.step_output_review.valueEvent type identifier
step_nameOptional[str]NoneName of the step under review
step_indexOptional[Union[int, tuple]]NoneIndex of the step
step_idOptional[str]NoneUnique step identifier
requires_output_reviewboolTrueAlways True for this event
output_review_messageOptional[str]NoneMessage shown to the user during review
Inherits all fields from BaseWorkflowRunOutputEvent

StepErrorEvent Attributes

ParameterTypeDefaultDescription
eventstrWorkflowRunEvent.step_error.valueEvent type identifier
step_nameOptional[str]NoneName of the step that errored
step_indexOptional[Union[int, tuple]]NoneIndex of the step
errorOptional[str]NoneError message
Inherits all fields from BaseWorkflowRunOutputEvent

ConditionExecutionStartedEvent Attributes

ParameterTypeDefaultDescription
eventstrWorkflowRunEvent.condition_execution_started.valueEvent type identifier
step_nameOptional[str]NoneName of the condition step
step_indexOptional[Union[int, tuple]]NoneIndex or position of the condition
condition_resultOptional[bool]NoneResult of the condition evaluation
Inherits all fields from BaseWorkflowRunOutputEvent

ConditionExecutionCompletedEvent Attributes

ParameterTypeDefaultDescription
eventstrWorkflowRunEvent.condition_execution_completed.valueEvent type identifier
step_nameOptional[str]NoneName of the condition step
step_indexOptional[Union[int, tuple]]NoneIndex or position of the condition
condition_resultOptional[bool]NoneResult of the condition evaluation
executed_stepsOptional[int]NoneNumber of steps executed based on condition
branchOptional[str]NoneBranch that was executed: "if", "else", or None when the condition was false with no else steps
step_resultsList[StepOutput][]Results from executed steps
Inherits all fields from BaseWorkflowRunOutputEvent

ParallelExecutionStartedEvent Attributes

ParameterTypeDefaultDescription
eventstrWorkflowRunEvent.parallel_execution_started.valueEvent type identifier
step_nameOptional[str]NoneName of the parallel step
step_indexOptional[Union[int, tuple]]NoneIndex or position of the parallel step
parallel_step_countOptional[int]NoneNumber of steps to execute in parallel
Inherits all fields from BaseWorkflowRunOutputEvent

ParallelExecutionCompletedEvent Attributes

ParameterTypeDefaultDescription
eventstrWorkflowRunEvent.parallel_execution_completed.valueEvent type identifier
step_nameOptional[str]NoneName of the parallel step
step_indexOptional[Union[int, tuple]]NoneIndex or position of the parallel step
parallel_step_countOptional[int]NoneNumber of steps executed in parallel
step_resultsList[StepOutput]field(default_factory=list)Results from all parallel steps
Inherits all fields from BaseWorkflowRunOutputEvent

LoopExecutionStartedEvent Attributes

ParameterTypeDefaultDescription
eventstrWorkflowRunEvent.loop_execution_started.valueEvent type identifier
step_nameOptional[str]NoneName of the loop step
step_indexOptional[Union[int, tuple]]NoneIndex or position of the loop
max_iterationsOptional[int]NoneMaximum number of iterations allowed
Inherits all fields from BaseWorkflowRunOutputEvent

LoopIterationStartedEvent Attributes

ParameterTypeDefaultDescription
eventstrWorkflowRunEvent.loop_iteration_started.valueEvent type identifier
step_nameOptional[str]NoneName of the loop step
step_indexOptional[Union[int, tuple]]NoneIndex or position of the loop
iterationint0Current iteration number
max_iterationsOptional[int]NoneMaximum number of iterations allowed
Inherits all fields from BaseWorkflowRunOutputEvent

LoopIterationCompletedEvent Attributes

ParameterTypeDefaultDescription
eventstrWorkflowRunEvent.loop_iteration_completed.valueEvent type identifier
step_nameOptional[str]NoneName of the loop step
step_indexOptional[Union[int, tuple]]NoneIndex or position of the loop
iterationint0Current iteration number
max_iterationsOptional[int]NoneMaximum number of iterations allowed
iteration_resultsList[StepOutput][]Results from this iteration
should_continueboolTrueWhether the loop should continue
Inherits all fields from BaseWorkflowRunOutputEvent

LoopExecutionCompletedEvent Attributes

ParameterTypeDefaultDescription
eventstrWorkflowRunEvent.loop_execution_completed.valueEvent type identifier
step_nameOptional[str]NoneName of the loop step
step_indexOptional[Union[int, tuple]]NoneIndex or position of the loop
total_iterationsint0Total number of iterations completed
max_iterationsOptional[int]NoneMaximum number of iterations allowed
all_resultsList[List[StepOutput]][]Results from all iterations
Inherits all fields from BaseWorkflowRunOutputEvent

RouterExecutionStartedEvent Attributes

ParameterTypeDefaultDescription
eventstrWorkflowRunEvent.router_execution_started.valueEvent type identifier
step_nameOptional[str]NoneName of the router step
step_indexOptional[Union[int, tuple]]NoneIndex or position of the router
selected_stepsList[str]field(default_factory=list)Names of steps selected by the router
Inherits all fields from BaseWorkflowRunOutputEvent

RouterExecutionCompletedEvent Attributes

ParameterTypeDefaultDescription
eventstrWorkflowRunEvent.router_execution_completed.valueEvent type identifier
step_nameOptional[str]NoneName of the router step
step_indexOptional[Union[int, tuple]]NoneIndex or position of the router
selected_stepsList[str]field(default_factory=list)Names of steps that were selected
executed_stepsOptional[int]NoneNumber of steps executed
step_resultsList[StepOutput]field(default_factory=list)Results from executed steps
Inherits all fields from BaseWorkflowRunOutputEvent

RouterPausedEvent Attributes

Emitted when a router pauses for the user to select route(s). See Router HITL.

ParameterTypeDefaultDescription
eventstrWorkflowRunEvent.router_paused.valueEvent type identifier
step_nameOptional[str]NoneName of the router step
step_indexOptional[Union[int, tuple]]NoneIndex of the router
available_choicesList[str][]Names of routes the user can select from
user_input_messageOptional[str]NoneMessage shown to the user
allow_multiple_selectionsboolFalseWhether the user can select multiple routes
Inherits all fields from BaseWorkflowRunOutputEvent

StepsExecutionStartedEvent Attributes

ParameterTypeDefaultDescription
eventstrWorkflowRunEvent.steps_execution_started.valueEvent type identifier
step_nameOptional[str]NoneName of the steps group
step_indexOptional[Union[int, tuple]]NoneIndex or position of the steps group
steps_countOptional[int]NoneNumber of steps in the group
Inherits all fields from BaseWorkflowRunOutputEvent

StepsExecutionCompletedEvent Attributes

ParameterTypeDefaultDescription
eventstrWorkflowRunEvent.steps_execution_completed.valueEvent type identifier
step_nameOptional[str]NoneName of the steps group
step_indexOptional[Union[int, tuple]]NoneIndex or position of the steps group
steps_countOptional[int]NoneNumber of steps in the group
executed_stepsOptional[int]NoneNumber of steps actually executed
step_resultsList[StepOutput]field(default_factory=list)Results from all executed steps
Inherits all fields from BaseWorkflowRunOutputEvent

StepOutputEvent Attributes

ParameterTypeDefaultDescription
eventstr"StepOutput"Event type identifier
step_nameOptional[str]NoneName of the step that produced output
step_indexOptional[Union[int, tuple]]NoneIndex or position of the step
step_outputOptional[StepOutput]NoneComplete step execution result
Inherits all fields from BaseWorkflowRunOutputEvent
Properties (read-only):
contentOptional[Union[str, Dict[str, Any], List[Any], BaseModel, Any]]-Content from the step output
imagesOptional[List[Image]]-Images from the step output
videosOptional[List[Video]]-Videos from the step output
audioOptional[List[Audio]]-Audio from the step output
successbool-Whether the step succeeded
errorOptional[str]-Error message if step failed
stopbool-Whether the step requested early termination

CustomEvent Attributes

ParameterTypeDefaultDescription
eventstrWorkflowRunEvent.custom_event.valueEvent type identifier
Inherits all fields from BaseWorkflowRunOutputEvent

WorkflowMetrics

ParameterTypeDefaultDescription
stepsDict[str, StepMetrics]-Step-level metrics mapped by step name
timerOptional[Timer]NoneInternal timer that computes duration. Excluded from to_dict()
durationOptional[float]NoneTotal workflow execution time in seconds

StepMetrics

ParameterTypeDefaultDescription
step_namestr-Name of the step
executor_typestr-Type of executor (e.g., "agent", "team", "function", "workflow")
executor_namestr-Name of the executor
metricsOptional[RunMetrics]NoneExecution metrics (duration, tokens, model usage)