Know what your agents cost before the invoice tells you.
If you ship features built on model calls, the bill arrives as one number at the end of the month. StepMetrics shows you which runs, which models and which tools it came from, in the same account as your web analytics.
Cost per run, model and tool
A run is one piece of work your product does, such as a code review or a support reply. Inside it, every model call, tool call and retrieval is recorded with its timing, its outcome and, for model calls, its tokens. So when spending jumps, you can see whether it was more runs, a pricier model, or one run that looped.
The same data tells you which models you actually use and what each one costs you, which tools fail most often, and how long a run takes in the typical case and in the slow tail. Every report can be narrowed to one environment, so production is not blended with testing, or to one kind of run.
Server-side cost calculation
You send the token counts your provider already returned, and StepMetrics works out the cost on the server. It uses the price that was in force when the call happened, so a price change next month does not quietly rewrite last month. Cached input is priced as cached input rather than folded into the full rate.
Prices for Anthropic's Claude models are built in. For any other model, you can send the cost you already know, from your invoice or your gateway, and it is stored exactly as sent.
Unpriced models
This is the failure that makes most cost dashboards wrong without anyone noticing. A model with no price is recorded as unpriced, counted separately, and reported back to you when the data arrives, so the gap is visible while you can still fix it. A total that silently treated those calls as free would look complete and be low.
Ask your agent
Agent cost is read by asking, not by opening another dashboard. Your coding agent can answer "what did code review cost this week", "which model is most of the spend" or "why did runs start failing yesterday" over the same MCP connection it uses for your site's traffic, and the same answers are available from the API for your own scripts.
How agents read your analytics
Retries and write-only keys
Background jobs get retried. A replayed run overwrites what it sent the first time rather than adding a second copy, so a retry does not double your cost. The key that sends this data is write-only: if it leaks, it can add telemetry and do nothing else.
Included on every plan
Agent telemetry lives next to your web analytics, under the same account and the same monthly event allowance. It is included on every plan, including Free. It works from any language that can send JSON over HTTP, so it does not care which framework or provider your agent is built on.
Try it on your site.
Add your first site for free. See where visitors come from, what they look at, and how many take the next step.
No credit card required.