AI Navigate

How to reduce your OpenClaw agent costs (with a free dashboard

Dev.to / 3/16/2026

💬 OpinionDeveloper Stack & InfrastructureTools & Practical Usage

Key Points

  • OpenClaw agents run continuously with heartbeat checks, making it easy to miss how much is spent on LLM API calls until the bill arrives.
  • CostClaw is a free OpenClaw plugin that captures every LLM call and presents a live local dashboard to monitor usage and spend.
  • Installation is straightforward: clone the GitHub repo, run npm install and npm run build, install the plugin with openclaw, and restart the gateway.
  • It provides usage-by-source, model breakdown, sessions-by-cost, and an auto-generated recommendations panel to suggest cheaper models for similar tasks, enabling savings.
  • In a real setup, the author dropped costs from $90/month to $35/month, with savings traced to one heartbeat agent.

If you're running OpenClaw agents, you're probably paying more than you realize.

The problem: OpenClaw agents run continuously. Heartbeat timers fire every
few minutes. Cron jobs run overnight. Subagents spawn subagents. Every one
of those makes LLM API calls — and without visibility, you won't know where
the money is going until the bill arrives.

## The fix: install CostClaw

CostClaw is a free OpenClaw plugin that captures every LLM call and shows
you a live local dashboard.

Install:
\bash
git clone https://github.com/Aperturesurvivor/costclaw-telemetry.git
cd costclaw-telemetry
npm install && npm run build
openclaw plugins install -l .
openclaw gateway restart
\
\

Open http://localhost:3333.

## What to look for

1. Usage by Source
This is always the most revealing. Most people expect "user" to be their
biggest cost. It's usually "heartbeat."

If your heartbeat agent is running GPT-4o or Claude Sonnet for keep-alive
checks, switch it to GPT-4o-mini or Claude Haiku. Same functionality,
~1/20th the cost.

2. Model Breakdown
Sort by cost. If one model owns 80%+ of your spend, ask whether every use
case actually needs that model's capability.

3. Sessions by Cost
Identify your most expensive conversation patterns. Long agentic loops
with many subagent calls show up here.

4. Recommendations panel
CostClaw auto-generates suggestions based on your specific usage.
Common output: "Your most-used model costs $X/1K tokens. Switching
to [cheaper model] for similar tasks would save ~$Y/month."

## Real numbers

In my own setup: $90/mo → $35/mo after seeing the breakdown.
The entire savings came from one heartbeat agent.

GitHub: https://github.com/Aperturesurvivor/costclaw-telemetry (MIT, free)

#openclaw #llm #ai #agents #programming