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

# A/B tests

> Try another prompt, voice or model on some of your real calls and see which works better

An A/B test compares two versions of an agent on real callers: **A** is what callers hear now, **B** is a change you want to try. Each caller hears one of them, and the same number always hears the same one.

## Start one

1. Open the agent → **A/B test** → **New A/B test**.
2. Say what is different in B: another voice, model or first message there, or anything else by editing the agent first. B is the agent's [draft](https://docs.lokutor.com/guides/testing-agents.md#drafts); the dialog lists every difference.
3. Choose what makes it better:

| Goal | A call counts when |
| :- | :- |
| A success rule is met | The rule you wrote in **Analysis** passed |
| A piece of data is collected | The field has a value |
| Solved without a person | It was not transferred |
| The caller stays on the line | It lasted at least the seconds you choose |

A rule or a piece of data can only be the goal while both versions work it out: turn it on in **Analysis** ([After a call](https://docs.lokutor.com/pricing.md#after-a-call)) first.

4. Choose how many callers hear B (10%, 25% or half) and on which calls (all, phone or web), and press **Start**.

The draft becomes B and the editor goes back to what is published. Test calls from the dashboard and numbers set to **Draft** are never part of a test.

## Read it

The page says it in words: **Too early to say**, with about how many more calls are needed, **B is better**, **A is better** or **No real difference**, and under it each version's share of calls that met the goal, average length, transfers and calls under 15 seconds.

You can look as often as you like. The answer is only given when the difference would hold however many times you had looked, so a lucky first day does not pick a winner. Small differences need many calls: telling 40% from 45% takes a few thousand.

## End it

**Use B for everyone** publishes B. **Stop, keep A** changes nothing for callers. Publishing something else in the dashboard while a test runs ends the test first, because it would change A under it. A change made through the [API](https://docs.lokutor.com/api-reference/agents.md) is refused while it runs (`409` `agent.experiment_running`) unless it asks to end the test first. Ended tests and their numbers are kept.

An agent runs one test at a time. Each conversation's metadata says which version it heard: `"experiment": { "id": "…", "variant": "a" }`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.