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)