How It Works
Quick Start
1
Basic Heartbeat
2
With Callback
3
Background Thread
Schedule Expressions
Heartbeat uses the same schedule parser as Schedule Tools:Configuration
Error Handling
Best Practices
Use Background Mode for Web Apps
Use Background Mode for Web Apps
Call
hb.start(blocking=False) to run in a daemon thread alongside your web server or bot.Always Set on_result in Production
Always Set on_result in Production
Without
on_result, results are only logged. Connect it to Slack, email, or a database for production use.Combine with Loop Detection
Combine with Loop Detection
For long-running heartbeats, enable
loop_detection=True on the agent to prevent stuck states.Related
Schedule Tools
Agent-centric scheduling via tool calls
Background Tasks
BackgroundRunner and ScheduleLoop

