Praison AI
Enterprise
Agents
Bot
Use Cases
University
Docs
Scheduled autonomous checks with Heartbeat
Run
from praisonai import Agent, Heartbeat, ExecutionConfig results = [] watchdog = Agent( name='UptimeWatchdog', instructions='Reply with OK or ALERT in under 8 words.', execution=ExecutionConfig(max_iter=3, max_budget=0.10, context_compaction=True), output='silent', ) beat = Heartbeat( agent=watchdog, schedule='every 15m', prompt='API p95 latency is 112ms (SLA < 300ms). Report status.', on_result=results.append, max_retries=2, ) results.append(watchdog.start(beat.config.prompt)) print('Schedule:', beat.config.schedule, '| Tick output:', results[0])
Press Run. The result appears here.
Esc
Search in
All
Docs
University