OpenClaw Heartbeat Explained: Costs, Models, and How to Cut Your Bill
The Heartbeat is what makes your agent autonomous. It's also the single setting most likely to surprise you on your API bill. Here's how it works and how to keep it cheap.
There's one concept that separates OpenClaw from a normal chatbot, and it's also the one that quietly costs people money: the Heartbeat.
A chatbot waits for you. An agent doesn't. The Heartbeat is the recurring pulse where your agent wakes up on its own, checks whether there's anything to do, and decides to act or go back to sleep. That's the difference between a tool you operate and an assistant that operates while you're not looking.
It's also a recurring API call, firing whether or not there's any work, which means the convenient default ("check often") and the cheap default ("check rarely") are pulling in opposite directions. This post is how to think about that trade and set it well.
If you haven't set up OpenClaw yet, the main guide covers install and pairing. This goes deeper on the one step that decides your monthly cost.
What a heartbeat actually is
Every agent has a heartbeat interval. Set it to one hour and the agent wakes up 24 times a day. Each wake-up, it runs a small check: any blockers, pending tasks, or updates needed? Based on the answer, it either does something or goes back to sleep until the next pulse.
Check your current setting:
openclaw config get agents.defaults.heartbeatAnd set a sane interval:
openclaw config set agents.defaults.heartbeat.every "1h"That's the mechanism. The interesting part is the economics.
Why this is where the money goes
Here's the trap. Every heartbeat is an API call to whatever model is configured to handle it. If that's a paid model, every pulse costs a little. If it's a free tier, every pulse spends one of your limited daily requests.
Now play it forward. A one-hour heartbeat is 720 calls a month doing nothing but asking "anything to do?" A fifteen-minute heartbeat is closer to 2,900. On a paid model, that's a line item that grows purely with how attentive you made the agent, not with how much real work it did. On a free tier, it's worse: the agent can spend its entire daily allowance on check-ins and then go silent at noon, right when you need it.
So people respond by setting the heartbeat slow to save money, which makes the agent sluggish, which defeats the point of having an autonomous agent at all.
There's a better answer than rationing.
The fix: split the work across two models
The insight is that a heartbeat check is not hard. It's a yes/no classification: is there work, or not? That doesn't need an expensive, intelligent model. It needs a cheap, fast one.
So you run two models.
Your primary model (Claude Sonnet 4.5, DeepSeek V3.2, Kimi K2.5, whatever you chose) handles the real work: writing, coding, analysis, decisions.
A small local model in LM Studio handles every heartbeat, for free.
Once that split is in place, you can make the heartbeat as frequent as you want, because the check costs nothing. Your bill only moves when there's genuine work to do. That single architectural move is worth a post of its own, and it has one: How to Add LM Studio to OpenClaw: The Free Heartbeat Setup walks through the exact config. The short version is you add a local provider with its cost flagged at zero and point the heartbeat at it with "model": "lmstudio/qwen3-4b".
A worked example
Say you want a responsive agent, so you set a 30-minute heartbeat. That's about 1,440 check-ins a month.
Routed to a paid model, those 1,440 calls are pure overhead, paid for whether the agent did anything useful or not. Routed to a local model, the same 1,440 calls cost $0, and you've lost nothing, because the local model answers "anything to do?" just as well as the expensive one would.
The difference between those two setups isn't a few cents. It's the difference between rationing your agent's attention and not having to think about it. Frequency stops being a cost decision and goes back to being a usefulness decision, which is where it belonged.
How to tune the interval
With the cost problem solved by the model split, the interval becomes purely about responsiveness. A few rules of thumb:
Start at one hour. It's the right default while you're learning what your agent actually does. The main guide starts here for a reason.
Go faster for time-sensitive work. If the agent is watching for something that matters within minutes (an incoming message to triage, a build to babysit), drop to 15 or 30 minutes. With heartbeats running locally, this costs you nothing.
Go slower for genuinely passive agents. An agent whose only job is a morning summary doesn't need to wake up 24 times overnight. A longer interval, or a scheduled rather than polled check, is cleaner.
One agent, one focus. Frequent heartbeats on an agent juggling five jobs make the context-bleed problem worse, not better. Keep one task per agent, as the main guide stresses, and the heartbeat stays simple.
The known bug to watch for
Be aware of this, because it can undo your cost savings silently. There's a documented issue where the heartbeat model override gets ignored in some configurations, so heartbeats keep hitting your paid API even after you've pointed them at the local model.
The way to catch it: after setting up the local heartbeat, note your paid provider's call count, wait for a pulse, and check whether the count moved. If it climbs, the override didn't take. The community workaround is to drive the check from a cron job with --session isolated instead of the built-in heartbeat, which forces the local model. The LM Studio post has the exact command. Check the issue thread too, since the underlying bug may be fixed by the time you read this.
Frequently asked questions
Can I turn the heartbeat off entirely?
You can, but then the agent only acts when you message it, which makes it a chatbot again. The heartbeat is the autonomy. The better move is to make it cheap, not absent.
Does a faster heartbeat make the agent smarter?
No. It makes it check more often. Smartness comes from the primary model and from clean instructions. Heartbeat frequency is about how quickly it notices something, not how well it handles it.
What does the heartbeat actually send to the model?
A short prompt, by default something like "Check: Any blockers, pending tasks, or updates needed?" You can customize it, but keep it lean. The whole point is a fast, cheap check.
Sources and further reading
The full setup: How to Set Up OpenClaw with LM Studio
The free-heartbeat config: How to Add LM Studio to OpenClaw (companion post)
OpenClaw config docs:
docs.openclaw.ai/config/heartbeat
The heartbeat is the cleverest idea in OpenClaw and the easiest one to get billed for. Set it up right once and you stop thinking about it. Forward this to anyone running an agent who hasn't checked their usage dashboard lately.


