Workflow.run() returns a WorkflowRunOutput, or an event iterator when streaming is enabled. The iterator contains workflow events and, by default, events forwarded by agent and team step executors.
workflow.print_response() runs the workflow and formats its output in the terminal.
Running a Workflow
Callworkflow.run() and capture the result in response:
Without streaming,
Workflow.run() returns
WorkflowRunOutput.Async Execution
TheWorkflow.arun() function is the async version of Workflow.run().
Streaming Responses
Setstream=True to return an event iterator instead of a single response. With stream_executor_events=True, the default, the iterator can also contain agent and team events from step executors.
Streaming All Events
Withstream_events=False, the default, the stream still includes the workflow start and completion events, step output events from function executors, and forwarded agent and team events.
Set stream_events=True to include workflow lifecycle events for steps, conditions, loops, routers, and parallel groups.
Streaming Executor Events
Events from agents and teams inside a workflow are forwarded by default. Setstream_executor_events=False to filter their nonterminal events. Executor completion and cancellation events are still forwarded.
Workflow-level events are not affected by this setting. With stream_events=True, events such as WorkflowStarted, StepStarted, ConditionExecutionStarted, and their completion events remain in the stream.
Async Streaming
Workflow.arun(stream=True) returns an async event iterator instead of a single response. It can include forwarded agent and team events under the same stream_executor_events setting.
Common Event Types
The following workflow events are commonly yielded byWorkflow.run() and Workflow.arun() when streaming is configured. The event enum also includes pause, continuation, cancellation, review, workflow-agent, and custom events.
Core Events
Step Events
Step Output Events (For custom functions)
Parallel Execution Events
Condition Execution Events
Loop Execution Events
Router Execution Events
Steps Execution Events
See the WorkflowRunOutputEvent reference.
Storing Events
Setstore_events=True to retain generated events on the workflow run. Use events_to_skip to exclude selected event types.
Access retained events through workflow.get_last_run_output().events. When the workflow has a database, the events are persisted with the run.
store_events=True: Retain events onWorkflowRunOutput.eventsevents_to_skip=[...]: Exclude matching workflow, agent, or team event types
- Debugging: Inspect workflow control flow
- Performance analysis: Compare event timing and step metrics
- Error investigation: Review events leading to a failure
- Persisted run records: Store selected events when a database is configured
Agno Telemetry
Workflow telemetry includes the workflow ID, database type, whether an input schema is configured, the session and run IDs, the SDK version, and the workflow event type. Disable it withAGNO_TELEMETRY=false or telemetry=False.