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. AgentMeter tracks these sources with raw usage metrics.

Report usage, not price

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

TypeScript

import { reportUsage } from "@agentmeter/sdk";

reportUsage({
  customer_id: "acme-corp",
  step_name: "search_web",
  metric: "search_requests",
  metric_value: 1,
});

Python

from agentmeter import report_usage

report_usage(
    customer_id="acme-corp",
    step_name="search_web",
    metric="search_requests",
    metric_value=1,
)

Good metric names

Choose metric names that match the vendor unit you pay for.
Vendor categoryExample metricExample step
Search APIsearch_requestsretrieve_context
Text to speechcharactersspeak_answer
Speech to textaudio_secondstranscribe_call
Vector databasevector_queriesretrieve_context
Workflow runnerexecutionsrun_tool

Pricing workflow

  1. The SDK sends a metric event.
  2. AgentMeter 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.

Best practices

  • Keep metric names stable.
  • Use one unit per metric.
  • Avoid embedding vendor names into customer_id or step_name.
  • Do not send raw user content in metadata.