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.
- Activity
- New: be the first to try it
- Installs
- 0 installs
- Likes
- 0 likes
- Clones
- 0 clones
- 1# Agent cost dashboard
- 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.
- 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.
- 7## Example
- 9Input: `examples/usage.csv` (2,185 model calls, 573 runs, 6 customers, 4 tasks, October), `examples/prices.csv`, `examples/revenue.csv`.
- 11Output: `out/agent-costs.html` and `out/agent-costs.json`:
- 13```
- 14Cost $147 over 573 runs; cost per success $0.299; cache hit 77%; gross margin after LLM 80%.
- 15research_agent: $1.58 per successful outcome, 65% success rate
- 16cobalt-labs: $66 LLM cost on $60 revenue, margin -10%
- 17```
- 19## What it can access
- 21- Runs `node scripts/cost-dashboard.mjs` (Node built-ins only).
- 22- Reads `data/`. Writes `out/agent-costs.html` and `.json`.
- 23- No network, no provider API keys.
- 25## Setup
- 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.
