8.3
/ 10
1 evaluations
2.3k Downloads
Overview
Tracks OpenClaw/Clawdbot token and USD cost usage from session JSONL logs, produces time-bounded cost reports, enforces budgets via exit codes, and applies a token-saving response/playbook strategy.
Key Advantages
1.Uses real per-call usage.cost fields when available instead of rough token-window estimates, improving accuracy of spend tracking.
2.Simple CLI interface (extract_cost.py) for daily/weekly/lifetime reports, top expensive sessions, and JSON output suitable for dashboards or further automation.
3.Supports budget enforcement via exit codes, making it easy to wire into cron jobs, CI, or external alerting systems (e.g., Telegram notifications).
4.Provides a concrete token-saving playbook to reduce response length, tool-call frequency, and web-iteration counts without changing system configuration by default.
5.Backwards compatibility with legacy Clawdbot session paths alongside current OpenClaw directories, easing migration for existing users.
Use Cases
- Daily or weekly monitoring of OpenClaw/Clawdbot spend across agents by scanning ~/.openclaw and ~/.clawdbot session logs.
- Setting up cron-based budget guards that exit non-zero when a daily or weekly cost threshold is exceeded, triggering alerts or automated actions.
- Feeding JSON cost summaries into dashboards or BI tools to visualize trends, top spenders, and cost anomalies over time.
- Identifying the top N most expensive sessions to investigate problematic prompts, tools, or agents driving unusually high token burn.
- Enforcing a token-saving playbook in workflows where a user explicitly requests minimal token usage, e.g., production assistants or high-volume bots.
Evaluation Scores
8.3
/ 10
Reliability
7.5
Functionality
8.5
Usability
8.0
Safety
9.5
Performance
7.5
Compatibility
8.0
Based on 1 evaluation · Latest: 3/19/2026
Download Trend
Loading...
Evaluation History (1)
8.3/103/19/2026▼
OS: darwin-x64LLM: google/gemini-3.1-pro-preview
**Quick judgement**: A focused and practical cost-monitoring and budget-enforcement skill for OpenClaw/Clawdbot setups. It is well-aligned with real-world usage (cron jobs, dashboards, alerts) and leverages session JSONL logs for more accurate cost tracking than context-window estimates. Best suited for users already logging sessions via OpenClaw/Clawdbot and comfortable running Python CLI tools.
**Strengths**
- Uses `usage.cost` from session logs when present, improving accuracy over heuristic token-based estimates.
- Clear CLI workflows for daily/weekly reports, top expensive sessions, and JSON outputs (good for dashboards/automation).
- Built-in budget checks using `--budget-usd` and exit codes make integration with cron and alerting straightforward.
- Token-saving playbook provides concrete, actionable guidelines to reduce response length and tool-call overhead.
- Backward compatibility with legacy Clawdbot paths eases adoption in older setups.
**Risks / limitations**
- Accuracy falls back to user-provided price environment variables when `usage.cost` is missing; misconfigured prices will skew reports.
- Depends on the specific JSONL session schema and file layout; schema or path changes in OpenClaw/Clawdbot could break parsing until updated.
- For very large log directories, performance may degrade if the script is not optimized for incremental or streamed processing.
- The token-saving playbook trades detail for lower cost; in tightly constrained responses, there is a risk of under-explaining unless users opt into more detail.
**Recommended scenarios**
- Individuals or teams running OpenClaw agents in production who need simple, scriptable daily/weekly cost oversight.
- Environments where exceeding a daily budget must trigger alerts or automation (e.g., messaging via Telegram or other channels wired to exit code `2`).
- Cost-conscious users seeking to identify top expensive sessions and then refine prompts/agents accordingly.
- Workflows that benefit from a "minimal tokens" mode, where the assistant is explicitly instructed to keep responses and tool usage short and controlled.
Comments (0)
No comments yet. Be the first!