Praison AI
Enterprise
Agents
Bot
Use Cases
University
Docs
Shared state with WorkflowContext and variables
Run
from praisonai import Agent, AgentFlow def enrich_ticket(ctx): ctx.variables['account_tier'] = 'Enterprise' return f"{ctx.input} [tier={ctx.variables['account_tier']}]" def attach_footer(ctx): return f"{ctx.previous_result} (SLA={ctx.variables.get('account_tier', 'Standard')})" responder = Agent(name='Responder', instructions='Acknowledge the ticket in one short sentence.', output='silent') flow = AgentFlow(steps=[enrich_ticket, responder, attach_footer]) print(flow.start('Checkout API returns 504')['output'])
Press Run. The result appears here.
Esc
Search in
All
Docs
University