All posts
Production Published 13 min

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.

Jigar JoshiJigar JoshiAgentic AI Architect and Consultant
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.
Agent spend signals by surface (June 2026)
SurfacePrimary spend signalBest for attribution
Copilotai_credits_used in usage metrics APIPer-user day-over-day trend
Claude API (prod)Platform API usage by key / projectPer-environment machine spend
Claude subscriptionSeat + Agent SDK credit poolHuman vs headless split audit
Cursor teamTeam usage exports + per-seat limitsPer-developer background agent burn
Custom agentsOpenTelemetry cost dimension on tracesCost per completed task by workflow

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.

  1. 01
    Ingest Copilot ai_credits_used daily
    Extend your existing Copilot usage metrics ETL. Store user, org, date, ai_credits_used. Join to HR or GitHub team rosters for squad rollups.
  2. 02
    Ingest Claude API by key and project
    Separate keys per environment. Tag keys in your secret manager with cost_center. Never share prod keys with developer experimentation seats.
  3. 03
    Pull Cursor team usage on the same schedule
    Align 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.
  4. 04
    Add cost per completed task from agent traces
    From the agent observability stack, divide attributed spend by successful task completions per workflow ID. That is the metric that survives model routing changes.
  5. 05
    Alert on user and workflow anomalies
    Day-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/.

The weekly take

Agentic AI patterns, delivered Thursdays

What I am shipping, watching, and pruning out of client stacks each week. One email. No fluff.

Shipping an agentic AI project this quarter?
Book a 30-min consult
Frequently asked

Questions readers ask about this post

Share this post
LinkedIn Facebook