# How do I test an AI voice agent before it takes real calls?

> Test a voice agent in three layers: turn tests that assert on a single reply, scripted multi-turn scenarios, and simulated callers played by a language model and judged on the whole call. For a regulated agent, write one test per rule, prove each test fails when the rule is removed, and keep checking live transcripts against the same rules after launch.

Published 2026-12-04 by Workflow Manager (Nanobots Inc.). Canonical: https://workflowmanager.ai/blog/test-ai-voice-agent-before-launch/

## Key facts

- Voice agents vary run to run, so behavior needs repeatable tests and not only manual listening.
- Run turn tests and scripted scenarios on every commit; run simulated callers before each release.
- Write one test per rule, and confirm it fails when the rule is removed.
- Test timing and call-count rules as ordinary code with fixed dates and time zones.
- Debt collectors must keep compliance records until three years after the last collection activity on a debt (12 CFR 1006.100).

## Why can't you test a voice agent like ordinary software?

Ordinary software gives the same output for the same input. A voice agent does not. The same prompt can produce a different sentence on the next run, and a model upgrade or a small prompt edit can quietly remove a line the agent used to say. Listening to a few calls by hand finds some of this, but nobody repeats it on every change.

The answer the open-source frameworks have settled on is to describe a conversation and the behavior you expect, run it against the real agent, and get a pass or a fail. Pipecat's docs put it this way: evals "make agent behavior testable the way unit tests make code testable."

## What kinds of tests are there?

| Kind | What it does | When to run it |
| --- | --- | --- |
| Turn test | Sends one scripted user turn and asserts on the reply or the tool call | Every commit |
| Scripted scenario | Plays a written multi-turn conversation and checks each step | Every commit |
| Simulated caller | Gives a language model a persona and a goal, lets it talk to the agent, and judges the whole call | Before each release, or nightly |

