OpenClaw HEARTBEAT.md Examples — Autonomous Agent Behavior
Real HEARTBEAT.md examples for OpenClaw agents: daily operations, monitoring, reporting, maintenance, and multi-role heartbeat configurations.
Use this guide, then keep going
If this guide solved one problem, here is the clean next move for the rest of your setup.
Most operators land on one fix first. The preview, homepage, and full file make it easier to turn that one fix into a reliable OpenClaw setup.
HEARTBEAT.md defines how your agent behaves during its regular check-in cycles — the autonomous monitoring and maintenance behavior that makes OpenClaw agents feel genuinely proactive. Here are real examples for different use cases.
Example 1: Business Operations Agent
# HEARTBEAT.md — Business Ops
On each heartbeat:
1. Check workspace/tasks.md for any overdue items (past due date, status pending)
If overdue: notify me in Slack DM with the item and how overdue it is
2. Check if any cron jobs failed in the last hour
Alert me immediately if any critical crons failed
3. Check workspace/alerts.md for unresolved alerts older than 4 hours
If any: escalate to Slack with context
If nothing needs attention: reply HEARTBEAT_OK
Do NOT message me if everything is fine.Example 2: Developer Assistant Agent
# HEARTBEAT.md — Dev Agent
On each heartbeat:
1. GitHub: any new critical/P0 issues opened in the last hour?
If yes: post to #engineering with issue title and link
2. CI/CD: any failed builds on main branch?
If yes: post failure summary to #engineering immediately
3. Dependabot: any security advisories opened today?
If yes: summarize and post to #security
If all checks pass: HEARTBEAT_OKExample 3: Content Creation Agent
# HEARTBEAT.md — Content Agent
Morning heartbeat (8-9 AM only):
- Check workspace/content-calendar.md for posts due today
- If any posts are due but not drafted: alert me in Slack
- If drafts are ready: confirm they're in the review queue
Afternoon heartbeat (2-3 PM only):
- Check if morning posts were actually published
- If not published: send a reminder
Other times: HEARTBEAT_OK unless something is marked URGENTExample 4: Personal Assistant Agent
# HEARTBEAT.md — Personal Assistant
Daily at start of business hours (8-9 AM only):
- Read MEMORY.md for any pending commitments
- Check workspace/reminders.md for today's items
- If anything is due today: send a morning briefing to Slack DM
- Format: "Good morning. Today: [item 1], [item 2]."
Other heartbeats: only interrupt if something is marked URGENT
Otherwise: HEARTBEAT_OKExample 5: E-commerce Operations
# HEARTBEAT.md — Store Ops
Every heartbeat:
1. Check workspace/inventory-alerts.md — items below reorder threshold?
Alert to #ops if yes
2. Check workspace/support-queue.md — tickets older than 24 hours unresolved?
Alert to #support with ticket details if yes
3. Check workspace/failed-payments.md — new failed payment records?
Post to #billing immediately for any new failures
If nothing flagged: HEARTBEAT_OKHEARTBEAT.md Best Practices
- Always include an explicit "if nothing needs attention: HEARTBEAT_OK" instruction
- Be specific about thresholds ("older than 4 hours", "more than 20% drop")
- Specify exactly where alerts should go (which channel, DM vs. channel)
- Time-gate morning briefings so they don't fire at 3 AM
- Keep it scannable — the agent reads this on every heartbeat cycle
Want the full setup guide? The OpenClaw Playbook — everything you need to master OpenClaw in one place. Just $9.99.
Frequently Asked Questions
What's the difference between HEARTBEAT.md and cron jobs?
Cron jobs execute specific tasks on a fixed schedule. HEARTBEAT.md defines how your agent behaves during periodic check-ins — more contextual and judgment-based than a cron. The agent reads HEARTBEAT.md and decides what needs attention based on current state.
How often does the heartbeat run?
The heartbeat frequency is configured in openclaw.json. Common setups: every 15 minutes for active monitoring, every hour for general ops, once daily for review-based workflows.
Can HEARTBEAT.md reference other workspace files?
Yes. Your agent reads HEARTBEAT.md and can then read any other workspace file as part of its heartbeat routine. Reference MEMORY.md, task lists, data files, or status files from HEARTBEAT.md.
Get The OpenClaw Playbook
The complete operator's guide to running OpenClaw. 40+ pages covering identity, memory, tools, safety, and daily ops. Written by an AI with a real job.