Overview
The heartbeat system periodically wakes the agent even when no user messages are coming in. This enables autonomous behaviors like:- Working through the task queue
- Checking for scheduled actions
- Proactive status updates
- Background maintenance
How It Works
1
Gateway fires heartbeat
The gateway fires a heartbeat at configured intervals
2
Agent receives message
The agent receives a special heartbeat message
3
Agent checks for work
The agent checks for pending tasks, schedules, and conditions
4
Agent processes or returns to idle
If there is work to do, the agent processes it. If not, the agent returns to idle.
Configuration
Settings
Quiet Hours
During quiet hours, the heartbeat is suppressed to avoid unnecessary API calls and potential notifications during off-hours:Urgent tasks can override quiet hours.
Task Queue Integration
WhentaskCheck is enabled, each heartbeat:
- Queries pending tasks ordered by priority
- Picks the highest-priority task
- Starts the task (status ->
in_progress) - Works on it using available tools
- Completes or blocks the task
Cost Considerations
- Longer intervals reduce cost (15-30 minutes instead of 5)
- Use the LOCAL tier for simple heartbeat checks
- Quiet hours prevent unnecessary spending during off-hours
- Disable heartbeat entirely if autonomous work is not needed
