Skip to main content
Pylva is most valuable when every usage event answers two questions:
  • Who caused this cost?
  • Which part of the agent caused it?

Customer identifiers

Use customer_id for the account, workspace, tenant, or end customer that caused the work. Good values:
  • cust_abc123
  • workspace_789
  • acme-corp
Avoid:
  • Email addresses.
  • Phone numbers.
  • Raw names when an opaque ID is available.
  • Any prompt or message content.

Step names

Use step_name for the logical agent step that created spend. Good values:
  • retrieve_context
  • evaluate
  • summarize
  • draft_reply
  • speak_answer
Keep names stable. If a label changes every release, cost reports become hard to compare.

Why attribution matters

Provider dashboards show a vendor bill. Pylva shows the customer and product path behind the bill. Before attribution can be trusted, make sure each paid model, tool, and service is covered by Cost Source Discovery.

Minimum useful event

An event should include:
  • customer_id.
  • step_name.
  • Provider or metric.
  • Usage counts such as tokens, requests, seconds, characters, or executions.
  • Status and latency.
Pylva calculates cost_usd on the server.