Test Mode
Test mode lets you interact with your voice agent in the terminal using pure text — no phone calls, no STT/TTS, no external services required. It simulates a phone conversation for rapid agent development.Quick Start
Commands
| Command | Description |
|---|---|
/quit | End the test session. |
/hangup | Simulate hanging up the call. |
/transfer <number> | Simulate a call transfer. |
/history | Print the full conversation history. |
Using with on_message
Test mode works with custom message handlers, exactly as they would work in production:
call_control parameter is automatically injected if your handler accepts two arguments.
Using with Built-in LLM Loop
When noon_message handler is provided and OPENAI_API_KEY is available (either from OpenAIRealtime(api_key=...) or the env var), test mode uses the built-in LLM loop with streaming responses:
Event Callbacks
Test mode fires the same lifecycle callbacks asserve():
Test mode is designed for development only. It does not use any external APIs (except OpenAI for the LLM loop when no
on_message is provided).
