In one sentence
The useful metric is not cost per call; it is cost per task completed at the expected quality.
One answer can hide many operations
An agent may perform multiple inferences, searches, tool calls and memory writes before replying. Model billing is one part; vector databases, compute, logs and external services complete the cost.
What to attribute
- Input and output tokens by model and version.
- Retrievals, tool calls, retries and reasoning steps per workflow.
- Cost by customer, feature, environment and successful outcome.
- Quality, latency and abandonment alongside cost.
Technical levers
Reduce unnecessary context, route by task complexity, cache stable responses, limit iterations and fix poor retrieval. These are more precise controls than one global spending cap.
Workflow-aware alerts
Monthly alarms arrive too late. Detect reasoning loops, tool storms and session memory growth, and connect every alert to an owner and runbook.