Skip to contentSkip to page list

Docs

Coding Agent Usage Analytics and Cost

Spend, tokens and activity for your coding agents, on your personal page, over the command line, and over the API.

On this page

Usage rolls up everything your sessions spent. Read your own numbers at /coding-agents, a project's numbers on the project page, and an organization's numbers on the governance dashboard.

Your usage at /coding-agents

The personal page opens on this month: what you spent, how many requests you made, and the model you used most, with spend over time and a breakdown by tool underneath.

The coding-agent usage card summarizes the last 30 days across your assistants: cost, tokens, active time, and how many sessions you ran. Sessions that reported only metrics still count, so the card is complete even for tools set up with usage-only telemetry.

Query it from the command line

The CLI reads the same analytics your pages read:

example.shBash
langwatch analytics query -m total-cost --group-by metadata.model   # spend per modellangwatch trace search --period 7d                                   # recent traceslangwatch trace export -f jsonl                                      # bulk export for your own analysis

You do not have to type these yourself: give your agent the prompt and ask your questions in plain language.

Query it over the API

GET /api/me/usage returns your personal rollup: a summary, daily buckets, and a per-model breakdown. The two coding-agent endpoints return the structured data behind the sessions and pull request views:

  • GET /api/coding-agent/sessions/{sessionId}/events for per-call rows: model calls, compactions, rate limits, tool runs.
  • GET /api/coding-agent/pull-request-usage for the per-pull-request rollup.

See the coding agents API reference.

For admins

The Teams page at /governance/teams lists every team's spend and requests over the last 30 days. Governance > People at /governance/people ranks each person by spend, and a person's row opens their page, personal AI use included. To count spend by cost center, assign people, teams and projects to departments on People.

Also check: Sessions for the per-session detail behind these rollups, and Compare provider costs to price your real usage mix against other providers.

Documentation