Want to learn evals? buildevals.com →

// USE CASE · LLM COST TRACKING

Know what every run costs, and who spent it.

RunAgain computes cost on every generation span from its token counts (or a provider-supplied figure), then rolls it up by agent, user, session, version or any metadata you attach. Spend stops being a monthly invoice surprise and becomes a queryable column.

THE PROBLEM

The invoice tells you nothing

Your provider bill is one number a month. It cannot tell you which agent burned the budget, which customer's workload got expensive, or which prompt change doubled token use last Tuesday. Cost questions are trace questions, and without traces they go unanswered.

// HOW RUNAGAIN DOES IT

01Cost as a typed column

Every generation span carries input, output, cache-read, cache-write and reasoning token counts, with cost computed per span or taken from a provider-supplied cost_usd. It aggregates like any other column: no log parsing, no spreadsheet.

02Attribution by your dimensions

User, session, agent, environment, version and tags are promoted to typed fields on every trace, so cost per customer, per tier or per release is a filter, not a data project.

03Cache and reasoning visibility

Cache-read versus cache-write tokens show whether prompt caching is actually paying for itself, and reasoning tokens are surfaced separately so thinking budgets stay visible.

04Sessions roll it up

Multi-turn conversations aggregate cost across every turn, so the economics of a whole support thread or onboarding flow read as one row.

HEALTH
agent
support-bot
last 24h
run health0.92
eval pass rate94%
tool errors3%
error recovery86%
drift (PSI)ok
baseline outliers2

Spend, tracked live per agent against baseline.

FREQUENTLY ASKED

How do I attribute LLM cost to a specific customer?

Set user.id (or any custom metadata) as a span attribute in your SDK. RunAgain promotes it to a typed column on the trace, so per-customer cost is a filter and an aggregation away. Common vendor attribute aliases are accepted with no mapping.

Does RunAgain track cache and reasoning tokens?

Yes. Each generation span records input, output, cache-read, cache-write, reasoning and total tokens, and cost is computed from those counts, so caching savings and thinking budgets are visible per span.

Do I need a proxy or a provider switch to get cost data?

No. Cost is computed from the token counts already on your traces, shipped via the Vercel AI SDK, Claude Agent SDK or any OpenTelemetry SDK. When a provider supplies its own cost figure, that is used instead.

BUILT ON THESE SOLUTIONS

More use cases: reduce llm costs · time-travel debugging · regression testing in ci · prompt a/b testing · hallucination detection · conversation tracing · llm-judge calibration · tool-call failure analysis · structured output validation · tracing coding agents · agent & llm alerting

Be first to run again.

Book 30 minutes and see the loop on your own agents, or write to tamas@runagain.ai.