Praison AI
Enterprise
Agents
Bot
Use Cases
University
Docs
Hooks and autonomy
Run
from praisonai import Agent, HooksConfig def check_health() -> str: """Return service health status.""" return 'healthy' audit_log = [] def record_tool(event): audit_log.append(f'{event.tool_name}({event.arguments})') agent = Agent( name='HealthBot', instructions='Always call check_health and report the status in one short sentence.', tools=[check_health], hooks=HooksConfig(on_tool_call=record_tool), output='silent', ) print('Reply:', agent.start('Check service health')) print('Hooks captured:', audit_log)
Press Run. The result appears here.
Esc
Search in
All
Docs
University