getAccountRunAnalytics

Return account run analytics.

Arguments

  • commandRunsGetAccountRunAnalyticsCommand!required

  • command.accountIdID

    Account to report; omitted, use the authorized context account or caller default. Requires account.billing.read.

  • command.presetString

    Whole local days, defaulting to 30d. Explicit from/to bounds take precedence over preset, including SDK-supplied defaults.

  • command.fromString

    Inclusive start. Supply both from and to; these bounds take precedence over preset.

  • command.toString

    Exclusive end, no later than the end of today in timezone.

  • command.timezoneString

  • command.granularityString

    UTC hours, or local calendar days, Monday-based weeks and months.

  • command.groupBy[String!]

    Grouping dimensions supported by this operation. Repeat the parameter or use a comma-separated list.

  • command.compareString

    Compare preceding calendar months for whole-month custom ranges, local days for whole-day ranges and presets, or equal elapsed duration otherwise.

  • command.label[String!]

    Project label filters as key or key=value, repeated or comma-separated.

  • command.projectReferenceString

    Optional project UUID or slug to scope analytics to a single project.

Responses

query GetAccountRunAnalytics($command: RunsGetAccountRunAnalyticsCommand!) {  getAccountRunAnalytics(command: $command) {    scope {      kind      accountId      projectId      userId    }    groupBy    summary {      totalRuns      completedRuns      failedRuns      averageDurationMs      p95DurationMs      lastRunAt    }    timeframe {      from      to      timezone      granularity      bucketCount    }    series {      runs      completedRuns      failedRuns      bucketStart    }    statuses {      status      count    }    models {      provider      model      count    }    tools {      name      count    }    projects {      projectId      projectName      projectSlug      count    }    recentRuns {      id      runId      status      projectId      input      output      title      labels      parentRunId      rootRunId      createdAt      updatedAt      startedAt      finishedAt      config      taskId      conversationId      inputMessageId      outputMessageId      batchId      metadata    }  }}
{  "data": {    "getAccountRunAnalytics": {      "scope": {        "kind": {},        "accountId": "string",        "projectId": "string",        "userId": "string"      },      "groupBy": [        "string"      ],      "summary": {        "totalRuns": 0,        "completedRuns": 0,        "failedRuns": 0,        "averageDurationMs": 0,        "p95DurationMs": 0,        "lastRunAt": "string"      },      "timeframe": {        "from": "string",        "to": "string",        "timezone": "string",        "granularity": "string",        "bucketCount": 0      },      "series": [        {          "runs": 0,          "completedRuns": 0,          "failedRuns": 0,          "bucketStart": "string"        }      ],      "statuses": [        {          "status": "string",          "count": 0        }      ],      "models": [        {          "provider": "string",          "model": "string",          "count": 0        }      ],      "tools": [        {          "name": "string",          "count": 0        }      ],      "projects": [        {          "projectId": "string",          "projectName": "string",          "projectSlug": "string",          "count": 0        }      ],      "recentRuns": [        {          "id": "string",          "runId": "string",          "status": "string",          "projectId": "string",          "input": {},          "output": {},          "title": "string",          "labels": {},          "parentRunId": "string",          "rootRunId": "string",          "createdAt": "string",          "updatedAt": "string",          "startedAt": "string",          "finishedAt": "string",          "config": {},          "taskId": "string",          "conversationId": "string",          "inputMessageId": "string",          "outputMessageId": "string",          "batchId": "string",          "metadata": {}        }      ]    }  }}

The RunsAccountAnalytics! in data.getAccountRunAnalytics.