Files
2026-05-18 06:40:19 +00:00

6.8 KiB

In OpenClaw, the heartbeat is a scheduled mechanism that allows your AI agent to proactively check for tasks, events, or updates without waiting for a manual message from you. [1, 2] To correctly set up and optimize your heartbeat, follow these configuration steps:

  1. Set the Frequency The heartbeat interval determines how often the agent "wakes up." [3]
  • Default: 30 minutes.
  • Configuration: Adjust the every parameter in your openclaw.json or through the CLI.
  • 30m or 1h is recommended for general use.
    • Set to "0m" to disable heartbeats entirely if you only want the agent to respond to your messages. [2, 4, 5, 6]
  1. Configure the Target Destination Decide where the heartbeat should send its results or notifications.
  • target: "none": (Default) Use this for internal background processing only (no messages sent to you).
  • target: "last": Routes messages to the last contact or channel you used to communicate with the agent. [4, 7, 8]
  1. Use HEARTBEAT.md for Instructions [3, 9] The agent checks a specific file in its workspace for its "to-do list" during each tick. [3, 4]
  • Create a small HEARTBEAT.md checklist.
  • Pro Tip: Keep this file small to minimize token costs.
  • Example content: "Check my calendar for meetings in the next 2 hours" or "Monitor server logs for errors". [3, 4, 7, 10, 11]
  1. Optimize for Cost and Cache Frequent heartbeats can become expensive if not managed correctly. [12]
  • Isolated Model: Route heartbeat tasks to a cheaper model (e.g., using agents.defaults.heartbeat.model) to save credits.
  • Cache Warmth: If using Anthropic, setting the heartbeat interval slightly below the provider's Cache TTL (Time To Live) can keep your context "warm," significantly reducing costs by reusing cached data. [7, 8, 13]
  1. Set Active Hours [14] To prevent the agent from waking up (and spending money) while you are asleep, restrict its activity to your local time. [4, 10]
  • Quiet Hours: Configure specific windows (e.g., 9 a.m. to 8 p.m.) so the heartbeat only runs when you are active. [10, 15]

Quick Commands

  • Trigger Immediately: Use openclaw system event --mode now to force a heartbeat run right away for testing.
  • Check Status: Run openclaw status --all or openclaw logs --follow to see if your heartbeats are firing correctly. [16, 17]

These guides explain how to configure OpenClaw's heartbeat frequency, target destination, and active hours:

Heartbeat - OpenClaw Docs - OpenClaw AI Tom Keldenich's Post - LinkedIn - LinkedIn this is the most detailed breakdown I've seen - X Heartbeat ignores heartbeat.model when session ... - GitHub - GitHub OpenClaw Won't Bite, A Zero-to-Hero Guide for People Who ... - Towards AI How to stop burning money on OpenClaw : r/PromptEngineering - Reddit

Would you like help writing a specific HEARTBEAT.md checklist for a task like email triaging or calendar management?

[1] https://milvus.io [2] https://x.com [3] https://pub.towardsai.net [4] https://docs.openclaw.ai [5] https://docs.openclaw.ai [6] https://milvus.io [7] https://docs.openclaw.ai [8] https://github.com [9] https://blog.devgenius.io [10] https://www.linkedin.com [11] https://docs.openclaw.ai [12] https://arpitbhayani.me [13] https://www.reddit.com [14] https://www.instagram.com [15] https://docs.openclaw.ai [16] https://docs.openclaw.ai [17] https://docs.openclaw.ai