Skip to content

Agent health

Midwater rates each agent from its recent conversations, separately in the test and live environments. Read it with GET /v1/agents/{agent_id}/health, or a whole group with GET /v1/groups/{group_id}/health.

Terminal window
curl "$MIDWATER_BASE_URL/v1/agents/front-desk/health" \
-H "Authorization: Bearer $MIDWATER_API_KEY"
{
"agent_id": "front-desk",
"name": "Front desk",
"environment": "live",
"health_status": "watch",
"reason": "Resolution 81% vs 87% 30-day baseline (−6 pts) since version 3.2.0",
"group": { "id": "brightsmile-dental", "name": "BrightSmile Dental" },
"last_7_days": {
"conversations": 212,
"with_outcome": 180,
"resolution_rate": 0.81,
"handed_to_person_rate": 0.09,
"requests_for_person_not_honored": 2,
"avg_frustration": 0.22,
"compliance_failures": 0
},
"last_30_days": {
"conversations": 905,
"with_outcome": 774,
"resolution_rate": 0.87,
"handed_to_person_rate": 0.08,
"requests_for_person_not_honored": 5,
"avg_frustration": 0.19,
"compliance_failures": 1
}
}
health_status Shown as When
healthy Healthy None of the rules below apply.
watch Watch The 7-day resolution rate is 5 to 10 points below the 30-day rate, or there was at least 1 compliance failure in the last 7 days.
at_risk At risk The 7-day resolution rate is more than 10 points below the 30-day rate, or there were more than 2 compliance failures in the last 7 days.
not_enough_calls Not enough calls yet Fewer than 5 conversations with an outcome in the last 7 days, so nothing is measured yet.

Below 5 conversations with an outcome, one thing still counts: high-severity compliance failures. One in the last 7 days makes the agent watch, two or more at_risk, and the reason names the failure. Otherwise it’s not_enough_calls, with a reason such as “No calls yet” or “Needs 4 more calls with an outcome this week”. The window numbers are still returned; they just don’t set the status.

reason is one sentence saying why. It’s written for people: show it, don’t parse it.

last_7_days and last_30_days are counted in whole days in your workspace’s time zone, by each conversation’s ended_at.

Field
conversations Conversations received.
with_outcome Conversations with an outcome, other than “Not a customer call”. The denominator of the rates.
resolution_rate Share of those that were resolved, 0 to 1, or null with none.
handed_to_person_rate Share handed to a person: a transfer, or a person requested and provided.
requests_for_person_not_honored Conversations where the caller asked for a person and didn’t get one.
avg_frustration Average caller frustration, 0 (calm) to 1 (very frustrated), or null.
compliance_failures Compliance checks that failed.

A group’s health_status is the worst among its active agents, and reason names the agent that set it. A group is not_enough_calls only when every agent is. agents lists each agent with its own status, and the windows are totals across them.

Instead of polling, subscribe to the agent.health_changed and group.health_changed webhooks. They fire when watch or at_risk is the old or the new status; becoming measured as healthy, or going quiet, sends nothing.

Agent IDs use only letters, digits, ., _, : and -, so they go into the URL as they are. Unknown IDs answer 404.