> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stateset.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Per-agent volume, AI vs human handling, and human-handled rate

> Per-agent response counts for the window, for up to 25 agents.

### Query parameters

<ParamField query="days" type="integer" />

### Response

`object`

<ResponseField name="object" type="string" required />

<ResponseField name="period_days" type="integer" required>
  The `days` window the counts cover.
</ResponseField>

<ResponseField name="agents" type="object[]" required>
  <Expandable title="agents">
    <ResponseField name="object" type="string" required />

    <ResponseField name="agent_id" type="string (uuid)" required />

    <ResponseField name="name" type="string,null" required />

    <ResponseField name="activated" type="boolean" required />

    <ResponseField name="total" type="integer" required>
      Responses by this agent in the window.
    </ResponseField>

    <ResponseField name="ai_handled" type="integer" required>
      `total` minus `human_handled`.
    </ResponseField>

    <ResponseField name="human_handled" type="integer" required>
      Responses where a human took over.
    </ResponseField>

    <ResponseField name="human_handled_rate" type="number,null" required>
      `human_handled / total` to four decimals; null (not 0) when `total` is 0, so 'no traffic' is not mistaken for 'perfect'.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="truncated" type="boolean" required>
  True when the org has more than 25 agents and only the first 25 are reported.
</ResponseField>

### Status codes

| Code  | Meaning                                                        |
| ----- | -------------------------------------------------------------- |
| `200` | Per-agent response counts for the window, for up to 25 agents. |
| `401` | Missing, invalid, or expired API key.                          |
| `403` | The key lacks a required scope.                                |
| `429` | Rate limit exceeded.                                           |

### Access

|                |                         |
| -------------- | ----------------------- |
| Required scope | `analytics:read`        |
| Rate limit     | 120 requests per minute |

<RequestExample>
  ```bash cURL theme={null}
  curl --request GET \
    --url 'https://response.stateset.com/api/v1/analytics/agents' \
    --header "Authorization: Bearer $RESPONSECX_API_KEY"
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "object": "analytics.agents",
    "period_days": 1,
    "agents": [
      {
        "object": "analytics.agent",
        "agent_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
        "name": "Two-Person Tent",
        "activated": true,
        "total": 102,
        "ai_handled": 1,
        "human_handled": 1,
        "human_handled_rate": 7.5
      }
    ],
    "truncated": true
  }
  ```
</ResponseExample>
