Requirements
- Target platform
- OpenClaw
- Install method
- Manual import
- Extraction
- Extract archive
- Prerequisites
- OpenClaw
- Primary doc
- SKILL.md
Real-time API cost tracking, context bloat detection, and budget enforcement for OpenClaw agents. Use when setting up cost guardrails, checking daily spend,...
Real-time API cost tracking, context bloat detection, and budget enforcement for OpenClaw agents. Use when setting up cost guardrails, checking daily spend,...
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete.
I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run.
Zero-config API cost tracking for OpenClaw agents. Reads your session files directly β no manual logging required. Built by Lemnos AI β the AI operations company. GitHub: getlemnos32/cost-guard
ScriptPurposescripts/auto_cost_report.pyZero-config β reads OpenClaw session JSONL files directly. No setup.scripts/task_logger.pyLog cost by task type for granular attributionscripts/task_cost_report.pyBreakdown by task typescripts/cost_report.pyReport from manually logged entriesscripts/context_analyzer.pyScan workspace for context bloatscripts/track_cost.pyLog a single cost entry manually Model pricing and routing rules: references/model_pricing.md
# Daily cost check β no setup required python3 skills/lemnos-cost-guard/scripts/auto_cost_report.py --budget 10.00 --format brief Output: π° COST (today 09:14 UTC): $3.42 / $10.00 (34%) β OK 47 calls | 1,243,800 in + 18,400 out + 892,100 cached
Run both reports before sending briefing: # Auto report (reads sessions directly) python3 skills/lemnos-cost-guard/scripts/auto_cost_report.py --budget 10.00 --format brief # Task-level breakdown python3 skills/lemnos-cost-guard/scripts/task_cost_report.py --format brief Include output verbatim. Flag anything over 80% of budget.
python3 skills/lemnos-cost-guard/scripts/task_logger.py log "briefing" "Daily briefing 2026-03-16" --cost 2.14 --calls 38 Logs to: task-log.jsonl (readable by task_cost_report.py)
python3 skills/lemnos-cost-guard/scripts/context_analyzer.py --workspace /root/.openclaw/workspace
ThresholdActionβ₯80% of daily budgetWarn user, flag in briefingβ₯100% of daily budgetHard stop all non-revenue tasks. Notify immediately.Single call >500K input tokensImmediate alert β context bloat riskI/O ratio >50:1 on any callContext bloat warning β recommend compaction Recommended budgets: Scrape days (Mon/Wed/Fri): $15/day Standard days: $10/day
Load ONLY what the current task requires. Never load all files by default. TaskLoadMorning briefingSOUL.md, USER.md, MEMORY.md, HEARTBEAT.md, today's memoryEmail outreachMEMORY.md (relevant section), sent-log.mdResearch taskReference files for that vertical onlyHeartbeat (nothing to do)HEARTBEAT.md only
See references/model_pricing.md for full pricing table. Task TypeModelCostFormat, classify, status checkHaiku$0.80/M inputResearch, drafting, analysisSonnet$3.00/M inputComplex reasoningSonnet + thinking~$3.00/M inputOpusNever (unless explicitly requested)$15/M input
auto_cost_report.py reads OpenClaw's native session JSONL files at: /root/.openclaw/agents/main/sessions/*.jsonl Each API call writes message.usage.cost.total to the session file automatically. This script aggregates by date, model, and session β no manual tracking needed. # Today's cost python3 auto_cost_report.py --budget 10.00 # Specific date python3 auto_cost_report.py --date 2026-03-15 --budget 10.00 # Last 7 days, full breakdown python3 auto_cost_report.py --days 7 --budget 70.00 --format full
{ "ts": "2026-03-16T14:00:00Z", "task": "email_send", "model": "claude-sonnet-4-6", "input_tokens": 45000, "output_tokens": 1200, "ratio": 37.5, "cost_usd": 0.153, "notes": "Day 7 breakup batch β 7 emails" }
Star it on ClawHub β it helps others find it. 192+ downloads. Built for production. Zero marketing. By Lemnos AI β we deploy AI employees that cut admin overhead by 85%. GitHub: getlemnos32/cost-guard
Code helpers, APIs, CLIs, browser automation, testing, and developer operations.
Largest current source with strong distribution and engagement signals.