One agent spend dashboard for Cursor, Claude Code, and Copilot: what Copilot's ai_credits_used field unlocks
GitHub added ai_credits_used to the Copilot usage metrics API on June 19. It is a per-user total, not yet split by feature or model, but it closes a gap I have been papering over with spreadsheets. Here is how I unify Copilot credits with Claude API keys and Cursor team usage into one attributable spend view.
In this post (6 sections)
Introduction
Every enterprise conversation about agentic AI eventually arrives at the same awkward slide: three vendor dashboards, one finance question, no owner. Cursor bills the team. Claude splits subscription seats from API keys from Agent SDK credits (June 15 checklist). Copilot until recently showed seat counts without a clean per-user credit signal in the metrics API you already poll.
GitHub's June 19 changelog fixed one slice of that. ai_credits_used on user-level Copilot usage metrics reports is not an invoice line, but it is the first field I can join to internal team rosters the same way I join Claude API org usage. This post is the wiring diagram I use on engagements where engineering leads need attributable spend before finance mandates a single tool.
What ai_credits_used gives you (and what it does not)
- Available on enterprise and org scope, single-day and 28-day user reports.
- Per-user total credit consumption derived from usage-based billing data.
- Not split by Copilot Chat vs agent vs model (yet). Treat as directional burn.
- Metrics signal, not a billing substitute. Reconcile with invoices monthly.
- Complements seat-based licensing; does not replace API key isolation for prod agents.
The unified dashboard layout I ship
One page, three layers. Finance sees monthly totals by vendor. Engineering managers see weekly per-user trends inside their org. Platform team sees cost per completed task for automated workflows. Without the third layer you optimize the wrong number.
- 01Ingest Copilot ai_credits_used dailyExtend your existing Copilot usage metrics ETL. Store user, org, date, ai_credits_used. Join to HR or GitHub team rosters for squad rollups.
- 02Ingest Claude API by key and projectSeparate keys per environment. Tag keys in your secret manager with cost_center. Never share prod keys with developer experimentation seats.
- 03Pull Cursor team usage on the same scheduleAlign timezone and cadence so week-over-week charts compare the same boundaries. Cursor background and cloud automations belong in the same row as Copilot agent spikes.
- 04Add cost per completed task from agent tracesFrom the agent observability stack, divide attributed spend by successful task completions per workflow ID. That is the metric that survives model routing changes.
- 05Alert on user and workflow anomaliesDay-over-day ai_credits_used up 3x for one user warrants a Slack ping, not a monthly review. Same for a cron workflow whose cost per task doubled after a model swap.
Human seats vs machine keys (still the rule)
Unified dashboards do not mean unified auth. Interactive developers can stay on subscription seats. Production cron, CI agents, and shared services stay on API keys with budgets. Copilot enterprise policies plus Claude Platform keys plus Cursor API billing should appear as separate series on the same chart, not blended into "AI spend" mush.
When Anthropic revisits the Agent SDK billing split paused on June 15, your dashboard should already show which workloads still authenticate as seats. Migration becomes a data cutover, not an archaeology project.
Common mistakes building agent spend views
- Equating ai_credits_used with invoice dollars without reconciliation.
- Ignoring Cursor cloud automations because they are "not Copilot."
- Optimizing token spend instead of cost per completed task.
- Letting prod agents share a developer Max subscription because the dashboard lagged.
- No alert thresholds until finance escalates.
Conclusion
Copilot ai_credits_used is a small API field with an outsized governance payoff. It lets you put Copilot on the same weekly review slide as Claude API keys and Cursor team burn without pretending the vendors agree on semantics. Build the unified dashboard now, while model deprecations and billing splits are still noisy. Finance will ask for it anyway.
Sources: GitHub changelog June 19, 2026 ai_credits_used in Copilot usage metrics API at https://github.blog/changelog/2026-06-19-ai-credits-consumed-per-user-now-in-the-copilot-usage-metrics-api/.
Agentic AI patterns, delivered Thursdays
What I am shipping, watching, and pruning out of client stacks each week. One email. No fluff.