Praison AI
Enterprise
Agents
Bot
Use Cases
University
Docs
Mini-project: Support triage and escalation pipeline
Run
from praisonai import Agent, AgentFlow, route, parallel, when def triage_label(ctx): return 'billing' if 'invoice' in ctx.input.lower() else 'tech' billing = Agent(name='Billing', instructions='Start reply with URGENT: and confirm duplicate invoice review in one short sentence.', output='silent') tech = Agent(name='Tech', instructions='Give one troubleshooting step.', output='silent') tone = Agent(name='ToneCheck', instructions='Reply with Tone OK in 2 words.', output='silent') sla = Agent(name='SLACheck', instructions='Reply with URGENT SLA: 15m.', output='silent') escalator = Agent(name='OnCall', instructions='Confirm Billing On-Call paged in one short line.', output='silent') pipeline = AgentFlow(steps=[ triage_label, route({'billing': [billing], 'default': [tech]}), parallel([tone, sla]), when('URGENT', [escalator]), ]) print('Pipeline result:', pipeline.start('Urgent duplicate charge on invoice #55')['output'])
Press Run. The result appears here.
Esc
Search in
All
Docs
University