> ## Documentation Index
> Fetch the complete documentation index at: https://spacesail.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Conditional Workflow

> Deterministic branching based on input analysis or business rules

**Example Use-Cases**: Content type routing, topic-specific processing, quality-based decisions

Conditional workflows provide predictable branching logic while maintaining deterministic execution paths.

<img className="block dark:hidden" src="https://mintcdn.com/spacesail/dVFIS9vGSym44ZZW/images/workflows-condition-steps-light.png?fit=max&auto=format&n=dVFIS9vGSym44ZZW&q=85&s=6540fc1f37be05c503c457700b52b296" alt="Workflows condition steps diagram" width="3441" height="756" data-path="images/workflows-condition-steps-light.png" />

<img className="hidden dark:block" src="https://mintcdn.com/spacesail/dVFIS9vGSym44ZZW/images/workflows-condition-steps.png?fit=max&auto=format&n=dVFIS9vGSym44ZZW&q=85&s=e838984a139ae7b0b543ea1634cdc1ac" alt="Workflows condition steps diagram" width="3441" height="756" data-path="images/workflows-condition-steps.png" />

## Example

```python conditional_workflow.py theme={null}
from agno.workflow import Condition, Step, Workflow

def is_tech_topic(step_input) -> bool:
    topic = step_input.input.lower()
    return any(keyword in topic for keyword in ["ai", "tech", "software"])

workflow = Workflow(
    name="Conditional Research",
    steps=[
        Condition(
            name="Tech Topic Check",
            evaluator=is_tech_topic,
            steps=[Step(name="Tech Research", agent=tech_researcher)]
        ),
        Step(name="General Analysis", agent=general_analyst),
    ]
)

workflow.print_response("Comprehensive analysis of AI and machine learning trends", markdown=True)
```

## Developer Resources

* [Condition Steps Workflow](/examples/concepts/workflows/02-workflows-conditional-execution/condition_steps_workflow_stream)
* [Condition with List of Steps](/examples/concepts/workflows/02-workflows-conditional-execution/condition_with_list_of_steps)

## Reference

For complete API documentation, see [Condition Steps Reference](/reference/workflows/conditional-steps).
