Most AI assistants are brilliant at answering when you ask, but they are silent the rest of the time. That is useful, but it is still reactive. If you want an assistant that notices what matters without you having to remember every detail, you need a different kind of workflow. That is exactly why I like HEARTBEAT.md in OpenClaw. It turns the agent from a tool you poke into something that checks in on its own, follows a schedule, and decides whether to alert you or stay quiet.
I use OpenClaw for real work, so I care about the difference between clever and useful. A proactive agent can remind me about a calendar event, check whether an email needs attention, or surface a task before it becomes a problem. That does not mean it should chatter all day. It means it should watch the right things at the right time. In this guide, I’ll show you how HEARTBEAT.md fits into that workflow and how to set it up so your AI agent starts acting more like a helper and less like a search box.
What Is HEARTBEAT.md and Why It Matters
HEARTBEAT.md is a configuration file in the OpenClaw workspace that tells the agent what to check on its own during each heartbeat. Think of it as a short instruction sheet for proactive behavior. Instead of waiting for a prompt, the agent reads this file on a schedule, looks at the checks you defined, and decides whether anything important needs your attention.
Reactive AI waits. You ask a question, it responds, and then it goes quiet again. Proactive AI watches for signals and acts on your behalf. That does not mean it should replace your judgment, and it does not mean it should start doing random tasks. It means you can tell it what matters, then trust it to monitor those items in the background.
The practical value is easy to understand. If you have a morning briefing, a meeting reminder, or a content deadline, the agent can surface that information at the right moment instead of making you remember to check manually. If you want a broader workflow example, I also recommend reading about OpenClaw sub-agents, because HEARTBEAT.md and background workers complement each other well. One handles scheduled checks, the other handles longer tasks you do not want to babysit.
How HEARTBEAT.md Works: The Mechanics
Under the hood, OpenClaw reads HEARTBEAT.md at each heartbeat interval and uses the instructions inside to determine what it should inspect. The heartbeat itself runs on a cron-style schedule, and that schedule is configurable in OpenClaw settings. You can make it more frequent if you need tighter monitoring, or slower if you want to conserve tokens and reduce noise. The important part is that the agent does not guess. It follows the file and the schedule you give it.
When the heartbeat fires, the agent opens HEARTBEAT.md, interprets the checks, and then evaluates the current situation. That might mean checking whether there is a new email, whether a calendar event is coming up soon, or whether a task is overdue. If something is urgent, the agent can notify you. If nothing needs attention, it can stay quiet by returning HEARTBEAT_OK.
This design is what makes the system usable over time. A good heartbeat does not flood you with half-useful alerts. It gives the agent a small set of clear rules, then lets it decide whether the situation deserves a message. If you want to automate more of your daily publishing workflow, my automate your blog guide is a useful companion, because the same thinking applies to scheduled checks and repeated actions.
Step-by-Step: Setting Up Your First HEARTBEAT.md
1. Locate or create HEARTBEAT.md in your OpenClaw workspace folder
Start in your OpenClaw workspace and look for HEARTBEAT.md. If it is already there, open it and review the current checks. If not, create it at the workspace root so the agent can find it easily. Keep the file simple at first. You do not need a complicated playbook on day one. One or two useful checks are enough to prove the system works and give you a baseline for tuning later.
2. Write your first check
Pick one thing that would genuinely help you if it were surfaced automatically. A morning email check is a good starter example. A calendar reminder is another strong choice. The key is specificity. Do not write, “check if anything is important.” Write exactly what to check, when to check it, and what should happen if the condition is met. The more concrete your instruction, the better the agent can act without asking follow-up questions.
3. Set the heartbeat interval in OpenClaw settings
Once the file is in place, configure the heartbeat schedule in OpenClaw. This is where you decide how often the agent should wake up and read the file. Faster is not always better. If you set it too aggressively, you may burn tokens unnecessarily and create noisy behavior. For most beginners, a moderate schedule is the right place to start. You can always tighten it later if you discover a real need.
4. Test it before relying on it
Before you leave it running overnight, trigger a test and watch what happens. Make sure the agent reads the file, performs the check, and responds in the way you expected. If the situation is quiet, it should stay quiet. If the condition is met, it should notify you clearly. Testing matters because a bad heartbeat can fail in two ways, either it misses something important or it nags you for no reason. You want to catch both problems early.
Here is a simple example of what a HEARTBEAT.md file might look like:
# HEARTBEAT.md
Check my inbox for any email from clients that needs a reply before noon.
If a calendar event starts within 2 hours, notify me with the event title and time.
Check whether my next blog post deadline is within 24 hours.
If nothing is urgent, respond with HEARTBEAT_OK.
That sample is intentionally plain. The goal is not to impress anyone with fancy syntax. The goal is to make the agent’s job obvious. You can expand from there as you get more comfortable. If you are also connecting OpenClaw to messaging, my guide to connect OpenClaw to Telegram is worth keeping nearby, because it makes the notification side of the workflow much easier to picture.

