AI Companion Metrics

AI Companion metrics measure how developers interact with AI assistants, the impact on productivity, and the adoption of AI tools in your organization.

Available Metrics

ai-companion-chat-accepted-lines
string

Lines accepted from AI suggestions

ai-companion-chat-suggested-lines
string

Lines suggested by AI

ai-companion-requests
string

Number of AI companion requests

ai-companion-most-used-model
string

Most used AI model

ai-companion-most-used-programming-language
string

Most used programming language with AI

ai-companion-adopted-users
string

Number of users who adopted AI companion

ai-companion-productivity-score-boost
string

Productivity boost from AI companion

ai-companion-productivity-score
string

Productivity score with AI companion

ai-companion-productivity-score-boost-percentage
string

Percentage productivity boost from AI

AI Companion Requests Metric

This endpoint provides data on the number of AI companion requests.

curl -X POST 'https://api.bilanc.co/metrics/v2/ai-companion-requests' \
  -H 'Authorization: Bearer YOUR_AUTH_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "filters": {
      "team_id": "team123",
      "start_date": "2023-01-01",
      "end_date": "2023-12-31"
    },
    "group_by": ["user_name"],
    "date_level": "month",
    "date_field": "created_at",
    "time_series_data": true
  }'

AI Companion Suggested vs Accepted Lines

This endpoint provides data on suggested lines vs. accepted lines from AI.

curl -X POST 'https://api.bilanc.co/metrics/v2/get-multiple-metrics' \
  -H 'Authorization: Bearer YOUR_AUTH_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "filters": {
      "team_id": "team123",
      "start_date": "2023-01-01",
      "end_date": "2023-12-31"
    },
    "group_by": [],
    "date_level": "month",
    "metrics": ["ai-companion-chat-suggested-lines", "ai-companion-chat-accepted-lines"],
    "date_fields": {
      "ai-companion-chat-suggested-lines": "created_at",
      "ai-companion-chat-accepted-lines": "created_at"
    },
    "aggregations": {
      "ai-companion-chat-suggested-lines": "sum",
      "ai-companion-chat-accepted-lines": "sum"
    },
    "time_series_data": true
  }'

AI Companion Productivity Score Boost

This endpoint provides data on productivity boost from AI usage.

curl -X POST 'https://api.bilanc.co/metrics/v2/ai-companion-productivity-score-boost-percentage' \
  -H 'Authorization: Bearer YOUR_AUTH_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "filters": {
      "team_id": "team123",
      "start_date": "2023-01-01",
      "end_date": "2023-12-31"
    },
    "group_by": ["user_name"],
    "date_level": "quarter",
    "aggregation": "avg",
    "date_field": "created_at"
  }'

Most Used Programming Language with AI

This endpoint provides data on the most used programming languages with AI.

curl -X POST 'https://api.bilanc.co/metrics/v2/ai-companion-most-used-programming-language' \
  -H 'Authorization: Bearer YOUR_AUTH_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "filters": {
      "team_id": "team123",
      "start_date": "2023-01-01",
      "end_date": "2023-12-31"
    },
    "group_by": [],
    "date_level": "total",
    "aggregation": "count",
    "date_field": "created_at"
  }'

Parameter Notes

date_field
string

For AI companion metrics, the following date fields are available:

  • created_at: When the AI interaction occurred
  • accepted_at: When the AI suggestion was accepted
aggregation
string

Different aggregation methods are appropriate for different AI metrics:

  • For requests/lines count: sum or count
  • For productivity scores: avg or median
  • For adoption metrics: count or distinct_count

Common Use Cases

  • Adoption Monitoring: Track AI tool adoption across teams and users
  • Productivity Analysis: Measure productivity improvements from AI usage
  • User Behavior: Understand how developers interact with AI tools
  • ROI Calculation: Quantify the business value of AI investments
  • Technology Insights: Identify which programming languages benefit most from AI
  • Training Needs: Determine where additional AI training may be beneficial based on acceptance rates