Skip to main content
Once your sessions land on LangWatch (see Track your Claude Code usage), the same CLI that captured them can read them back. That means your own coding agent can answer questions about your usage: no API key to paste, no dashboard clicking, just the langwatch CLI it already has.

One-time setup

langwatch login opens a browser sign-in. Approve it once and the CLI works with your personal account from then on: when no API key is set (no --api-key flag, no LANGWATCH_API_KEY in the environment or .env), every command falls back to your device login and resolves your personal project by itself. langwatch whoami shows who you are logged in as.

The prompt

Paste this into Claude Code (or Cursor, Codex, or any coding agent with shell access):
The same prompt is one click away in the app: on /me, once your account has traces, Connect your agent offers Explore via your coding agent, which copies it to your clipboard.

Questions your agent can answer

Once the prompt is in, ask in plain language. Some that pay for themselves:
  • Where did my tokens go this week?
  • Which sessions were the most expensive?
  • What share of my usage ran above 150k context, and what should I do about it? (The usual fixes: /compact mid-task, /clear between tasks.)
  • How much usage came from sessions active 8+ hours, or from 4+ sessions running in parallel?
  • Which subagents consumed the most, and would a cheaper model fit the simple ones?
  • Which skills did I use the most?
  • How much of my usage came from MCP tool results staying in context?
The agent reads the same traces you see on /me and /traces, so every answer can cite the sessions behind it.