The real cost of AI is not just tokens
Models, retrieval, tools, memory and retries form one economic unit: the completed task.
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.
Sources reviewed
This article is an original Nubent synthesis. The sources let you inspect the basis and explore each subject further.