Test your voice agents the way we test ours
The simulation engine we run before every model release is in the Guava SDKs: roleplay tests, pass and fail checks, mock calls and search fields for scheduling, all in your own test suite.

Before we ship a change to our models, we run our agents through a simulation engine. It exercises thousands of simulated use cases and conversations, so we find what broke before a customer hears it.
That same engine is in the Guava Python and TypeScript SDKs. The testing tools have shipped in stages since June, and this post walks through how they fit together. The short version: your agent tests are ordinary code. They live next to the rest of your code and run in the unit test framework and CI you already use, not in a separate dashboard.
Start with one handler
The smallest test checks one handler. Build a MockCall, pass it to the handler, and assert on what comes back. It runs with pytest or unittest, and no phone call is involved.
Let a simulated caller run the conversation
agent.roleplay() runs your agent against a simulated caller that improvises from a prompt you write. Your real handlers run, just as they would on a call. You get back a session with the transcript, the actions the agent took and why the call ended.
session = agent.roleplay("You are a caller who wants to buy a new dining table.")
session.evaluate(
pass_criteria=["The agent identified itself as working for Clearfield Home & Living."],
fail_criteria=["The agent directly offered to search the inventory."],
)
assert "sales" in session.executed_actionssession.evaluate() checks the conversation against criteria written in plain language: what must be true, and what must never happen.
Change one thing for a test
agent.patch() makes a copy of your agent with a handler swapped out, so you can test what happens when, say, the sales team is closed, without touching the live agent.
Script it turn by turn
When you need exact control, agent.test() lets you inject caller lines and wait for each turn. In Python you can also feed in pre-recorded caller audio and capture what the agent says.
Search fields make scheduling easier
Scheduling is one of the most common things a voice agent does, and the open slots change all day. Search fields are built for it. Mark a calendar_slot field searchable=True and register a search handler. When a caller asks for a time, the agent calls your handler with the request in plain language, and you return matching open slots from your own booking system, plus a fallback list if nothing fits.
The same approach works for any long or changing list, such as locations. And because the lookup is ordinary code, you can unit test it, and roleplay tests exercise it on a full conversation.
Get started
The testing guide has full examples in Python and TypeScript, and the Guava docs cover the rest. To talk through your setup, talk to us.
Don't fly blind. Build and validate voice agents in one platform.


