Cost Analytics

Tracks token usage and API costs across all providers

modimihir07 908089b 4 files · 1.1 KB Updated

File contents

Cost Analytics

Description

Tracks token consumption and API costs across opencode, Hermes, and Gemini CLI. Computes daily/weekly/monthly projections and alerts when approaching free-tier limits.

When to Use

  • After each agent API call (auto-triggered)
  • Daily cost report generation
  • When checking budget status

Process

  1. Read latest cost-history.json
  2. Compute today's total tokens by agent
  3. Compute weekly and monthly projections
  4. Compare against free-tier limits from settings.json
  5. Generate alert if approaching limits (80%, 90%, 95%)
  6. Update cost-analytics chart data

Output

Cost report with: per-agent breakdown, projections, alerts, recommendations

Agent Assignment

  • Primary: opencode

modimihir07/agentic-os/tree/main/skills/cost-analytics commit 908089bd28

Frequently asked questions

npx skillmds@latest add modimihir07/cost-analytics