Agents performance (advanced)
Overview
The get_agents_performance function provides advanced human agent performance metrics with detailed response time breakdowns. Use this endpoint to:
- Analyze detailed response time distributions
- Track agent efficiency metrics
- Generate comprehensive performance reports
Quick start
query GetAgentsPerformance(
$deskIds: _uuid
$brainIds: _uuid
$integrationIds: _uuid
$agentIds: _text
$startDate: timestamp
$endDate: timestamp
$isTest: Boolean
) {
rows: get_agents_performance(
args: {
desk_ids: $deskIds
brain_parent_ids: $brainIds
integration_ids: $integrationIds
agent_ids: $agentIds
start_time: $startDate
end_time: $endDate
is_test: $isTest
}
) {
agent_id
agent_name
avg_response_time
avg_first_response_time
median_response_time
median_first_response_time
max_response_time
min_response_time
avg_close_time
closed_conversations
participated_sessions
replies
}
}
Variables:
{
"deskIds": "{d2be0283-9b53-4d7b-b77d-2650f3a1a99c}",
"startDate": "2024-01-08",
"endDate": "2024-01-17"
}
Parameters
| Parameter | Type | Description |
|---|---|---|
deskIds | _uuid | Filter by desk IDs |
brainIds | _uuid | Filter by AI agent IDs |
integrationIds | _uuid | Filter by integration IDs |
agentIds | _text | Filter by human agent IDs |
startDate | timestamp | Start date (format: yyyy-mm-dd) |
endDate | timestamp | End date (format: yyyy-mm-dd) |
isTest | Boolean | Exclude test sessions |
Response fields
| Field | Type | Description |
|---|---|---|
agent_id | uuid | Human agent identifier |
agent_name | String | Agent display name |
avg_response_time | Float | Average response time (minutes) |
avg_first_response_time | Float | Average first response time |
median_response_time | Float | Median response time |
median_first_response_time | Float | Median first response time |
max_response_time | Float | Maximum response time |
min_response_time | Float | Minimum response time |
avg_close_time | Float | Average time to close |
closed_conversations | Int | Conversations closed by agent |
participated_sessions | Int | Sessions agent participated in |
replies | Int | Total replies sent |
Common use cases
Try it
Loading GraphQL Playground...
- Team performance
- Specific agent
- Production only
Get performance for all agents:
{
"deskIds": "{d2be0283-9b53-4d7b-b77d-2650f3a1a99c}",
"startDate": "2024-01-08",
"endDate": "2024-01-17"
}
Get performance for a specific agent:
{
"deskIds": "{d2be0283-9b53-4d7b-b77d-2650f3a1a99c}",
"agentIds": "{1b28b8ba-c9de-42ac-94ad-564e0c6858c9}",
"startDate": "2024-01-08",
"endDate": "2024-01-17"
}
Exclude test sessions:
{
"deskIds": "{d2be0283-9b53-4d7b-b77d-2650f3a1a99c}",
"isTest": false,
"startDate": "2024-01-08",
"endDate": "2024-01-17"
}
Example response
{
"data": {
"rows": [
{
"agent_id": "1b28b8ba-c9de-42ac-94ad-564e0c6858c9",
"agent_name": "John Doe",
"avg_response_time": 2.45,
"avg_first_response_time": 3.12,
"median_response_time": 1.85,
"median_first_response_time": 2.45,
"max_response_time": 15.5,
"min_response_time": 0.25,
"avg_close_time": 8.5,
"closed_conversations": 132,
"participated_sessions": 145,
"replies": 580
}
]
}
}