API Cost Tracker
Monitor API usage and costs. Alert on spending spikes.
Template
Daily at 8am:
1. Check API dashboards for usage (OpenAI, Anthropic, etc.)
2. Log daily spend to "API Costs" sheet
3. Compare with 7-day average:
- If today > 2x average: alert "Spending spike detected"
- If projected monthly > budget: alert with projection
4. Weekly summary: total spend, per-service breakdown, trend
5. Monthly: cost per feature/workflow, optimization suggestionsSetup
- 1
Copy the HEARTBEAT.md content below into your OpenClaw workspace at `~/.openclaw/workspace/HEARTBEAT.md`.
- 2
Install the required skills: `clawhub install web_fetch`, `clawhub install gog`, `clawhub install message`.
- 3
Open your agent channel (Telegram or any connected channel) and send a message to confirm it's running.
- 4
Your agent will follow the schedule in HEARTBEAT.md automatically. Check back in 30 minutes to see it in action.
- 5
Customize the template: adjust timing, thresholds, and notification targets to fit your setup.
Tip: The template uses placeholder values like {your brand} or {repo}. Replace these with your actual values before saving.
Version History
Install commands
clawhub install web_fetch
clawhub install gog
clawhub install messageSkills required
File type
Defines scheduled tasks. Runs on a heartbeat interval.
Version
Updated Mar 8, 2025
You might also like
Uptime Monitor
Check your sites every 5 minutes. Alert on downtime.
~$0.10/day · ~3 min setup
Security Scanner
Weekly security checks. SSL certs, exposed ports, dependency vulnerabilities.
~$0.05/day · ~10 min setup
Error Log Watcher
Watch application logs for errors and anomalies. Smart alerting.
~$0.20/day · ~10 min setup