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
Configuration
Settings
| Setting | Default | Description |
|---|---|---|
enabled | true | Enable/disable heartbeat |
interval | 300000 | Interval in milliseconds (5 minutes) |
taskCheck | true | Check task queue on each heartbeat |
quietHours | — | Suppress heartbeats during these hours |
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
