HEARTBEAT.mdmonitoringv1.0

API Cost Tracker

Monitor API usage and costs. Alert on spending spikes.

Setup time: ~5 min
Model: Haiku
Cost: ~$0.10/day Calculate your exact cost at Clawback
Last updated: Mar 8, 2025
byFullVibeAIcontributor

Template

HEARTBEAT.md
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 suggestions

Setup

  1. 1

    Copy the HEARTBEAT.md content below into your OpenClaw workspace at `~/.openclaw/workspace/HEARTBEAT.md`.

  2. 2

    Install the required skills: `clawhub install web_fetch`, `clawhub install gog`, `clawhub install message`.

  3. 3

    Open your agent channel (Telegram or any connected channel) and send a message to confirm it's running.

  4. 4

    Your agent will follow the schedule in HEARTBEAT.md automatically. Check back in 30 minutes to see it in action.

  5. 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

v1.0Initial releaseMar 8, 2025

Install commands

clawhub install web_fetch
clawhub install gog
clawhub install message

Skills required

Estimated cost

~$0.10/day

on Haiku model

Calculate your exact cost at Clawback

File type

HEARTBEAT.md

Defines scheduled tasks. Runs on a heartbeat interval.

Version

v1.0

Updated Mar 8, 2025

Contributor

FullVibeAI

Community submission

Spending too much?

Track and optimize your agent API costs.

Try Clawback →

You might also like