Skip to main content
GET
/
agent-tasks
/
analytics
Get Agent Analytics
curl --request GET \
  --url https://api.beamstudio.ai/agent-tasks/analytics \
  --header 'Authorization: Bearer <token>' \
  --header 'current-workspace-id: <current-workspace-id>'
{
  "currentPeriod": {
    "totalTasks": 150,
    "completedTasks": 135,
    "failedTasks": 15,
    "averageEvaluationScore": 87.5,
    "averageRuntimeSeconds": 45.7,
    "totalRuntimeSeconds": 6855,
    "positiveFeedbackCount": 120,
    "consentRequiredCount": 25,
    "negativeFeedbackCount": 10
  },
  "metricsDelta": {
    "totalTasksDelta": "+15.5%",
    "completedTasksDelta": "+12.3%",
    "failedTasksDelta": "-5.2%",
    "consentRequiredTasksDelta": "+3.1%",
    "averageRuntimeSecondsDelta": "-8.7%",
    "totalRuntimeSecondsDelta": "+10.2%",
    "averageEvaluationScoreDelta": "+4.5%"
  },
  "taskAndEvaluationChart": [
    {
      "date": "2024-01-15",
      "completedCount": 42,
      "failedCount": 8,
      "averageEvaluationScore": 87.5
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

current-workspace-id
string
required

Query Parameters

startDate
string<date-time>
required

The start date for the analytics period. The date will be normalized to the beginning of the day (00:00:00) in the provided timezone. Used to filter task execution data for analytics calculation.

Example:

"2024-01-01T00:00:00Z"

endDate
string<date-time>
required

The end date for the analytics period. The date will be normalized to the end of the day (23:59:59) in the provided timezone. Analytics will include all tasks executed between startDate and endDate inclusive.

Example:

"2024-01-31T23:59:59Z"

agentId
string<uuid>
required

The unique identifier of the agent to retrieve analytics for. Analytics will be calculated only for tasks executed by this specific agent during the specified date range.

Example:

"123e4567-e89b-12d3-a456-426614174000"

Response

200 - application/json

Analytics data retrieved successfully

currentPeriod
object
required

Performance metrics for the requested analytics period including task counts, success rates, runtime statistics, and user feedback

metricsDelta
object
required

Percentage changes in key metrics compared to the previous period of the same length. Shows growth or decline trends across all tracked metrics.

taskAndEvaluationChart
object[]
required

Time-series data for visualizing task completion trends and evaluation scores over the analytics period. Each element represents a day in the date range.