Team.run() (sync) or Team.arun() (async).
Basic Execution
Execution Flow
When you callrun():
- Pre-hooks execute (if configured)
- Reasoning runs (if enabled) to plan the task
- Context is built with system message, history, memories, and session state
- Model decides whether to respond directly, use tools, or delegate to members
- Members execute their tasks (concurrently in async mode)
- Leader synthesizes member results into a final response
- Post-hooks execute (if configured)
- Session and metrics are stored (if database configured)
run_context and session_state. Async factories require arun() or aprint_response().
In
TeamMode.tasks, the leader uses task management tools to build and execute a shared task list, looping until the goal is complete or max_iterations is reached.
Teams can pause for human-in-the-loop requirements (e.g., approvals or user input). When a run requires confirmation, the run returns with pending requirements so you can collect input or resolve approvals before continuing.
Paused runs return status=RunStatus.paused and requirements on the TeamRunOutput.
Human oversight is a control path. Runs can pause for confirmation or external execution and resume when requirements are resolved.
Execution Flow Diagram
Execution Flow Diagram

Streaming
Enable streaming withstream=True. This returns an iterator of events instead of a single response.
Streaming is not supported in
TeamMode.tasks. If you set stream=True, the run falls back to non-streaming execution.Stream All Events
By default, only content is streamed. Setstream_events=True to get tool calls, reasoning steps, and other internal events:
Stream Member Events
When usingarun() with multiple members, they execute concurrently. Member events arrive as they happen, not in order.
Disable member event streaming with stream_member_events=False:
Run Output
Team.run() returns a TeamRunOutput object containing:
See TeamRunOutput reference for the full schema.
Async Execution
Usearun() for async execution. Members run concurrently when the leader delegates to multiple members at once.
Tasks Mode
Tasks mode runs an iterative loop that creates, executes, and updates tasks until the goal is complete.Specifying User and Session
Associate runs with a user and session for history tracking:Passing Files
Pass images, audio, video, or files to the team:Structured Output
Pass an output schema to get structured responses:Cancelling Runs
Cancel a running team withTeam.cancel_run(). See Run Cancellation.
Print Response
For development, useprint_response() to display formatted output:
