Proactive AI Agents: Implementing Heartbeats, Cron Jobs, and Memory Layers
Your AI agent is sitting idle right now. It will wait until you send a message. Then it will respond, and then it will forget everything. That is not an agent. Here is how to build one that actually works.

Your AI agent is sitting idle right now. It will wait until you send a message. Then it will respond, and then it will forget everything you talked about. That is not an agent. That is a fancy search engine with a chat interface.
If you want an AI that actually does work — that checks on things, that remembers context, that acts without being asked — you need to build differently. You need proactivity. And proactivity is not about adding more intelligence. It is about adding architecture.
This post covers the three building blocks: heartbeats, cron jobs, and memory layers. Together, they turn a reactive chatbot into an agent that works when you are not looking.
Key Takeaways
- Reactive agents wait; proactive agents act. The difference is not intelligence — it is architecture.
- Heartbeats let your agent check on things periodically without being prompted, batch multiple monitoring tasks, and surface urgent items while staying silent when there is nothing to report.
- Cron jobs handle precise scheduling for standalone tasks like daily reports or weekly digests that do not need conversational context.
- Memory layers ensure your agent remembers what happened between sessions so it does not start from zero every time.
- The Proactive Agent System skill on Claw Mart gives you the full architecture — pre-built templates, configuration files, and step-by-step setup for $9.
Reactive vs Proactive: What You Are Actually Building
A reactive agent is simple. You send a message, it responds, done. This works for Q&A. It does not work for anything resembling actual work.
A proactive agent has three characteristics:
- It acts without being asked — not because it is smarter, but because it has scheduled triggers.
- It remembers between conversations — not because it has infinite context, but because it has memory architecture.
- It surfaces what matters — not because it guesses, but because it has rules for what to alert on.
The underlying capability is the same model. The difference is what surrounds it. That is what this post covers.
Heartbeats: The Pulse That Keeps Your Agent Alive
A heartbeat is a periodic automated prompt that wakes your agent up to check on things. Instead of waiting for you to ask, your agent periodically runs through a checklist and decides whether to surface anything.
Here is how it works in OpenClaw:
- You configure a heartbeat interval (e.g., every 30 minutes).
- At each interval, the gateway sends a prompt to your agent.
- The agent reads HEARTBEAT.md — a short file that defines what to check.
- The agent reviews its state: new emails, calendar events, deploy statuses, memory updates.
- If there is something worth reporting, it sends a message. If not, it replies HEARTBEAT_OK — a silent acknowledgment that gets dropped from the conversation.
The magic is in HEARTBEAT.md. Keep it strict. Three check categories maximum. Something like:
- Inbox: Any urgent emails from the last check interval?
- Calendar: Any meetings in the next 2 hours?
- Deployments: Any failed builds or deploys?
That is it. Do not try to check everything. The goal is useful signal, not noise.
Batch your checks. Instead of separate heartbeats for email, calendar, and weather, combine them into one periodic check that runs 2-4 times per day. More than that and you create alert fatigue.
Track state to avoid redundancy. Use a simple JSON file (heartbeat-state.json) to record lastCheck timestamps for each category. This prevents your agent from reporting the same thing twice.
Respect quiet hours. Configure activeHours so your agent does not ping you at 11 PM. Something like 8 AM to 10 PM makes sense for most people.
Cron Jobs: Precise Scheduling for Standalone Tasks
Heartbeats are for context-heavy, batched checks. Cron jobs are for precise scheduling of standalone tasks that do not need conversational context.
Use cron when:
- You need something to run at an exact time (9 AM every Monday)
- The task is independent (generate a weekly report, send a scheduled digest)
- You want isolation from the main conversation thread
Use heartbeats when:
- You need to check multiple things in context
- The task benefits from knowing what happened since the last check
- You want to batch checks to save API calls
A practical example: A heartbeat checks for urgent items every 30 minutes during the day. A cron job sends a morning briefing at 8 AM every weekday — structured, templated, no context needed from the previous day.
The key insight: do not overuse cron. Every cron job runs regardless of whether it is useful. Heartbeats can be smart about whether to say anything. Use cron for things that must happen on a schedule. Use heartbeats for everything else.
Memory Layers: So Your Agent Does Not Have Amnesia
Every session starting from zero is the killer of agent productivity. Your agent needs to remember what happened — not everything, but the important stuff.
The architecture that works:
Daily logs (memory/YYYY-MM-DD.md). Raw notes from each session. What did you work on? What decisions were made? What did the agent not know that it should have known? This is the raw material.
Curated memory (MEMORY.md). The distilled, important stuff. Team members and their roles. Active projects and their current status. Your preferences — tone, formatting, anything you have explicitly stated. Updated weekly or whenever significant new context emerges.
The workflow:
- During heartbeat, the agent checks daily logs for anything worth surfacing.
- Periodically (weekly works well), the agent reviews daily logs and updates MEMORY.md with the important bits.
- At the start of every session, the agent reads MEMORY.md first. This is the baseline context.
The critical rule: no mental notes. If you want the agent to remember something, write it to a file. The agent cannot remember what it does not have access to.
How to Actually Build This
Here is the practical implementation:
Step 1: Set Up HEARTBEAT.md
Create a file with your three check categories. Keep it under 300 characters. Example:
Check: new urgent emails, calendar next 2hrs, recent deploy status
Format: If anything urgent, report it. If not, reply: HEARTBEAT_OK
Step 2: Configure Heartbeat
In your OpenClaw config:
{
"heartbeat": {
"every": "30m",
"activeHours": "08:00-22:00"
}
}
Step 3: Create Memory Structure
memory/
2026-02-14.md # Daily log for today
MEMORY.md # Curated long-term memory
Step 4: Add Your First Cron Job
Pick one standalone task. Daily digest. Weekly report. Something with a clear template. Set it and forget it.
Step 5: Test and Iterate
Start with two heartbeats per day. See what surfaces. Adjust the checklist. Expand only when the signal-to-noise ratio is high.
Why This Matters
The agents that feel magical are not the ones with the best model. They are the ones with the best architecture around the model. The agent that reminds you about a deadline before you forget. The agent that knows your team structure without asking. The agent that sends a summary while you sleep.
None of that happens by accident. It happens because you built the system to make it happen.
The Proactive Agent System skill on Claw Mart gives you templates for HEARTBEAT.md, the dual-layer memory structure, cron job configurations, and OpenClaw config files with activeHours settings. Nine dollars. Start with a framework, not from zero.
Your Next Steps
Here is what to do right now:
- Audit your current agent setup. Is it purely reactive? Write down the three things you wish it would check without being asked.
- Draft your first HEARTBEAT.md. Keep it to three check categories max. Inbox, calendar, and one project-specific source.
- Set up a single cron job. Pick your most repetitive scheduled task, probably a daily summary or weekly report, and automate it.
- Create your memory structure. Make the memory/ directory with today date file. Write the first version of MEMORY.md with your core context: team members, active projects, preferences.
- Start conservative. Two heartbeats per day during work hours. One cron job. Expand only after you have confirmed the system is surfacing useful information without creating noise.
The gap between a reactive chatbot and a proactive AI agent is not intelligence. It is architecture. The agent that anticipates your needs is not smarter than the one that waits for instructions. It just has a heartbeat, a schedule, and a memory. Now you know how to build all three.
Recommended for this post

