Praison AI
Enterprise
Agents
Bot
Use Cases
University
Docs
Route
Run
from praisonai import Agent, AgentFlow, route def label(ctx): return "general" if "python" not in ctx.input.lower() else "technical" tech = Agent(name="TechExpert", instructions="Answer technical questions in one sentence.") general = Agent(name="GeneralAssistant", instructions="Answer in one sentence.") flow = AgentFlow(steps=[label, route({"technical": [tech], "default": [general]})]) result = flow.start("What is your refund policy?") print(result["steps"][-1]["output"])
Press Run. The result appears here.
Esc
Search in
All
Docs
University