Proactive Messages
Most chatbots sit there and wait for you to say something. Moltbot can reach out first.
Morning briefings. Reminders. Alerts when something changes. Your bot wakes up on its own, checks things, and sends you a message if there's something worth saying.
This is one of those features that sounds simple but completely changes how you use the bot. Instead of remembering to ask "what's on my calendar today?" every morning, the bot just tells you.
How It Works
Two systems power this: the Heartbeat Engine and cron jobs.
Heartbeat Engine
The Heartbeat Engine is a background process that runs while Moltbot is active. It periodically "wakes up" the bot to check on things.
Think of it like a heartbeat. Every N minutes, the bot gets a pulse. On each pulse, it can:
- Check data sources (APIs, files, databases)
- Compare current state to previous state
- Decide if something is worth telling you about
- Send a message if yes, stay quiet if no
The key word is decide. The bot doesn't blindly spam you. It uses the LLM to judge whether something is noteworthy. If nothing interesting happened, you hear nothing.
Cron Jobs
For scheduled, recurring tasks, Moltbot uses a cron system. Same concept as Unix cron, but managed through the bot.
You can set these up by talking to the bot:
Every weekday at 8am, give me a morning briefing with weather, top news, and my reminders for the dayEvery Monday at 9am, summarize what happened in my GitHub repos last weekAt 5pm every day, remind me to wrap up and log my hoursOr configure them in the config file if you prefer:
proactive:
cron:
- schedule: "0 8 * * 1-5" # Weekdays at 8am
task: "morning-briefing"
prompt: "Give me a morning briefing: weather in San Francisco, top 3 Hacker News stories, and any reminders I have for today."
channel: telegram
- schedule: "0 17 * * *" # Every day at 5pm
task: "evening-reminder"
prompt: "Remind me to log my hours and wrap up for the day."
channel: telegramCron jobs persist across restarts. Set them once, they keep running.
Use Cases
Morning Briefing
The classic. Wake up, check your phone, the bot's already sent you a summary of your day.
Set up a morning briefing for 7:30am every day. Include:
- Weather in my city
- My calendar events for today
- Any reminders I've set
- Top tech news headlinesThe bot pulls this together using its tools — Brave Search for weather and news, memory for your reminders and calendar. You get a single, clean message.
Reminders
Simple but effective.
Remind me to take out the trash every Thursday at 8pmRemind me in 3 hours to call the dentistRemind me on January 30th to renew my domainOne-time reminders and recurring ones both work.
Change Alerts
This is where the Heartbeat Engine shines. Tell the bot to watch for something:
Keep an eye on the Bitcoin price. Let me know if it moves more than 5% in either directionMonitor my website https://mysite.com and alert me if it goes downWatch my GitHub repo for new issues and let me know when one comes inThe bot checks periodically and only messages you when there's something to report. No spam.
Digest Messages
Instead of getting real-time alerts for everything, you can batch them:
Collect all my GitHub notifications during the day and send me a digest at 6pmLess interruption. Same information.
Configuration
Heartbeat Settings
proactive:
heartbeat:
enabled: true
intervalMinutes: 15 # How often the bot "wakes up"
quietHours:
start: "23:00"
end: "07:00"Quiet hours are important. You don't want the bot pinging you at 3am because Bitcoin moved. Set a window where the bot stays silent (or batches messages for later).
Interval controls how often the bot checks. 15 minutes is a good default. Lower means more responsive but more API calls. Higher means cheaper but you might miss time-sensitive stuff.
Per-Channel Settings
Proactive messages go to a specific channel. You can set defaults:
proactive:
defaultChannel: telegramOr specify per task:
proactive:
cron:
- schedule: "0 8 * * 1-5"
task: "morning-briefing"
channel: telegram # This one goes to Telegram
- schedule: "0 9 * * 1"
task: "weekly-summary"
channel: slack # This one goes to SlackCost Awareness
Every heartbeat tick and every cron job triggers an LLM call. That costs money (or tokens, depending on your setup).
A heartbeat every 15 minutes = 96 calls per day. If each one is cheap (just checking a condition), the cost is negligible. But if each tick involves browsing the web, running searches, and composing a long message, it adds up.
Keep your proactive prompts focused. "Check if X changed" is cheaper than "research everything about X and write me a report."
Managing Tasks
List Active Tasks
What proactive tasks do you have running?Or:
moltbot cron listRemove a Task
Stop the morning briefingmoltbot cron remove morning-briefingPause Everything
proactive:
heartbeat:
enabled: falseOr just ask the bot:
Pause all proactive messages until I say otherwiseHow It Interacts with Memory
The bot uses its memory when composing proactive messages. If you told it "I have a meeting with Sarah every Tuesday at 10am," the morning briefing will mention it.
This is why keeping your memory files up to date matters. The proactive system is only as good as the information the bot has access to.
Platform-Specific Notes
Telegram
Works great. No limitations. The bot can message you anytime.
WhatsApp
Remember the 24-hour window. WhatsApp only lets bots send messages freely within 24 hours of the last user message. After that, you're limited to template messages. For daily briefings, make sure you message the bot at least once a day to keep the window open.
Discord
The bot can DM you or post in a channel. Channel posts are great for team-facing alerts (e.g., "new PR needs review"). DMs for personal stuff.
Slack
Similar to Discord. The bot can DM you or post in a channel. Thread support means alerts can be grouped neatly.
Troubleshooting
Proactive messages not sending
- Is the heartbeat enabled? Check
proactive.heartbeat.enabledin your config. - Is it quiet hours? Check your quiet hours window.
- Is Moltbot actually running? Proactive messages stop when Moltbot stops.
- Check
moltbot logsfor errors.
Messages sending at wrong times
Cron schedules use your system's timezone. Make sure your server's timezone is set correctly.
timedatectl # LinuxToo many messages
Lower the heartbeat frequency. Increase the threshold for what counts as "noteworthy." Or set up digest mode instead of real-time alerts.
Morning briefing is incomplete
The bot needs the right tools. Weather needs Brave Search. Calendar needs a calendar integration. If a data source isn't available, the bot will skip that part or tell you it can't access it.