Development
The VoiceRun CLI includes tools for interactive debugging and testing your voice agents locally.
Debugging#
Start an interactive debug session with your agent:
vr debug
This pushes your code and opens a real-time WebSocket connection to the debug server. You can interact with your agent through text input or microphone audio.
Options#
| Flag | Description |
|---|---|
--skip-push, -s | Skip pushing code, use the existing deployment |
--environment, -e | Environment to debug (default: debug) |
--verbose, -v | Show verbose debug output |
--outbound, -o | Start an outbound phone call instead of a mic session |
--to-phone-number | Phone number to call (required with --outbound) |
--from-phone-number | Caller ID / originating phone number |
Interactive Controls#
- Enter — Send a text message to the agent
- Ctrl+C — End the session
Outbound Call Debugging#
Test your agent with a real phone call:
vr debug --outbound --to-phone-number +15551234567 vr debug --outbound --to-phone-number +15551234567 --from-phone-number +15559876543
Skipping the Push#
If your code is already deployed and you just want to start a debug session:
vr debug --skip-push
Testing#
Run tests for your voice agent project:
vr test
This validates your project, installs dependencies, fetches secrets from the specified environment, and runs pytest.
Options#
| Flag | Description |
|---|---|
--environment, -e | Environment to fetch secrets from |
--verbose, -v | Run pytest in verbose mode |
--coverage, -c | Run with coverage reporting |
--skip-install | Skip dependency installation |
Running Specific Tests#
vr test tests/test_handler.py vr test tests/test_handler.py --verbose --coverage
Passing Arguments to pytest#
Use -- to pass additional arguments directly to pytest:
vr test -- -k "test_greeting" --tb=short
Development Workflow#
A typical development cycle looks like this:
- Create a new project with
vr init - Write your agent handler in
handler.py - Test locally with
vr test - Debug interactively with
vr debug - Deploy to an environment with
vr deploy development - Iterate — make changes, re-test, and re-debug as needed
- Ship to production with
vr deploy production
