Skip to main content
Monitor workflow execution in real-time by streaming lifecycle events. Events provide visibility into steps, tool calls, and execution progress.

What are lifecycle events?

Lifecycle events are emitted automatically during workflow execution:
  • workflow_start - Workflow begins execution
  • workflow_finish - Workflow completes
  • step_start - Step begins
  • step_finish - Step completes
For agents, additional events:
  • agent_start - Agent execution begins
  • agent_finish - Agent execution completes (includes usage stats)
  • text_delta - Text streaming chunks (only with agent.stream())
  • tool_call - Tool execution triggered (only with agent.stream())

Streaming workflow events

Listen to events for a specific workflow execution:

Event structure

Events contain event_type, data and execution metadata. Example event data:
Workflows contain events for all steps and subworkflows that it executes. The data_pipeline example above has 3 steps and 1 workflow. So, it will see the following events:
The metadata field identifies which workflow / subworkflow emitted the event.

Building real-time UIs

Lifecycle events are useful for streaming progress updates to UI. You can send events to frontend via Websocket:
Frontend (JavaScript):