Praison AI
Enterprise
Agents
Bot
Use Cases
University
Docs
Live tool-call inspection and human approval in the UI
Run
from praisonai import Agent, HooksConfig ui_timeline = [] def update_ticket_status(ticket_id: str, status: str) -> str: """Update support ticket status.""" return f'Ticket {ticket_id} set to {status}' def emit_ui_card(event): ui_timeline.append({'badge': 'TOOL_CALL', 'tool': event.tool_name, 'args': event.arguments}) agent = Agent( name='ApprovedConsoleAgent', instructions='Call update_ticket_status and confirm in one short sentence.', tools=[update_ticket_status], hooks=HooksConfig(on_tool_call=emit_ui_card), output='silent', ) print('Reply:', agent.start('Mark ticket T-91 as resolved')) print('UI Timeline card:', ui_timeline)
Press Run. The result appears here.
Esc
Search in
All
Docs
University