The TeamRunOutput class represents the response from a team run, containing both the team's overall response and individual member responses. It supports streaming and provides real-time events throughout the execution of a team.
Attribute Type Default Description contentAnyNoneContent of the response content_typestr"str"Specifies the data type of the content messagesOptional[List[Message]]NoneA list of messages included in the response metricsOptional[RunMetrics]NoneUsage metrics of the run modelOptional[str]NoneThe model used in the run model_providerOptional[str]NoneThe model provider used in the run member_responsesList[Union[TeamRunOutput, RunOutput]][]Responses from individual team members run_idOptional[str]NoneRun ID team_idOptional[str]NoneTeam ID for the run team_nameOptional[str]NoneName of the team session_idOptional[str]NoneSession ID for the run parent_run_idOptional[str]NoneParent run ID if this is a nested run user_idOptional[str]NoneUser ID for the run toolsOptional[List[ToolExecution]]NoneList of tool executions from the run imagesOptional[List[Image]]NoneList of images from member runs videosOptional[List[Video]]NoneList of videos from member runs audioOptional[List[Audio]]NoneList of audio snippets from member runs filesOptional[List[File]]NoneList of files from member runs response_audioOptional[Audio]NoneThe model's raw response in audio inputOptional[TeamRunInput]NoneInput media and messages from user reasoning_contentOptional[str]NoneAny reasoning content the model produced citationsOptional[Citations]NoneAny citations used in the response followupsOptional[List[str]]NoneSuggested followup prompts generated after the run, when followups are enabled model_provider_dataOptional[Dict[str, Any]]NoneModel provider specific metadata metadataOptional[Dict[str, Any]]NoneAdditional metadata for the run session_stateOptional[Dict[str, Any]]NoneSession state for the run referencesOptional[List[MessageReferences]]NoneMessage references additional_inputOptional[List[Message]]NoneAdditional input messages reasoning_stepsOptional[List[ReasoningStep]]NoneReasoning steps taken during execution reasoning_messagesOptional[List[Message]]NoneMessages related to reasoning created_atintCurrent timestamp Unix timestamp of the response creation eventsOptional[List[Union[RunOutputEvent, TeamRunOutputEvent]]]NoneList of events that occurred during the run statusRunStatusRunStatus.runningCurrent status of the run requirementsOptional[List[RunRequirement]]NoneHITL requirements to continue a paused run queue_attemptOptional[int]NoneDurable queue attempt that owns this run output last_checkpoint_at_message_indexOptional[int]NoneIndex into messages at the most recent checkpoint write. Set when checkpoint="tool-batch" persists mid-run state forked_from_run_idOptional[str]NoneRun ID this run was forked from forked_from_message_indexOptional[int]NoneMessage index in the source run where the fork was created forked_from_session_idOptional[str]NoneSession ID this run was originally created in. Set when a session is forked and preserved across nested forks regenerated_fromOptional[str]NoneRun ID of the immediate predecessor this run was regenerated from workflow_step_idOptional[str]NoneFK: Points to StepOutput.step_id
The following events are sent by the Team.run() function depending on the team's configuration:
Event Type Description TeamRunStartedIndicates the start of a team run TeamRunContentContains the model's response text as individual chunks TeamRunContentCompletedSignals completion of content streaming TeamRunIntermediateContentContains intermediate content during the run TeamRunCompletedSignals successful completion of the team run TeamRunErrorIndicates an error occurred during the team run TeamRunCancelledSignals that the team run was cancelled TeamRunPausedIndicates that the team run is paused for HITL requirements TeamRunContinuedIndicates that a paused team run has continued
Event Type Description TeamPreHookStartedIndicates the start of a pre-run hook TeamPreHookCompletedSignals completion of a pre-run hook execution
Event Type Description TeamPostHookStartedIndicates the start of a post-run hook TeamPostHookCompletedSignals completion of a post-run hook execution
Event Type Description TeamToolCallStartedIndicates the start of a tool call TeamToolCallCompletedSignals completion of a tool call, including tool call results TeamToolCallErrorIndicates a tool call error
Event Type Description TeamReasoningStartedIndicates the start of the team's reasoning process TeamReasoningStepContains a single step in the reasoning process TeamReasoningContentDeltaStreams reasoning content chunks TeamReasoningCompletedSignals completion of the reasoning process
Event Type Description TeamMemoryUpdateStartedIndicates that the team is updating its memory TeamMemoryUpdateCompletedSignals completion of a memory update
Event Type Description TeamSessionSummaryStartedIndicates the start of session summary generation TeamSessionSummaryCompletedSignals completion of session summary generation
Event Type Description TeamParserModelResponseStartedIndicates the start of parser model response TeamParserModelResponseCompletedSignals completion of parser model response
Event Type Description TeamOutputModelResponseStartedIndicates the start of output model response TeamOutputModelResponseCompletedSignals completion of output model response
Event Type Description TeamModelRequestStartedIndicates the start of a model request TeamModelRequestCompletedSignals completion of a model request
Event Type Description TeamCompressionStartedIndicates the start of tool result compression TeamCompressionCompletedSignals completion of tool result compression
Event Type Description TeamFollowupsStartedIndicates the start of followup generation TeamFollowupsCompletedSignals completion of followup generation, including the suggested prompts
Event Type Description TeamTaskIterationStartedIndicates the start of a task iteration in tasks mode TeamTaskIterationCompletedSignals completion of a task iteration in tasks mode TeamTaskStateUpdatedContains the full structured task list after a state change TeamTaskCreatedSent immediately when a task is created TeamTaskUpdatedSent immediately when a task status changes
Event Type Description CustomEventCustom event emitted by the team
All events inherit from BaseTeamRunEvent which provides these common attributes:
Attribute Type Default Description created_atintCurrent timestamp Unix timestamp of the event creation eventstr""The type of event team_idstr""ID of the team generating the event team_namestr""Name of the team generating the event run_idOptional[str]NoneID of the current run parent_run_idOptional[str]NoneParent run ID if this is a nested run session_idOptional[str]NoneID of the current session workflow_idOptional[str]NoneID of the workflow workflow_run_idOptional[str]NoneID of the workflow's run step_idOptional[str]NoneID of the workflow step step_nameOptional[str]NoneName of the workflow step step_indexOptional[int]NoneIndex of the workflow step event_indexOptional[int]NoneMonotonic replay cursor for the stream. Values may contain gaps across retries and continued runs nested_depthint0Nesting depth of the execution. 0 for top-level, incremented for each level of nesting contentOptional[Any]NoneFor backwards compatibility
Attribute Type Default Description eventstr"TeamRunStarted"Event type modelstr""The model being used model_providerstr""The provider of the model
Attribute Type Default Description eventstr"TeamRunIntermediateContent"Event type contentOptional[Any]NoneIntermediate content of the response content_typestr"str"Type of the content
Attribute Type Default Description eventstr"TeamRunContentCompleted"Event type
Attribute Type Default Description eventstr"TeamRunContent"Event type contentOptional[Any]NoneThe content of the response content_typestr"str"Type of the content reasoning_contentOptional[str]NoneReasoning content produced citationsOptional[Citations]NoneCitations used in the response model_provider_dataOptional[Dict[str, Any]]NoneModel provider specific metadata response_audioOptional[Audio]NoneModel's audio response imageOptional[Image]NoneImage attached to the response referencesOptional[List[MessageReferences]]NoneMessage references additional_inputOptional[List[Message]]NoneAdditional input messages reasoning_stepsOptional[List[ReasoningStep]]NoneReasoning steps reasoning_messagesOptional[List[Message]]NoneReasoning messages
Attribute Type Default Description eventstr"TeamRunCompleted"Event type contentOptional[Any]NoneFinal content of the response content_typestr"str"Type of the content reasoning_contentOptional[str]NoneReasoning content produced citationsOptional[Citations]NoneCitations used in the response model_provider_dataOptional[Dict[str, Any]]NoneModel provider specific metadata imagesOptional[List[Image]]NoneImages attached to the response videosOptional[List[Video]]NoneVideos attached to the response audioOptional[List[Audio]]NoneAudio snippets attached to the response filesOptional[List[File]]NoneFiles attached to the response response_audioOptional[Audio]NoneModel's audio response referencesOptional[List[MessageReferences]]NoneMessage references additional_inputOptional[List[Message]]NoneAdditional input messages reasoning_stepsOptional[List[ReasoningStep]]NoneReasoning steps reasoning_messagesOptional[List[Message]]NoneReasoning messages member_responsesList[Union[TeamRunOutput, RunOutput]][]Responses from individual team members metadataOptional[Dict[str, Any]]NoneAdditional metadata metricsOptional[RunMetrics]NoneUsage metrics session_stateOptional[Dict[str, Any]]NoneSession state after the run
Attribute Type Default Description eventstr"TeamRunError"Event type contentOptional[str]NoneError message error_typeOptional[str]NoneError type error_idOptional[str]NoneError identifier additional_dataOptional[Dict[str, Any]]NoneAdditional error data
Attribute Type Default Description eventstr"TeamRunCancelled"Event type reasonOptional[str]NoneReason for cancellation
Attribute Type Default Description eventstr"TeamRunPaused"Event type toolsOptional[List[ToolExecution]]NoneTool executions for pending requirements requirementsOptional[List[RunRequirement]]NoneHITL requirements for the run
Attribute Type Default Description eventstr"TeamRunContinued"Event type
Attribute Type Default Description eventstr"TeamPreHookStarted"Event type pre_hook_nameOptional[str]NoneName of the pre-hook being executed run_inputOptional[TeamRunInput]NoneThe run input passed to the hook
Attribute Type Default Description eventstr"TeamPreHookCompleted"Event type pre_hook_nameOptional[str]NoneName of the pre-hook that completed run_inputOptional[TeamRunInput]NoneThe run input passed to the hook
Attribute Type Default Description eventstr"TeamPostHookStarted"Event type post_hook_nameOptional[str]NoneName of the post-hook being executed
Attribute Type Default Description eventstr"TeamPostHookCompleted"Event type post_hook_nameOptional[str]NoneName of the post-hook that completed
Attribute Type Default Description eventstr"TeamToolCallStarted"Event type toolOptional[ToolExecution]NoneThe tool being called
Attribute Type Default Description eventstr"TeamToolCallCompleted"Event type toolOptional[ToolExecution]NoneThe tool that was called contentOptional[Any]NoneResult of the tool call imagesOptional[List[Image]]NoneImages produced by the tool videosOptional[List[Video]]NoneVideos produced by the tool audioOptional[List[Audio]]NoneAudio produced by the tool filesOptional[List[File]]NoneFiles produced by the tool
Attribute Type Default Description eventstr"TeamToolCallError"Event type toolOptional[ToolExecution]NoneThe tool that failed errorOptional[str]NoneError message
Attribute Type Default Description eventstr"TeamReasoningStarted"Event type
Attribute Type Default Description eventstr"TeamReasoningStep"Event type contentOptional[Any]NoneContent of the reasoning step content_typestr"str"Type of the content reasoning_contentstr""Detailed reasoning content
Attribute Type Default Description eventstr"TeamReasoningContentDelta"Event type reasoning_contentstr""Reasoning content chunk
Attribute Type Default Description eventstr"TeamReasoningCompleted"Event type contentOptional[Any]NoneContent of the reasoning step content_typestr"str"Type of the content
Attribute Type Default Description eventstr"TeamMemoryUpdateStarted"Event type
Attribute Type Default Description eventstr"TeamMemoryUpdateCompleted"Event type memoriesOptional[List[Any]]NoneMemories updated by the run
Attribute Type Default Description eventstr"TeamSessionSummaryStarted"Event type
Attribute Type Default Description eventstr"TeamSessionSummaryCompleted"Event type session_summaryOptional[Any]NoneThe generated session summary
Attribute Type Default Description eventstr"TeamParserModelResponseStarted"Event type
Attribute Type Default Description eventstr"TeamParserModelResponseCompleted"Event type
Attribute Type Default Description eventstr"TeamOutputModelResponseStarted"Event type
Attribute Type Default Description eventstr"TeamOutputModelResponseCompleted"Event type
Attribute Type Default Description eventstr"TeamModelRequestStarted"Event type modelOptional[str]NoneModel identifier model_providerOptional[str]NoneModel provider
Attribute Type Default Description eventstr"TeamModelRequestCompleted"Event type modelOptional[str]NoneModel identifier model_providerOptional[str]NoneModel provider input_tokensOptional[int]NoneInput token count output_tokensOptional[int]NoneOutput token count total_tokensOptional[int]NoneTotal token count time_to_first_tokenOptional[float]NoneTime to first token in seconds reasoning_tokensOptional[int]NoneReasoning token count cache_read_tokensOptional[int]NoneCache read token count cache_write_tokensOptional[int]NoneCache write token count
Attribute Type Default Description eventstr"TeamCompressionStarted"Event type
Attribute Type Default Description eventstr"TeamCompressionCompleted"Event type tool_results_compressedOptional[int]NoneNumber of compressed tool results original_sizeOptional[int]NoneOriginal size in characters compressed_sizeOptional[int]NoneCompressed size in characters
Attribute Type Default Description eventstr"TeamFollowupsStarted"Event type
Attribute Type Default Description eventstr"TeamFollowupsCompleted"Event type followupsOptional[List[str]]NoneSuggested followup prompts generated for the run
Attribute Type Default Description eventstr"TeamTaskIterationStarted"Event type iterationint0Current task iteration number max_iterationsint0Maximum number of task iterations
Attribute Type Default Description eventstr"TeamTaskIterationCompleted"Event type iterationint0Task iteration number that completed max_iterationsint0Maximum number of task iterations task_summaryOptional[str]NoneSummary of the task state after the iteration
Attribute Type Default Description eventstr"TeamTaskStateUpdated"Event type task_summaryOptional[str]NoneSummary of the current task state goal_completeboolFalseWhether the overall goal is complete tasksList[TaskData][]Full structured task list for frontend rendering completion_summaryOptional[str]NoneSummary of the work done, set when the goal is marked complete
Attribute Type Default Description eventstr"TeamTaskCreated"Event type task_idstr""ID of the created task titlestr""Title of the task descriptionstr""Description of the task assigneeOptional[str]NoneMember assigned to the task statusstr"pending"Status of the task dependenciesList[str][]IDs of tasks that must complete before this task
Attribute Type Default Description eventstr"TeamTaskUpdated"Event type task_idstr""ID of the updated task titlestr""Title of the task statusstr""New status: pending, in_progress, completed, failed, or blocked previous_statusOptional[str]NoneStatus before the update resultOptional[str]NoneResult of the task, if completed assigneeOptional[str]NoneMember assigned to the task
Attribute Type Default Description eventstr"CustomEvent"Event type
Try the Docs Agent, powered by Agno