#Heartbeat frequency
1 messages Β· Page 1 of 1 (latest)
I'll help you add the heartbeat config! Since you don't have any heartbeat config yet, you'll need to add the agents.defaults.heartbeat section to your ~/.clawdbot/clawdbot.json file.
Add this to your config:
{
"agents.defaults.heartbeat": {
"every": "120m",
"target": "last",
"ackMaxChars": 300
}
}
Key points:
every: "120m"β This sets the heartbeat interval to 120 minutes (2 hours)target: "last"β Sends heartbeats to the last active session
ackMaxChars: 300"β Max characters for acknowledgment messages
After adding this, you can either:
- Hot reload (no restart needed) if you have
gateway.reload.modeset to"hot"in your config - Restart the gateway if you don't have hot reload configured
Would you like me to help you check if you have hot reload enabled, or do you need guidance on applying the config?
I want my target to be my DM message with my bot not the last active session, is that feasible?
Yes, that's feasible! Instead of "last", you can target a specific channel (including your DM with the bot).
Use your DM channel ID as the target:
{
"agents.defaults.heartbeat": {
"every": "120m",
"target": "1460889526812803255",
"ackMaxChars": 300
}
}
To find your DM channel ID:
- Open Discord in a browser/desktop client
- Enable Developer Mode (Settings β Advanced β Developer Mode)
- Right-click on your DM thread with the bot β "Copy ID"
The DM channel ID will be a 18-19 digit number like the example above.
Note: The heartbeat will send to that specific DM channel regardless of which session is active. Just make sure you use the channel ID, not your user ID.
Would you like help applying this config?
Iβm on telegram and not on discord
No problem! For Telegram, you can target your DM with the bot using the Telegram chat ID.
Find your Telegram chat ID:
- Check the gateway logs when you message the bot β it should show the chat ID
- Or forward a message from the bot to @username_to_id_bot to get the ID
The chat ID for Telegram DMs is typically a negative number (like -123456789).
Once you have it, use:
{
"agents.defaults.heartbeat": {
"every": "120m",
"target": "-123456789",
"ackMaxChars": 300
}
}
Replace -123456789 with your actual Telegram chat ID.
Do you know your Telegram chat ID, or do you need help finding it?