Real-World Use Cases for HEARTBEAT.md
Morning briefings are one of the most obvious wins. You can have the agent check weather, calendar events, and unread messages first thing in the morning, then surface a short summary when there is something useful to know. That way you start the day with context instead of chasing it. It is a small change, but it saves real mental energy.
Calendar alerts are another strong use case. If you know an important meeting starts in two hours, you can set the heartbeat to notice that window and send a reminder with just enough lead time. That is much more helpful than discovering the event after you are already late. The same idea works for appointment reminders, calls, launch windows, or any event where timing matters.
Content publishing reminders are especially useful if you run a blog or manage a publishing calendar. I like workflows where the agent checks whether the next post is due soon, whether an asset is missing, or whether a draft needs a final pass. That is where HEARTBEAT.md pairs nicely with a system like OpenClaw, because it keeps the publishing process moving even when you are busy with something else.
Background monitoring is the broader version of all of this. You can watch server health, new messages, or other operational signals without staring at a dashboard all day. The trick is to keep the checks narrow and meaningful. If you define the right triggers, the heartbeat becomes a quiet early-warning system instead of another source of noise.
Common Mistakes
The biggest mistake is making the heartbeat too frequent. More checks can sound better, but they often cost more tokens and create more interruptions than you actually need. Start with a reasonable interval and only tighten it when there is a clear business reason. Another mistake is writing checks that are too vague. If the agent does not know what to look for, it cannot make good decisions. “Check for important stuff” is not a useful instruction.
People also forget to include HEARTBEAT_OK when nothing urgent is happening. That quiet signal matters because it teaches the agent when to stand down. Without it, you can end up with unnecessary notifications or ambiguous behavior. Finally, do not skip testing. A heartbeat that seems fine in theory can behave differently in practice, especially if you are relying on it overnight or before a meeting. A few minutes of testing can save a lot of confusion later.
Check out our full guide on automating your blog with OpenClaw, everything from scheduling posts to running background tasks hands-off.
FAQ
Do I need coding skills to use HEARTBEAT.md?
No, not to get started. You mainly need to write clear instructions in plain language and understand what you want the agent to monitor. If you can describe the behavior you want, you are already most of the way there. More advanced setups can get more structured, but the basics are beginner-friendly.
How often does the heartbeat fire by default?
The exact default can vary based on your OpenClaw setup and settings, so I recommend checking your current configuration rather than guessing. What matters most is that the interval is configurable. Start with a sensible pace, see how it behaves, then adjust if you need faster checks or less noise.
Can I have multiple checks in one HEARTBEAT.md?
Yes. In fact, that is one of the best ways to use it. You can combine several checks in one file as long as each one is clear and purposeful. I like to keep the checks grouped by priority so the agent can decide what deserves attention first. That keeps the file readable and easier to update later.
Will the agent spam me with notifications?
It should not, if you set it up well. The whole point of HEARTBEAT.md is to define when to notify and when to stay quiet. If you include clear thresholds and use HEARTBEAT_OK for non-urgent situations, the agent can remain helpful without becoming annoying. If it starts talking too much, tighten the rules.
Can I use HEARTBEAT.md with any AI model in OpenClaw?
HEARTBEAT.md is a workflow feature, so it is less about which model you choose and more about how the OpenClaw system is configured to run the heartbeat. In practice, the model still matters for quality and cost, but the proactive behavior comes from the scheduled check and the file instructions. If the platform supports the heartbeat, the workflow can work with the model routing you have set up.
Final Thoughts
HEARTBEAT.md is one of those small features that changes how you feel about the whole platform. Instead of only getting value when you remember to ask for it, your agent begins to check on the things that matter in the background. That is a huge step toward making AI feel useful in daily life, not just impressive in demos.
If you keep the instructions specific, the schedule sensible, and the notifications quiet unless something matters, HEARTBEAT.md can become a genuinely helpful part of your workflow. That is why I use OpenClaw this way myself. It makes the system feel less like a tool I operate and more like a true assistant that is paying attention when I am not.
Not Ready to Self-Host? Try ClawTrust
Building agents locally is powerful, but managing infrastructure, security, and scaling takes effort. ClawTrust provides managed OpenClaw hosting — your agents run securely in the cloud with automatic scaling, no DevOps overhead, and 24/7 monitoring.
This post contains affiliate links. If you buy through them, I may earn a small commission at no extra cost to you.


This is really helpful. One question though. Does the heartbeat run even when OpenClaw is closed, or does it need to be running in the background? I want to use it for morning briefings but I usually close everything at night.
Great question, Priya. The heartbeat requires the OpenClaw gateway to be running, so if you close it at night the checks will pause. The good news is OpenClaw can run as a background service on Mac or Windows, so it stays active even when the app window is closed. That way your morning briefing fires as soon as the schedule hits. Check the OpenClaw docs for the “gateway as service” setup. It takes about 5 minutes.
I had no idea this feature existed. Just set mine up following these steps and it worked first try. The calendar alert reminder is exactly what I needed.
HEARTBEAT.md is one of those ideas that seems small until you use it. Once the agent has a clear check-in list, it stops feeling reactive and starts feeling useful on its own.