Compare agents with groups
From two agents to a decision: split the traffic, read who's ahead, move the traffic to the winner.
You need two agents with a deployed version, and groups enabled on your team.
Create the group
Groups → New group. Name it, add your agents under Agents // traffic split, and set a weight for each — the form shows the resulting split as you type. Start even, unless you want to limit how many callers see the new agent.
Under Call routing, use Same agent to keep repeat callers on the same variant while the split stays the same.
Under Measured on every call, leave Overall performance on and add any
metric you want to compare — a yes/no payment_promised, for example.
Point calls at the group
On a phone number, a campaign, or Place call, change the target from agent to group. Only groups with at least one agent that can take calls appear.
curl -X PATCH https://api.kejue.co/v1/phone-numbers/PHONE_NUMBER_ID \
-H "Authorization: Bearer kejue_<prefix>_<secret>" \
-H "Content-Type: application/json" \
-H 'If-Match: "PHONE_NUMBER_ETAG"' \
--data '{"group_id": "GROUP_ID"}'Over the API: PATCH /v1/phone-numbers/{id}.
For a campaign, set group_id while it's a draft or paused. Each recipient is
assigned one agent and keeps it on every retry.
Read the results
Open the group's Results tab and pick 7, 30, or 90 days. Every chart has one series per agent, labelled A, B, C. There's no board to build.
Wait for at least 30 calls per agent before you act on a verdict.
Shift the traffic
Change the weights in the group's settings. The change applies to the next call and is marked on the charts.
- Pick a winner — winner to 100, others to 0. Their history stays.
- Finish up — point the number or campaign straight at the winning agent, then archive the group.
Reading the results
Every number comes with a 95% range and a verdict:
| Verdict | What it means |
|---|---|
| B is ahead, 97% confident | The difference is bigger than chance would explain |
| No clear difference | They may differ, but these calls don't show it |
| Not enough calls yet | At least one agent has fewer than 30 calls. Keep going |
The range is where the true value most likely sits. When two ranges overlap a lot, treat the agents as equal — small differences need a lot of calls to show up, and acting on a 2% gap with 40 calls is reading noise.
GET /v1/groups/{id}/results returns the same numbers, ranges, and verdicts.
Call metrics
Computed from every call, at no extra cost:
| Metric | What it measures |
|---|---|
| Calls | How many each agent handled |
| Answer rate | Share of outbound calls the callee answered |
| Average call length | Mean duration. Neither direction is better, so this never names a leader |
| Transferred | Share of connected calls transferred out |
| Agent errors | Share of calls that failed because of the agent. A number that never answers doesn't count |
| Hung up within 10s | Share of connected calls that didn't last ten seconds |
| Tool call failures | Share of the agent's tool calls that failed |
| Median response time | Typical time from the caller finishing to the agent replying |
"Hung up within 10 seconds" is often the most revealing one — it's the metric that catches an opener people don't want to listen to.
Overall performance
With this on, we review every group call and record an overall score (1 to 10, against the agent's own goal) and an outcome (achieved, partial, not achieved, or escalated).
Your own metrics
A group metric is a name, a type, and a description of what to look for in the transcript:
| Type | Charted as |
|---|---|
| number | Average per agent — an amount, say |
| integer | Average per agent — a 1–5 rating |
| yes / no | Percentage of calls that were yes |
| options | Distribution across a fixed list of 2–20 options |
These are extracted on top of whatever the agent already extracts, so your agents' own extraction objects are untouched.
Overall performance and group metrics each add a small model call per conversation, billed like any other extraction.
Trends and changes
Calls per day and Overall score per day show one line per agent, and Changes in this range lists every weight and member change — so when a line moves, you can see whether you moved it.
Before you start
- Compare one difference at a time. If two agents differ in prompt and model, the result can't tell you which one mattered.
- Keep them on the same numbers or campaign for the whole comparison.
- Deploying a new version of a member changes that agent mid-comparison. Each call records which version answered, but your averages now mix two things.
- Test each agent on its own first. Browser and test calls don't go through groups, so a group isn't where you find out an agent is broken.