AI cost management
The AI cost management report measures AI coding tool spend, token usage, and AI-assisted output across your organization. Use this report to understand where AI investment is going, how usage is trending, and which teams, tools, or contributors are driving cost.
Note: AI cost management requires Data Cloud and at least one supported AI tool data source. Supported sources include Cursor, Claude Code Anthropic Console, Claude Code OTEL, or custom data imported through the aiToolMetrics API.
When to use AI cost management
AI cost management answers the question: How much are teams spending on AI coding tools, and what output is associated with that spend?
This report helps teams:
- Track AI spend and token usage - Monitor total estimated cost and total tokens across connected AI tools over time.
- Compare cost by team, tool, and contributor - Break down spend by team, group, contributor, attribute, or AI tool to identify the largest cost drivers.
- Evaluate AI investment against code output - Compare estimated AI spend with merged PR volume and estimated cost per PR.
- Forecast near-term usage - Project cost and token trends when the selected date range includes today.
What AI cost management measures
The AI cost management report combines AI tool daily metrics, SCM pull request data, and, when enabled, AI Code Insights session data.
The report includes these metrics:
| Metric | Calculation |
|---|---|
| Total est. cost | Sum of daily spend reported by connected AI tool data sources for the selected filters |
| Total tokens | Input tokens + output tokens + cache write tokens + cache read tokens |
| Merged PRs | Count of merged pull requests for the selected filters, excluding bot-authored and deleted PRs |
| Est. cost per PR | Total estimated cost divided by merged PRs |
| Sessions | Count of distinct AI coding sessions started for the selected filters, available when AI Code Insights is on |
| Projected cost | Forecasted spend over the next horizon when Forecast is enabled |
| Projected tokens | Forecasted tokens over the next horizon when Forecast is enabled |
Cost and token data comes from AI tool providers. Merged PR data comes from source code management connectors. Session counts, session summaries, transcripts, and repository-level AI-assisted PR details require AI Code Insights.
Understanding data sources
Some tools may provide only part of the report’s data. The report marks tools as not fully supported when a connected source is missing cost, token, or session data for the selected account.
If no supported data is available, the report prompts an admin to enable a supported AI tool connector or import data through the aiToolMetrics API.
Chart and filters
The main chart shows total estimated cost and total tokens over time. Use the Cost and Tokens toggles to switch the chart view.
The report supports the standard report filters for date range, interval, teams, groups, and attributes. If more than one AI tool is available, use the AI tool filter to narrow the report to specific tools.
Note: Merged PRs, estimated cost per PR, and repository-level AI-assisted PR data are not available when the report is filtered to a subset of AI tools. Pull request data cannot be filtered by AI tool.
Breakdown and drilldown
The breakdown table shows cost, tokens, merged PRs, and estimated cost per PR for the selected aggregation. Use the aggregation control to break down the report by team, group, contributor, attribute, or AI tool.
Click a row to open a drilldown. For team, group, contributor, and attribute rows, the drilldown can show:
- Overview - Cost, tokens, merged PRs, estimated cost per PR, sessions, cost by tool, cost by model, and repositories where AI-assisted code is landing.
- Sessions - AI coding session history for the selected contributor or grouping, available when AI Code Insights and session transcripts are enabled.
Forecasting
Use Forecast to project cost and token usage beyond the selected date range. Forecasting is available only when the selected date range includes today.
Forecasts use ordinary least-squares linear regression fitted on historical intervals and projected forward over a horizon equal to the length of the fitted timeframe. The current in-progress interval is excluded from the fit when it is incomplete, and the chart displays a prediction interval around the projected trend.
Projected values are calculated independently for each row in the breakdown table, so row-level projections may not add up to the projected total.