Skip to main content
Example Use-Cases: Multi-source research, parallel analysis, concurrent data processing Parallel workflows maintain deterministic results while dramatically reducing execution time for independent operations. Workflows parallel steps diagram

Example

parallel_workflow.py
from agno.workflow import Parallel, Step, Workflow

workflow = Workflow(
    name="Parallel Research Pipeline",
    steps=[
        Parallel(
            Step(name="HackerNews Research", agent=hn_researcher),
            Step(name="Web Research", agent=web_researcher),
            Step(name="Academic Research", agent=academic_researcher),
            name="Research Step"
        ),
        Step(name="Synthesis", agent=synthesizer),  # Combines the results and produces a report
    ]
)

workflow.print_response("Write about the latest AI developments", markdown=True)

Handling Session State Data in Parallel Steps

When using custom Python functions in your steps, you can access and update the Worfklow session state via the run_context parameter. If you are performing session state updates in Parallel Steps, be aware that concurrent access to shared state will require coordination to avoid race conditions.

Developer Resources

Reference

For complete API documentation, see Parallel Steps Reference.