September 2026 release is live Read More

Cost & Attribution

Cost & Attribution

Mavvrik combines automatically captured AI usage with business context and metered non-LLM usage to show the cost of an agent workflow.

Use these pages for three separate jobs:

  1. Add Business Context — identify who or what the spend belongs to.

  2. Track Metered Usage — record paid non-LLM consumption such as API calls, pages, seconds, or storage.

  3. Configure LLM Pricing — use customer-specific LLM rates when they differ from Mavvrik's default model pricing.

Model cost is captured automatically

For supported AI operations, Mavvrik uses the captured model/provider identity and usage quantities to calculate cost.

Examples include input/output tokens and other supported usage dimensions exposed by the source. If a required model or usage field is absent from source telemetry, Mavvrik does not fabricate it.

Add business context

Use Add Business Context to attribute automatically captured AI cost and metered usage to customer, user, session, application, use case, request, region, and tags.

Python
with mvk.context(
    customer_id="acme",
    user_id="user-123",
    session_id="session-456",
    use_case="customer_support",
):
    run_agent()

Track metered usage

Use Track Metered Usage when the workflow consumes a paid resource that Mavvrik cannot derive automatically from a supported AI integration.

Examples:

  • OCR pages;

  • external API calls;

  • document-processing units;

  • paid search requests;

  • storage or other per-unit services.

Metered usage records the metric, quantity, unit, and optional rate. A signal is optional and is used when that operation should also appear as a named step in the execution trace.

Configure LLM pricing

Use Configure LLM Pricing when contracted LLM rates differ from Mavvrik's default model pricing.

Pricing configuration changes the rate used for matching LLM usage. It does not create usage or instrument a workflow step.

Example: document-processing agent

A document-processing agent handles one customer document:

  1. customer_id and session_id identify the business transaction.

  2. The supported LLM summary call is captured and priced automatically.

  3. OCR consumption is recorded as metered usage, for example 42 pages.

  4. A paid metadata API is recorded as metered usage, for example 1 call.

  5. All captured activity inherits the same customer and session context.

Mavvrik can then report model cost and the metered non-LLM costs for the same workflow.