AI Sessions

Audience: Customer — this page documents the AI sessions page and session details.

The AI Sessions page (/dashboard/ai) provides comprehensive analytics for AI-assisted development activity.


URL

/dashboard/ai

Access

Pro and Enterprise only. Feature gate: sessions_page.

Wrapped in <FeatureGate featureKey="sessions_page">.


Data Source

GET /api/v1/ai/analytics?period={period}

Returns AnalyticsData containing summary metrics, daily stats, model breakdowns, tool usage, project stats, file stats, language stats, and violation impact.


Primary Stats (Top Row)

Five headline cards:

Card Metric Color
AI Sessions totalSessions Purple
Total Tokens totalTokens Blue
AI Cost totalCost Yellow
Est. Loss from Violations violations.estimatedLoss Red (highlighted card)
Active Time totalActiveTimeMs Green

Rule Violations Impact

Displayed when violations exist. A bordered card showing:

Metric Description
Critical Errors Count with "~9 min fix" estimate
Warnings Count with "~5 min fix" estimate
Info Count with "~2 min fix" estimate
Total Impact Estimated monetary loss + correction percentage

Cost is calculated from per-rule fix time estimates at the user's hourly rate.


Token Breakdown

Two cards showing:

Card Metric
Input Tokens totalInputTokens
Output Tokens totalOutputTokens

Productivity Metrics

Three cards:

Card Metric Description
Tokens/min tokensPerMinute Token throughput
Lines/hour linesPerHour Code output rate
Cost/line costPerLine Cost efficiency

Code & Tool Stats

Five cards:

Card Metric Color
Lines Added totalLinesAdded Green (+)
Lines Removed totalLinesRemoved Red (-)
Acceptance codeAcceptanceRate (%) Green
Tool Calls totalToolCalls + toolSuccessRate Neutral
Errors totalErrors + errorRecoveryRate Red count

Conversation Stats

Three cards:

Card Metric Description
Conv. Turns totalTurns Total conversation turns
User Intervention userInterventionRate (%) How often users had to correct the AI
Net Lines netLinesChanged Lines added minus lines removed

Daily Activity Chart

Bar chart showing requests per day over the selected period. Purple bars. X-axis shows dates (MM-DD format).


Daily Cost Chart

Bar chart showing AI cost per day. Yellow bars. Hover tooltip shows formatted cost.


Model Usage Table

List of AI models used:

Column Description
Model Model name (e.g., claude-opus-4-6)
Requests Number of API requests
Cost Total cost for that model
Tokens Total tokens consumed

Tool Usage Table

Top 8 most-used tools:

Column Description
Tool Tool name (Read, Write, Edit, Bash, etc.)
Calls Number of invocations
Success Rate Percentage of successful calls (color-coded: green ≥90%, yellow ≥70%, red <70%)
Avg Duration Average execution time in milliseconds

Top Modified Files

Top 8 files by modification frequency:

Column Description
File Filename (last path segment)
Lines Added Green (+N)
Lines Removed Red (-N)
Cost AI cost attributed to that file

Cost by Language

Top 8 programming languages by cost:

Column Description
Language Programming language
Lines Added Green (+N)
Lines Removed Red (-N)
Cost Total AI cost for that language

Project Breakdown

Table showing per-project statistics (when multiple projects are tracked):

Column Description
Project Project name
Sessions Number of AI sessions
Requests Total API requests
Active Time Formatted duration
Lines Added Green (+N)
Cost Total AI cost

See Also