OpenClaw Cost Control
OpenClaw users report spending $30-100+ per month on LLM API calls, with runaway loops causing bills of $3,600/mo or more. Without budget caps, a single agent loop can drain your API credits overnight.
Curate-Me’s gateway adds cost governance to every OpenClaw request with zero code changes.
How Cost Governance Works
Every LLM request passes through the gateway’s 5-step governance chain. Step 2 is the cost estimation check:
Request → Rate Limit → COST CHECK → PII Scan → Model Allowlist → HITL Gate → Provider
↓
Estimate tokens (tiktoken BPE)
Look up model pricing
Check per-request limit
Check daily budget
Check monthly budget
↓
ALLOW or DENYIf the estimated cost would exceed any budget threshold, the request is denied before it reaches the provider. You never pay for a request that breaks your budget.
Budget Configuration
Per-Request Cost Limits
Set the maximum cost for a single LLM request:
# In the dashboard → Policies → Cost Controls
max_cost_per_request: 2.50 # USD — deny any request estimated > $2.50Daily Budget Caps
Set a daily spending limit per organization:
daily_budget: 50.00 # USD — deny all requests once $50/day reachedMonthly Budget Caps
Set a monthly ceiling:
monthly_budget: 500.00 # USD — hard stop at $500/monthPer-Runner Session Budgets
For managed runners, set budgets per session:
session_budget: 5.00 # USD — terminate session when $5 spentCost Tracking
Real-Time Dashboard
The cost dashboard shows:
- Total spend today, this week, this month
- Cost by model — which models cost the most
- Cost by runner — which runners are most expensive
- Cost by channel — WhatsApp vs Telegram vs Slack
- Cost trend — daily spend over the last 30 days
- Projected monthly — based on current run rate
Cost Alerts
Configure alerts at budget thresholds:
| Threshold | Action |
|---|---|
| 50% of daily budget | Email notification |
| 75% of daily budget | Dashboard warning badge |
| 90% of daily budget | Slack/webhook alert |
| 100% of daily budget | All requests denied |
Emergency Kill Switch
The kill switch immediately halts all agent activity across all runners. Use it when:
- A runaway loop is detected
- Costs spike unexpectedly
- A security incident requires immediate shutdown
Available from the dashboard header or via API:
curl -X POST https://api.curate-me.ai/v1/runners/kill-all \
-H "X-CM-API-Key: cm_sk_xxx"Model Allowlists
Prevent agents from using expensive models:
# Only allow these models
allowed_models: [
"gpt-4o-mini", # $0.15/1M input, $0.60/1M output
"claude-haiku", # $0.25/1M input, $1.25/1M output
"deepseek-chat", # $0.14/1M input, $0.28/1M output
]Any request to a model not on the allowlist is denied.
Cost Optimization Tips
- Set model allowlists — Block expensive models for non-critical agents
- Use per-session budgets — Limit runaway risk per runner session
- Enable cost alerts — Catch spikes before they become bills
- Review cost-by-model weekly — Identify wasteful model usage
- Set conservative daily budgets — Start at $25/day, increase as needed
- Use the kill switch liberally — Better safe than sorry
Pricing Tiers
| Tier | Gateway Requests | Daily Budget Default | Model Allowlist |
|---|---|---|---|
| Free | 100/day | $10/day | All models |
| Starter | 300 RPM | $50/day | Configurable |
| Professional | 1,000 RPM | $200/day | Configurable |
| Enterprise | 5,000 RPM | $1,000/day | Configurable |