Tracking LLM Cost per Product, Not per Model
A single line item for "LLM API" is useless when you run a dozen agents across three products. Attribution is what turns a surprise bill into a budget you can manage.
Open your model provider's billing page and you'll see spend broken down by model: so much for the big model, so much for the small one, so much for embeddings. It's accurate, and it's almost useless for decision-making. It answers "which model did we use" when the question you actually have is "which part of our product is this paying for, and is it worth it?"
That gap is where budgets go to die. You can't optimize what you can't attribute. If summarization, support triage, and a nightly enrichment job all bill into the same undifferentiated pool, a 3x cost spike looks like "the LLM got more expensive" instead of "the enrichment job started reprocessing everything."
Attribution starts at the run
The unit that matters is the run: one invocation of one agent doing one task. If every run carries the cost it incurred plus the product and agent it belongs to, you can roll those up any way you like — by product, by agent, by time window. AgentPulse takes cost_usd on each ingested run and attributes it to the product the agent belongs to, so the dashboard's lead metric is spend per product with each one's share of the total.
You compute cost_usd however fits your setup — token counts times your negotiated rate, a provider's usage field, or a flat per-call estimate. AgentPulse doesn't care how you derive it; it cares that the number rides along with the run so it can be summed where it belongs.
What attribution makes visible
- The runaway. A retry loop shows up as one product's bar tripling overnight, not as a vague month-end overage.
- The freeloader. A feature you assumed was cheap turns out to dominate spend — useful input for whether it earns its keep.
- The optimization target. When you want to cut cost, you cut where the money is. Per-product spend tells you which agent is worth moving to a smaller model and which isn't worth touching.
From visibility to guardrail
Once cost is attributed, it becomes something you can alert on. Set a rule on cost_usd per hour for a product and you've turned a passive chart into an active budget — the moment a product crosses its line, you hear about it. Click any product on the dashboard to filter the entire view to it, and you go from "spend is up" to "this agent, these runs, this trace" in a couple of clicks.
Model-level billing tells you the past tense of your spending. Product-level attribution tells you where it's going right now — which is the only version that lets you do anything about it.