Skip to content
SlashClone

Agent cost dashboard

@agentcosts/agent-cost-dashboard

Turn LLM usage logs into one self-contained HTML cost dashboard for an agentic product: cost per customer, per task, per successful outcome, model mix, cache hit rate, and gross margin when you add revenue by customer. Prices blank costs from an editable price table.

SkillDatav1.0.0 (latest)Tested
Activity
New: be the first to try it
  1. 1# Agent cost dashboard
  2. 2
  3. 3Turns LLM usage logs into one HTML dashboard: cost per customer, per task, and per successful outcome, model mix, cache hit rate, daily cost, and gross margin after model costs when you add revenue. No external scripts; open it anywhere.
  4. 4
  5. 5**Who it is for:** founders and engineers running an AI or agent product who need to know which customers and workflows cost what, before pricing or a board meeting.
  6. 6
  7. 7## Example
  8. 8
  9. 9Input: `examples/usage.csv` (2,185 model calls, 573 runs, 6 customers, 4 tasks, October), `examples/prices.csv`, `examples/revenue.csv`.
  10. 11Output: `out/agent-costs.html` and `out/agent-costs.json`:
  11. 13```
  12. 14Cost $147 over 573 runs; cost per success $0.299; cache hit 77%; gross margin after LLM 80%.
  13. 15research_agent: $1.58 per successful outcome, 65% success rate
  14. 16cobalt-labs: $66 LLM cost on $60 revenue, margin -10%
  15. 17```
  16. 19## What it can access
  17. 21- Runs `node scripts/cost-dashboard.mjs` (Node built-ins only).
  18. 22- Reads `data/`. Writes `out/agent-costs.html` and `.json`.
  19. 23- No network, no provider API keys.
  20. 25## Setup
  21. 27None. Put usage in `data/usage.csv` (or convert a provider export with `@agentcosts/llm-usage-normalizer`), copy `examples/prices.csv` to `data/llm-prices.csv`, and **check every price against the provider's current pricing page**. The example prices are a starting point, not a quote.