Skip to main content

System insights performance

Overview

The get_system_insights_performance function provides system-level performance insights and metrics. This endpoint aggregates key performance indicators across your AI agents and conversations. Use this endpoint to:

  • Monitor overall system health and performance
  • Track key performance indicators (KPIs) at scale
  • Generate executive-level performance dashboards

Quick start

query SystemInsightsPerformance(
$accountId: uuid!
$deskIds: _uuid
$brainIds: _uuid
$startDate: timestamp
$endDate: timestamp
) {
rows: get_system_insights_performance(
args: {
account_id: $accountId
desk_ids: $deskIds
brain_parent_ids: $brainIds
start_time: $startDate
end_time: $endDate
}
) {
total_sessions
contained_sessions
covered_sessions
avg_response_time
avg_session_duration
total_handovers
}
}

Variables:

{
"accountId": "991c12a1-cc58-4377-8e37-f72259e9dac1",
"startDate": "2024-01-01",
"endDate": "2024-01-31"
}

Parameters

ParameterTypeDescription
accountIduuid!Account identifier (required)
deskIds_uuidFilter by desk IDs
brainIds_uuidFilter by AI agent IDs
startDatetimestampStart date (format: yyyy-mm-dd)
endDatetimestampEnd date (format: yyyy-mm-dd)
isTestBooleanExclude test sessions

Response fields

FieldTypeDescription
total_sessionsIntTotal number of sessions
contained_sessionsIntSessions fully handled by AI
covered_sessionsIntSessions within AI agent scope
avg_response_timeFloatAverage response time in seconds
avg_session_durationFloatAverage session duration in minutes
total_handoversIntTotal number of handovers to human agents

Common use cases

Try it

Loading GraphQL Playground...

Get monthly system performance:

{
"accountId": "991c12a1-cc58-4377-8e37-f72259e9dac1",
"startDate": "2024-01-01",
"endDate": "2024-01-31"
}

Example response

{
"data": {
"rows": [
{
"total_sessions": 12500,
"contained_sessions": 9875,
"covered_sessions": 11250,
"avg_response_time": 0.85,
"avg_session_duration": 4.2,
"total_handovers": 2625
}
]
}
}