Skip to main content
Production agents spend money outside model APIs. Search, speech, vector stores, enrichment APIs, workflow runners, and hosted tools can all change margin. Pylva tracks these sources with raw usage metrics. To find and cover every paid source before it reaches billing, see Cost Source Discovery.

Report usage, not price

Your application reports what happened. Pylva prices it later from the dashboard.

TypeScript

Python

Good metric names

Choose metric names that match the vendor unit you pay for.

Pricing workflow

  1. The SDK sends a metric event.
  2. Pylva records the source and flags missing pricing if needed.
  3. You configure a dashboard pricing rule for the metric.
  4. Future events are priced automatically.
  5. Historical gaps can be backfilled when pricing is available.
Before using non-LLM usage for customer invoices, see Billing Workflow.

Best practices

  • Keep metric names stable.
  • Use one unit per metric.
  • Choose one reporting path per source to avoid double counting.
  • Avoid embedding vendor names into customer_id or step_name.
  • Do not send raw user content in metadata.