Skip to main content
Agno Workflows provides a powerful, declarative way to orchestrate multi-step AI processes. Unlike traditional linear workflows, you can now create sophisticated branching logic, parallel execution, and dynamic routing based on content analysis. This guide covers all workflow patterns, from simple linear sequences to complex conditional logic with parallel execution.

Building Blocks

The core building blocks of Agno Workflows are:

Workflow Patterns

1. Basic Sequential Workflows

When to use: Linear processes where each step depends on the previous one. Example Steps: Research → Process research data in a function before next step → Content Creation
For more information on how to use custom functions, refer to the Advanced page.
See Example:
StepInput and StepOutput provides standardized interfaces for data flow between steps: So if you make a custom function as an executor for a step, make sure that the input and output types are compatible with the StepInput and StepOutput interfaces. This will ensure that your custom function can seamlessly integrate into the workflow system.Take a look at the schemas for StepInput and StepOutput.

2. Fully Python Workflow

Keep it Simple with Pure Python: If you prefer the Workflows 1.0 approach or need maximum flexibility, you can still use a single Python function to handle everything. This approach gives you complete control over the execution flow while still benefiting from workflow features like storage, streaming, and session management. Replace all the steps in the workflow with a single executable function where you can control everything.
See Example: For migration from 1.0 style workflows, refer to the page for Migrating to Workflows 2.0

3. Step-Based Workflows

You can name your steps for better logging and future support on the Agno platform.
This also changes the name of a step when accessing that step’s output inside a StepInput object.

Parameters

Example

See Examples:

4. Conditional Steps

When to use: Conditional step execution based on business logic. Example Use-Cases: Topic-specific research strategies, content type routing Condition Steps

Parameters

Example

More Examples:

5. Parallel Execution

When to use: Independent tasks that can run simultaneously to save time. Example Use-Cases: Multiple research sources, parallel content creation Parallel Steps

Parameters

Example

More Examples:

6. Loop/Iteration Workflows

When to use: Quality-driven processes, iterative refinement, or retry logic. Example Use-Cases: Research until sufficient quality, iterative improvement Loop Steps

Parameters

Example

More Examples:

7. Branching Workflows

When to use: Complex decision trees, topic-specific workflows, dynamic routing. Example Use-Cases: Content type detection, expertise routing Router Steps

Parameters

Example

More Examples:

8. Steps: Grouping a list of steps

When to use: When you need to group multiple steps into logical sequences, create reusable workflows, or organize complex workflows with multiple branching paths. Better Routing: Use with Router for clean branching logic

Parameters

Basic Example

Steps with Router

This is where Steps really shines - creating distinct sequences for different content types or workflows:
More Examples:

9. Advanced Workflow Patterns

You can use the patterns above to construct sophisticated workflows. Example Usage: Conditions + Parallel + Loops + Custom Post-Processing Function + Routing
More Examples: