Cost per workflow is the most actionable AI cost metric for engineering and operations teams. Here is how to calculate it and what to do with the number.

What Cost per Workflow Means

Cost per workflow is the total AI spend attributed to a specific workflow type divided by the number of completed tasks in that workflow. It is the normalized cost efficiency metric that makes AI costs comparable across workflows with different session volumes. A workflow that costs $0.08 per completion is more efficient than one costing $0.40 per completion, regardless of how many sessions each runs.

Why It Is More Useful Than Total Spend

Total spend by workflow tells you where money is going but not whether it is going there efficiently. A high-volume workflow with a low cost per completion may have a large total spend that is completely appropriate. A low-volume workflow with an extremely high cost per completion may represent a problem that the total spend number obscures. Cost per workflow normalizes for volume and makes the efficiency question answerable.

How to Calculate It

Cost per workflow requires two data points: total session cost attributed to a workflow type, and total completed tasks of that type in the same period. Session cost data requires application-layer instrumentation that tags each session with its workflow type. Task completion data comes from your application's business logic. Connecting these two data sources is the instrumentation work that most teams have not yet done.

Tracking Cost per Workflow Over Time

A cost per workflow trend that is declining means your agents are becoming more efficient — better prompts, better model routing, or improved success condition evaluation. A trend that is rising means something has changed that is making the workflow more expensive per output. Identifying that change early, before it compounds, requires the trend data that only session-level attribution provides.

Using Cost per Workflow for Prioritization

When you have cost per workflow data across your full portfolio of AI agent deployments, you can prioritize optimization effort rationally. The highest-volume workflows with above-average cost per completion have the largest optimization opportunity in absolute dollar terms. The workflows with the fastest-rising cost per completion have the most urgent operational risk. Both answers come from the same underlying data.

Oberhahn provides enterprise teams with complete AI agent observability: session tracking, cost attribution, anomaly detection, and organizational reporting.

See how Oberhahn works