Skip to content
| Marketplace
Sign in
Visual Studio Code>Visualization>Agent Stats - AI Usage TrackerNew to Visual Studio Code? Get it now.
Agent Stats - AI Usage Tracker

Agent Stats - AI Usage Tracker

Agent Stats

|
3 installs
| (0) | Free
Track and analyze your Claude Code AI usage metrics, including tokens, models, and session data
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Agent Stats - AI Usage Tracker

A VS Code extension for tracking and analyzing your Claude Code AI usage metrics, similar to WakaTime but for AI.

Website: agentstats.dev

Features

  • Automatic Detection: Automatically discovers Claude Code JSONL data files from default locations
  • Real-time Tracking: Monitors AI usage and updates metrics every 5-10 minutes
  • Cost Calculation: Calculates costs based on current Claude model pricing (Opus, Sonnet, Haiku)
  • Status Bar Integration: Shows today's cost and token usage in the VS Code status bar
  • Detailed Statistics: View usage by model, session, day, week, and month
  • Auto-Export: Automatically exports metrics to JSON after collecting a configurable number of activities
  • Dashboard: Interactive webview dashboard with comprehensive statistics

Tracked Metrics

  • Input tokens
  • Output tokens
  • Cache creation tokens
  • Cache read tokens
  • Total tokens
  • Cost (USD)
  • Model used
  • Session information
  • Project path

Data Sources

The extension reads Claude Code JSONL files from:

  1. New location (Claude Code >= v1.0.30): ~/.config/claude/projects/
  2. Legacy location: ~/.claude/projects/

You can also configure custom paths in settings.

Configuration

Setting Default Description
agentStats.claudeDataPaths [] Custom paths to Claude Code data directories
agentStats.refreshIntervalMinutes 5 How often to refresh metrics (1-60 minutes)
agentStats.showStatusBar true Show statistics in status bar
agentStats.statusBarDisplayMode "both" What to display: "tokens", "requests", or "both"
agentStats.historicalDataDays 30 Days of historical data to load (max 365)
agentStats.apiKey "" Your AgentStats API key from agentstats.dev
agentStats.syncIntervalMinutes 5 How often to sync metrics to the cloud (1-60 minutes)

Commands

  • AgentStats: Show Dashboard - Open the metrics dashboard
  • AgentStats: Refresh Metrics Now - Force refresh metrics
  • AgentStats: Configure Claude Data Path - Set custom data directory
  • AgentStats: Show Today's Statistics - Quick view of today's usage
  • AgentStats: Open Settings - Open extension settings panel
  • AgentStats: Sync to Cloud Now - Manually sync metrics to agentstats.dev
  • AgentStats: Force Full Resync - Resync all historical data with prompts

Supported Models

  • Claude Opus 4.5
  • Claude Sonnet 4
  • Claude 3.5 Sonnet (v1 & v2)
  • Claude 3.5 Haiku
  • Claude 3 Opus
  • Claude 3 Sonnet
  • Claude 3 Haiku

Cloud Sync

AgentStats can optionally sync your metrics to agentstats.dev for:

  • Cross-device tracking
  • Long-term analytics
  • Web dashboard access

To enable cloud sync:

  1. Get an API key from agentstats.dev
  2. Set agentStats.apiKey in settings
  3. Metrics sync automatically every 5 minutes

License

MIT

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft