HEARTBEAT.md from the workspace and executes a checklist of proactive tasks — without you having to ask.
What Heartbeat Does
On each heartbeat tick:- Reads
HEARTBEAT.mdfrom the workspace root - Runs the checklist items as an agent job
- If the job produces findings or output, sends a notification to the configured channel
- Records the run in the
heartbeat_statetable
HEARTBEAT.md does not exist or is empty, the tick is a no-op.
The heartbeat job runs through the full agent loop — LLM reasoning, tool calls, safety layer — with the same capabilities as a manually triggered job.
HEARTBEAT.md Format
WriteHEARTBEAT.md as a checklist of tasks. The agent reads this as its instructions for each periodic run:
Notification Behavior
After each tick, if the job produces output that warrants user attention, the heartbeat system sends a notification to the configured channel. If nothing actionable was found, no notification is sent — heartbeat is designed to be quiet unless it has something useful to say. Findings are also written to memory atheartbeat/latest.md (if your HEARTBEAT.md instructs this), making them searchable in future sessions.
Configuration
Set
HEARTBEAT_INTERVAL_SECS=3600 (1 hour) or higher if the heartbeat job is too frequent for your LLM API rate limits or budget. The heartbeat runs as a normal job and consumes tokens.Writing HEARTBEAT.md
Ask the agent to create or update the heartbeat checklist:Example HEARTBEAT.md Files
Minimal — Inbox Monitor
Developer Workflow
Personal Assistant
Heartbeat vs Routines
Heartbeat and cron routines serve similar purposes but differ in design:| Feature | Heartbeat | Cron Routine |
|---|---|---|
| Configuration | Single HEARTBEAT.md file | Per-routine configuration |
| Schedule | Fixed global interval | Custom per-routine cron expression |
| Scope | Single checklist job | Multiple independent jobs |
| Complexity | Simple — edit one file | Flexible — manage multiple routines |
Troubleshooting
Heartbeat not firing
Heartbeat not firing
- Verify
HEARTBEAT_ENABLED=truein your configuration - Check startup logs for
heartbeatto confirm the system started - Confirm
HEARTBEAT_INTERVAL_SECSis set to a reasonable value - Verify
HEARTBEAT.mdexists in the workspace root viamemory_read path="HEARTBEAT.md"
Getting too many notifications
Getting too many notifications
- Update HEARTBEAT.md to add a condition: “only notify if there are actionable items”
- Increase
HEARTBEAT_INTERVAL_SECSto reduce frequency - Make checklist items more specific so the agent doesn’t over-report
Heartbeat job consuming too many tokens
Heartbeat job consuming too many tokens
- Simplify HEARTBEAT.md — fewer checklist items mean fewer LLM calls
- Increase
HEARTBEAT_INTERVAL_SECSto reduce frequency - Add guardrails-style instructions to HEARTBEAT.md: “Use at most 5 tool calls per run”