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.

TeamRunOutput Attributes

AttributeTypeDefaultDescription
contentAnyNoneContent of the response
content_typestr"str"Specifies the data type of the content
messagesList[Message]NoneA list of messages included in the response
metricsMetricsNoneUsage metrics of the run
modelstrNoneThe model used in the run
model_providerstrNoneThe model provider used in the run
member_responsesList[Union[TeamRunOutput, RunOutput]][]Responses from individual team members
run_idstrNoneRun Id
team_idstrNoneTeam Id for the run
team_namestrNoneName of the team
session_idstrNoneSession Id for the run
parent_run_idstrNoneParent run ID if this is a nested run
toolsList[ToolExecution]NoneList of tools provided to the model
imagesList[Image]NoneList of images from member runs
videosList[Video]NoneList of videos from member runs
audioList[Audio]NoneList of audio snippets from member runs
response_audioAudioNoneThe model’s raw response in audio
inputTeamRunInputNoneInput media and messages from user
reasoning_contentstrNoneAny reasoning content the model produced
citationsCitationsNoneAny citations used in the response
metadataDict[str, Any]NoneAdditional metadata for the run
referencesList[MessageReferences]NoneMessage references
additional_inputList[Message]NoneAdditional input messages
reasoning_stepsList[ReasoningStep]NoneReasoning steps taken during execution
reasoning_messagesList[Message]NoneMessages related to reasoning
created_atintCurrent timestampUnix timestamp of the response creation
eventsList[Union[RunOutputEvent, TeamRunOutputEvent]]NoneList of events that occurred during the run
statusRunStatusRunStatus.runningCurrent status of the run
workflow_step_idstrNoneFK: Points to StepOutput.step_id

TeamRunOutputEvent Types

The following events are sent by the Team.run() function depending on the team’s configuration:

Core Events

Event TypeDescription
TeamRunStartedIndicates the start of a team run
TeamRunContentContains the model’s response text as individual chunks
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

Tool Events

Event TypeDescription
TeamToolCallStartedIndicates the start of a tool call
TeamToolCallCompletedSignals completion of a tool call, including tool call results

Reasoning Events

Event TypeDescription
TeamReasoningStartedIndicates the start of the team’s reasoning process
TeamReasoningStepContains a single step in the reasoning process
TeamReasoningCompletedSignals completion of the reasoning process

Memory Events

Event TypeDescription
TeamMemoryUpdateStartedIndicates that the team is updating its memory
TeamMemoryUpdateCompletedSignals completion of a memory update

Event Attributes

Base TeamRunOutputEvent

All events inherit from BaseTeamRunEvent which provides these common attributes:
AttributeTypeDefaultDescription
created_atintCurrent timestampUnix 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
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
contentOptional[Any]NoneFor backwards compatibility

RunStartedEvent

AttributeTypeDefaultDescription
eventstr"TeamRunStarted"Event type
modelstr""The model being used
model_providerstr""The provider of the model

IntermediateRunContentEvent

AttributeTypeDefaultDescription
eventstr"TeamRunIntermediateContent"Event type
contentOptional[Any]NoneIntermediate content of the response
content_typestr"str"Type of the content

RunContentEvent

AttributeTypeDefaultDescription
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
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

RunCompletedEvent

AttributeTypeDefaultDescription
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
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
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[Metrics]NoneUsage metrics

RunErrorEvent

AttributeTypeDefaultDescription
eventstr"TeamRunError"Event type
contentOptional[str]NoneError message

RunCancelledEvent

AttributeTypeDefaultDescription
eventstr"TeamRunCancelled"Event type
reasonOptional[str]NoneReason for cancellation

ToolCallStartedEvent

AttributeTypeDefaultDescription
eventstr"TeamToolCallStarted"Event type
toolOptional[ToolExecution]NoneThe tool being called

ToolCallCompletedEvent

AttributeTypeDefaultDescription
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

ReasoningStartedEvent

AttributeTypeDefaultDescription
eventstr"TeamReasoningStarted"Event type

ReasoningStepEvent

AttributeTypeDefaultDescription
eventstr"TeamReasoningStep"Event type
contentOptional[Any]NoneContent of the reasoning step
content_typestr"str"Type of the content
reasoning_contentstr""Detailed reasoning content

ReasoningCompletedEvent

AttributeTypeDefaultDescription
eventstr"TeamReasoningCompleted"Event type
contentOptional[Any]NoneContent of the reasoning step
content_typestr"str"Type of the content

MemoryUpdateStartedEvent

AttributeTypeDefaultDescription
eventstr"TeamMemoryUpdateStarted"Event type

MemoryUpdateCompletedEvent

AttributeTypeDefaultDescription
eventstr"TeamMemoryUpdateCompleted"Event type

ParserModelResponseStartedEvent

AttributeTypeDefaultDescription
eventstr"TeamParserModelResponseStarted"Event type

ParserModelResponseCompletedEvent

AttributeTypeDefaultDescription
eventstr"TeamParserModelResponseCompleted"Event type

OutputModelResponseStartedEvent

AttributeTypeDefaultDescription
eventstr"TeamOutputModelResponseStarted"Event type

OutputModelResponseCompletedEvent

AttributeTypeDefaultDescription
eventstr"TeamOutputModelResponseCompleted"Event type

CustomEvent

AttributeTypeDefaultDescription
eventstr"CustomEvent"Event type