[LiveKit's testing docs](https://docs.livekit.io/testing/unit-tests/) describe turn tests as "deterministic and cheap," fast enough to run in CI on every commit. Its [Agent Simulations](https://docs.livekit.io/testing/simulations/) use "an LLM-driven simulated user that follows a scenario from start to finish," in a text mode and in an audio mode that exercises the whole speech pipeline. [Pipecat Evals](https://docs.pipecat.ai/pipecat/evals/overview) offers the same split: scripted scenarios that can check "an exact phrase, a function call, a latency budget," and simulated scenarios with a persona, a goal and a success criterion.

Use all three. Turn tests catch a missing line at once. Simulated callers find the failures that only appear several turns in, such as an agent that gives the right disclosure and then forgets a stop request two minutes later.

## What should you test before a regulated agent goes live?

Start from the rules, not from the prompt. For each rule the agent must follow, write down the behavior that proves it and the behavior that breaks it. The examples below are for a US debt collection agent. This is a starting list and not legal advice.

| Rule | A passing call | A failing call | Source |
| --- | --- | --- | --- |
| Disclose the purpose on the first call | The agent says it is attempting to collect a debt before any talk of payment | Payment is discussed first, or the line is missing | [15 U.S.C. 1692e(11)](https://www.law.cornell.edu/uscode/text/15/1692e) |
| Identify the caller | An AI-voiced outbound call names the responsible business at the start | The name comes late or not at all | [47 CFR 64.1200(b)(1)](https://www.law.cornell.edu/cfr/text/47/64.1200) |
| Honor "stop calling" | The agent acknowledges, ends the call and no further call is placed | The agent keeps negotiating, or another call goes out | [12 CFR 1006.14(h)](https://www.law.cornell.edu/cfr/text/12/1006.14) |
| Call only at allowed times | No call before 8:00 a.m. or after 9:00 p.m. at the consumer's location | A call placed by the dialer's own clock | [12 CFR 1006.6(b)(1)](https://www.law.cornell.edu/cfr/text/12/1006.6) |
| Respect call frequency | No more than seven calls in seven days per person per debt | An eighth attempt after seven unanswered ones | 12 CFR 1006.14(b)(2) |

The time window and the call counter never reach the language model, so test them as ordinary functions with fixed dates and time zones.

## How do you know the tests themselves work?

A test that cannot fail proves nothing. For every rule, run the test once against an agent with the rule removed and confirm it goes red. If you delete the disclosure from the prompt and the suite still passes, the suite is checking the wrong thing.

Three more habits help:

1. **Fix the wording of required lines.** A disclosure the law requires should be a set sentence, not something the model composes. That also makes the test an exact match and not a judgment call.
2. **Test the hard callers.** Write personas who interrupt, change the subject, speak another language, or ask to stop in unusual words such as "take me off your list."
3. **Run each simulated scenario more than once.** One pass from a system that varies run to run is weak evidence.

## What should you watch after launch?

Passing tests show what the agent does in conversations you thought of. Live calls include the ones you did not. Apply the same rules to every real transcript and flag the calls that break one for a person to review. When a flagged call reveals a new failure, turn it into a scenario so it is tested from then on. LiveKit's docs describe this as deriving a scenario from a recorded session.

Keep the evidence. For debt collectors, [12 CFR 1006.100](https://www.law.cornell.edu/cfr/text/12/1006.100) requires records that show compliance or noncompliance to be kept until three years after the last collection activity on the debt, and call recordings for three years after the call. The FDCPA's bona fide error defense in [15 U.S.C. 1692k(c)](https://www.law.cornell.edu/uscode/text/15/1692k) depends on "the maintenance of procedures reasonably adapted to avoid any such error." A test suite is not a defense by itself, but dated test runs and monitoring results are a written record of the procedures you maintain.

## A short pre-launch checklist

- Every rule the agent must follow is written down, with its source.
- Each rule has one test that passes and one deliberate break that fails.
- Required disclosures are fixed sentences.
- Timing and call-count rules are tested as code, with time zones.
- Simulated callers cover interruptions, stop requests and other languages.
- Live transcripts are checked against the same rules, flagged calls reach a person, and test runs and recordings are kept.

## How Workflow Manager approaches it

Workflow Manager is an agent platform for regulated customer service from Nanobots Inc., currently in private preview by invitation. Its design puts the rules, their tests and the live monitors inside the agent's own definition: an agent names a rule pack, each rule in the pack arrives with its tests, and the same rules check live calls after launch. The first pack covers US collections. An open-source release is planned to follow the preview.

## Questions

### What is a simulated caller?

A language model given a persona and a goal that talks to your agent in place of a person. A judge then decides from the whole conversation whether the agent behaved as expected. Pipecat Evals and LiveKit Agent Simulations both support this.

### How many times should I run each test?

Turn tests with exact assertions can run once per commit. Simulated scenarios vary run to run, so run each several times and treat a single pass as weak evidence.

### Can tests prove my agent is compliant?

No. Tests show the agent follows the rules you wrote down in the conversations you tested. Deciding which rules apply to you is a job for your compliance team and counsel.

### What should I monitor after launch?

Check every live transcript against the same rules the tests use, send flagged calls to a person, and turn each new failure into a scenario so it is tested from then on.

## Sources

- [Pipecat Evals overview (Pipecat docs)](https://docs.pipecat.ai/pipecat/evals/overview)
- [LiveKit docs, unit tests](https://docs.livekit.io/testing/unit-tests/)
- [LiveKit docs, Agent Simulations](https://docs.livekit.io/testing/simulations/)
- [15 U.S.C. 1692e, false or misleading representations (Cornell LII)](https://www.law.cornell.edu/uscode/text/15/1692e)
- [47 CFR 64.1200, delivery restrictions (Cornell LII)](https://www.law.cornell.edu/cfr/text/47/64.1200)
- [12 CFR 1006.14, harassing, oppressive or abusive conduct (Cornell LII)](https://www.law.cornell.edu/cfr/text/12/1006.14)
- [12 CFR 1006.6, communications in connection with debt collection (Cornell LII)](https://www.law.cornell.edu/cfr/text/12/1006.6)
- [12 CFR 1006.100, record retention (Cornell LII)](https://www.law.cornell.edu/cfr/text/12/1006.100)
- [15 U.S.C. 1692k, civil liability (Cornell LII)](https://www.law.cornell.edu/uscode/text/15/1692k)
