The Monitoring Model Everyone Inherited From a Different Era
When enterprise teams first started instrumenting AI costs, the mental model was simple: a user sends a request, the model processes it, you log the token count and multiply by price per token. This model was accurate for its time. Early LLM integrations were largely request-response — a user typed something, the model responded, the interaction ended. Token cost per API call was a reasonable unit of accountability.
That model is now wrong for a large and growing portion of enterprise AI workloads. Agentic systems — architectures where a model can plan, execute tool calls, observe results, and iterate across multiple steps before returning a response to the user — have invalidated the core assumption that one user action maps to one API call. The reality in 2025 is that a single user action in an agentic workflow can trigger dozens of discrete model invocations, each with its own token footprint, each charged separately by your API provider, and none of them individually legible as the cost of the work the user actually initiated.
If your agentic AI cost monitoring is still organized around per-call token counts, you are watching the wrong metric. You have visibility into the plumbing but not the pipe.
What Actually Happens When an Agent Runs
To understand why per-call monitoring fails for agentic systems, it helps to trace what actually happens when a non-trivial agent processes a request. Consider a code review agent asked to analyze a pull request for security issues.
The initial invocation passes the PR diff to the model with a system prompt and asks for an analysis plan. The model returns a structured plan identifying five areas to investigate. The orchestration layer executes that plan: for each area, it makes a tool call to fetch relevant context (code history, related files, dependency manifests), then invokes the model again to analyze that context. If an initial analysis is inconclusive, the agent may invoke a secondary analysis pass. If a tool call returns an error, the agent retries with modified parameters. If the model determines it needs additional context mid-analysis, it generates a new tool call sequence.
By the time the agent returns its final report to the user, the workflow may have made thirty to fifty model invocations. Each of these invocations appears in your API logs as a separate call. The token counts are individually small — context windows are often kept tight for efficiency. But the aggregate cost of the workflow is a function of the entire sequence, and no single call in that sequence tells you what the workflow cost or what triggered it.
The Three Gaps That Per-Call Monitoring Cannot Close
Attribution Gap
When you look at a per-call cost log for an agentic system, you see requests. You do not see workflows. You cannot tell which calls belong to the same user-initiated action, which calls are primary model reasoning versus tool result processing, or which calls represent retries triggered by failures. Attribution — connecting cost to the business action that generated it — requires a layer of instrumentation that does not exist in your API provider's billing data.
This matters operationally when a team reports that their agent "seems expensive" and you try to investigate. If your monitoring is per-call, you will see a high call volume but you will not be able to tell whether the cost is driven by a few deep workflows, by a large number of shallow workflows, by excessive retries, or by reflection loops that are running more iterations than intended. Each of those diagnoses leads to a different remediation. Without workflow-level attribution, you cannot distinguish between them.
Anomaly Detection Gap
Per-call anomaly detection on agentic systems generates a high rate of false negatives. A cost spike in an agentic workload may show up as a gradually increasing average call count rather than a sudden cost jump on any single call. A runaway reflection loop — an agent iterating on its own reasoning past the point of diminishing returns — produces elevated per-workflow cost that is invisible at the per-call level if the individual calls remain within normal token ranges.
Workflow-level monitoring makes these anomalies detectable. A workflow that typically runs twelve model invocations suddenly running forty is an alert worth generating. A workflow that typically costs $0.18 per user action now averaging $0.85 is actionable information. These signals do not exist in per-call data.
Optimization Gap
Per-call data tells you what each call cost. It does not tell you whether the call was necessary, whether it contributed to a successful outcome, or whether the architecture of the workflow is efficient. Optimization of agentic AI cost requires understanding the structure of workflows: where do most costs concentrate, which workflow steps have high token counts relative to their contribution, where do retries cluster, and which tool call patterns are generating the most expensive downstream model invocations.
Teams trying to reduce agentic AI spend without workflow-level visibility tend to make one of two mistakes: they cut context windows indiscriminately, which degrades output quality, or they add hard caps on iterations, which breaks agents in failure modes they did not anticipate. Targeted optimization requires knowing where in the workflow the spend is concentrated.
What Workflow-Level Attribution Actually Requires
Instrumentation for agentic AI cost monitoring requires adding a correlation layer that your API provider does not supply. The core concept is a workflow trace ID — a unique identifier assigned at the point where a user action initiates a workflow, propagated through every model call and tool call that workflow generates, and recorded alongside the token cost of each call.
This is architecturally similar to distributed tracing in microservice systems. Each individual operation gets a span. Each span belongs to a trace. The trace represents the complete workflow. Cost rolls up from spans to traces, and traces are attributable to the user action that initiated them.
Implementation typically involves three components. First, a tracing wrapper that intercepts calls to your model provider's SDK and records the trace ID, span ID, call type, and token counts. Second, a workflow context manager that creates and propagates trace IDs through your orchestration layer — whether you are using LangChain, LlamaIndex, AutoGen, a custom framework, or direct API calls. Third, an aggregation layer that groups spans into traces and produces per-workflow metrics.
| Metric | Per-Call Monitoring | Workflow-Level Monitoring |
|---|---|---|
| Total cost | Sum of all calls | Sum of all workflows, decomposed by workflow type |
| Cost per user action | Not directly available | Primary metric; tracked over time and by workflow variant |
| Retry cost | Invisible (retries look like normal calls) | Isolated as a workflow dimension; correlatable with failure rates |
| Reflection loop depth | Not observable | Tracked as span count per workflow type; anomaly-detectable |
| Cost trend by team | Available if calls are tagged | Available at workflow level; more actionable for optimization |
| Cost per successful outcome | Requires external correlation | Directly computable when outcome data is recorded on the workflow |
The Hidden Cost Multipliers in Agentic Architectures
Beyond the structural monitoring problem, agentic systems have several cost dynamics that per-call analysis systematically underweights.
Reflection and Self-Critique Loops
Many production agent architectures include a reflection step where the model evaluates its own output before returning it. In well-designed systems, this runs once and adds a modest cost premium. In poorly constrained systems, or in cases where the model repeatedly judges its output as insufficient, the reflection loop can run many times, each iteration adding the full cost of the analysis pass. The per-call cost of each reflection call is low. The workflow-level cost can be three to five times the cost of the primary task.
Tool Result Injection
When an agent makes a tool call and injects the result back into its context, the token count of subsequent model calls grows with the size of the injected context. A workflow that retrieves several large documents before its synthesis pass may have final-step calls with context windows an order of magnitude larger than its earlier planning calls. Token cost is not evenly distributed across the workflow; it concentrates at high-context steps. Workflow-level instrumentation makes this concentration visible; per-call monitoring treats it as noise.
Cascading Retries
Retry logic in agentic systems can be difficult to control. An agent that encounters a malformed tool response may retry that tool call, which may invoke the model again to parse the new response, which may trigger another tool call sequence. A single upstream failure can initiate a retry cascade that doubles or triples the cost of a workflow before hitting a hard cap. Without workflow-level monitoring, these cascades are invisible until they appear as budget overruns.
What Good Agentic Cost Monitoring Looks Like in Practice
Organizations with mature agentic AI cost monitoring organize their dashboards around workflow types rather than API call volumes. Each workflow type — code review, document analysis, customer inquiry triage, whatever the use cases are — has its own cost profile: average calls per workflow, average tokens per workflow, P95 and P99 cost outliers, retry rate, and cost trend over time.
Alerts fire on workflow-level anomalies, not call-level ones. If the P95 cost of a specific workflow type spikes, that is an alert. If a workflow type starts showing a higher average call count per run, that is an alert. These signals are actionable. They point to a specific workflow, which means a specific code path, which means a team that owns that code path.
Budget controls operate at the workflow level too. Hard limits on per-workflow cost — not per-call cost — prevent runaway agents from consuming budget unexpectedly. These limits are enforced at the orchestration layer, not at the API level, because API-level limits do not have the context to know when a workflow has exceeded its budget.
Platforms designed for this kind of instrumentation — like Oberhahn — are built to ingest trace-level data from agentic systems and surface it as workflow metrics rather than call aggregations. The distinction matters operationally: a cost management tool that only processes your provider's billing export is working at the wrong level of abstraction for agentic workloads.
The Transition Teams Actually Face
Most engineering teams running agentic systems inherited monitoring infrastructure built for simpler LLM integrations. Retrofitting workflow-level instrumentation onto an existing codebase is not trivial. The orchestration layer needs to be instrumented, which often requires modifying code that spans multiple services. The aggregation infrastructure needs to be built or purchased. The alerting logic needs to be redesigned around workflow metrics.
The case for doing this work is not primarily about cost reduction, though workflow-level visibility does tend to surface optimization opportunities that reduce spend. The primary case is operational control. Agentic AI workloads that are not monitored at the workflow level are fundamentally opaque. You can see what you spent, but you cannot explain why costs are what they are, you cannot detect anomalies before they become budget events, and you cannot optimize spend without degrading quality in ways you cannot measure. That is not a monitoring gap you can tolerate at scale.
Token count per call is not a metric. It is a raw input to a calculation you have not yet done. The calculation you need is cost per workflow, attributed to the action that initiated it. Everything else follows from that.