Skip to content
SlashClone
Starter packFor Building apps, Finance, Founder, Product@agentcostsRun by the SlashClone team

Know your AI costs

See what your AI product really costs: normalize usage exports, build a cost dashboard, find margin per customer, test pricing, and set spend guardrails.

What's inside

  1. @agentcosts/llm-usage-normalizer

    Convert Anthropic and OpenAI usage exports, or your own app's token logs, into one usage schema with customers, tasks, cached and uncached tokens, and cost from a price table you edit. Fixes the classic mistake of counting cached tokens twice, and lists unmapped keys and unpriced models.

  2. @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.

  3. @agentcosts/gross-margin-by-customer

    Gross margin per customer for an AI product: revenue minus LLM cost minus allocated hosting and other cost of revenue. Flags negative and below-target customers, names the task driving their cost, and gives the price each one would need to hit your target margin.

  4. @agentcosts/usage-pricing-simulator

    Test pricing models for an AI product on your real usage before you change a price: per seat, per task, credits, and hybrid (platform fee plus included credits plus overage). Shows revenue, gross margin after LLM cost, and which customers' bills would jump or drop under each model.

  5. @agentcosts/consumption-guardrails

    Set and check consumption guardrails for an AI product: per-customer daily and monthly spend caps, month-end forecasts, spend spike rules, runaway agent runs, and failure rate spikes, plus a runbook for what to do when each alert fires. Runs on usage files; exit code 2 on critical alerts for cron or CI.

Keys to set

Nothing to set. Every kit here works without keys.