Observe one run and estimate its cost
Setcost: true and attach the observer once. Read usage and cost from each run result. Install matching @agentium/core, @agentium/observability, and openai, then set OPENAI_API_KEY.
null total means the price is incomplete. knownSubtotal contains only the charges that Agentium could price.
Supply matching prices
APricingCatalog contains dated rules for the billing provider, exact model ID, API, meter, currency, and billing context. Each rule states its rate unit. A rate of "10" per "1000000" tokens needs no conversion to a per-thousand number.
Use separate rules for ordinary input, cache reads, cache writes, and output. Add cache lifetime, service tier, region, or context bands when the tariff requires them. See the complete four-charge example and pricing types.
A requested Fast, Ultrafast, or Pro mode is evidence about the request. The response and provider contract determine the billed tier and model. Do not add a multiplier to a mode name without a matching price rule.
Add a budget
Set the budget once in the Agent configuration. The shorthand below uses USD thresholds:Choose an evidence destination
Delivery through a bounded exporter is not an authoritative audit ledger. Flush owned telemetry after active runs and Agent cleanup settle; the host owns shutdown of borrowed exporters or SDK providers according to their contract.