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

Agent Stats - AI Usage Tracker

Agent Stats

|
76 installs
| (0) | Free
Track AI coding agent usage, tokens, and costs for Claude Code, OpenAI Codex CLI. Analytics dashboard for AI-assisted development.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Agent Stats - AI Coding Agent Usage Tracker

Track, analyze, and optimize your AI coding assistant usage. Monitor token consumption, costs, and usage patterns across Claude Code, OpenAI Codex CLI, and other AI coding agents.

Website: agentstats.dev

Why Agent Stats?

  • Understand your AI usage: See exactly how many tokens you're consuming per project
  • Track costs: Monitor spending across different AI models and coding sessions
  • Optimize workflows: Identify which projects and tasks use the most AI resources
  • Cloud sync: Access your analytics from anywhere via the web dashboard

Features

  • Multi-Agent Support: Track usage from Claude Code, OpenAI Codex CLI, and more
  • Automatic Detection: Automatically discovers AI agent 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 model pricing
  • Status Bar Integration: Shows today's token usage in the VS Code status bar
  • Cloud Sync: Sync metrics to agentstats.dev for cross-device access
  • Prompt Tracking (Opt-in): Optionally collect and sync your prompts for deeper analysis

Tracked Metrics

  • Input tokens
  • Output tokens
  • Cache creation tokens
  • Cache read tokens
  • Total tokens
  • Cost (USD)
  • Model used
  • Session information
  • Project path
  • Prompts (optional, opt-in)

Supported Agents

Claude Code (Anthropic)

  • 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

OpenAI Codex CLI

  • GPT-4o
  • o1
  • o3-mini
  • o4-mini
  • And other OpenAI models

Data Sources

The extension automatically reads data from:

Claude Code

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

OpenAI Codex CLI

  • Default location: ~/.codex/sessions/

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.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: 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

Cloud Sync & Web Dashboard

AgentStats syncs your metrics to agentstats.dev where you can:

  • View detailed analytics and charts
  • Track usage across multiple devices
  • Analyze trends over time
  • Export your data

To enable cloud sync:

  1. Create an account at agentstats.dev
  2. Get your API key from the settings page
  3. Add your API key in VS Code via AgentStats: Open Settings
  4. Metrics sync automatically every 5 minutes

Prompt Collection (Opt-in)

You can optionally enable prompt collection to sync your conversation content along with usage metrics. This allows for deeper analysis of your AI interactions.

To enable prompt collection:

  1. Visit agentstats.dev/settings
  2. Enable prompt collection in your account settings
  3. Use AgentStats: Force Full Resync to upload prompts for historical data

Prompts are stored securely and are only accessible to you.

Privacy & Data

  • Your usage data is synced to agentstats.dev when you add an API key
  • Prompt collection is opt-in and disabled by default
  • You can request full deletion of your data at any time
  • We never hold data against users' knowledge and never will
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft