Skip to main content
When you run a workflow in Agno, the response you get (WorkflowRunOutput) includes detailed metrics about the workflow execution. These metrics help you understand token usage, execution time, performance, and step-level details across all agents, teams, and custom functions in your workflow. Metrics are available at multiple levels:
  • Per workflow: Each WorkflowRunOutput includes a metrics object containing the workflow duration.
  • Per step: Each step has its own metrics including duration, token usage, and model information.
  • Per session: Session metrics aggregate all step-level metrics across all runs in the session.

Example Usage

Here’s how you can access and use workflow metrics:
You’ll see the outputs with following information: Workflow-level metrics:
  • duration: Total workflow execution time in seconds (from start to finish, including orchestration overhead)
  • steps: Dictionary mapping step names to their individual step metrics
Step-level metrics:
  • step_name: Name of the step
  • executor_type: Type of executor (“agent”, “team”, or “function”)
  • executor_name: Name of the executor
  • metrics: Execution metrics including tokens, duration, and model information (see Metrics schema)
Session metrics:
  • Aggregates step-level metrics (tokens, duration) across all runs in the session
  • Includes only agent/team execution time, not workflow orchestration overhead

Developer Resources