Knowledge > Runbooks > Deployment > Deploy Voice Agent
Deploy the LiveKit Agents Voice Agent
Deploy an updated version of the multi-tenant voice agent. The Python agent worker runs on Railway (auto-deploys from git push to main). LiveKit Cloud connects to the worker automatically — no separate CLI connect step is required.
Deploy Steps
- Push code changes to GitHub
mainbranch (Railway auto-deploys from GitHub):git add voice-agent-livekit/git commit -m "feat(voice): describe your change"git push origin main - Monitor Railway deploy: check Railway dashboard or
railway logs - LiveKit Cloud agent config: no redeploy needed — the agent worker connects automatically once Railway is running
Environment Variables
Set via Railway dashboard or railway variables set KEY=VALUE:
| Variable | Value / Notes |
|---|---|
LIVEKIT_URL | LiveKit Cloud WebSocket URL: wss://cwa-voice-9x077mph.livekit.cloud |
LIVEKIT_API_KEY | LiveKit Cloud API key |
LIVEKIT_API_SECRET | LiveKit Cloud API secret |
CARTESIA_API_KEY | Still needed for TTS (Cartesia Sonic via livekit-plugins-cartesia) |
DEEPGRAM_API_KEY | For STT (Deepgram via livekit-plugins-deepgram) |
SUPABASE_URL | Production Supabase URL |
SUPABASE_SERVICE_ROLE_KEY | Service role key (required for DB writes from tools) |
GEMINI_API_KEY | Coordinator LLM + call classification |
ANTHROPIC_API_KEY | Care Agent LLM (Claude Haiku 4.5) |
OPENAI_API_KEY | Embedding generation (text-embedding-3-small for RAG) |
TWILIO_ACCOUNT_SID | SMS sending from tools |
TWILIO_AUTH_TOKEN | SMS auth |
TWILIO_PHONE_NUMBER | SMS from-number |
SIP Trunk
Twilio SIP trunks forward calls to the LiveKit Cloud SIP gateway. New church phone numbers need:
- Twilio number purchased
- SIP trunk configured to forward to LiveKit Cloud SIP gateway URL (from LiveKit Cloud project settings for
cwa-voice-9x077mph) church_voice_agentsrow inserted in Supabase with the phone number
Run scripts/setup_sip.py to configure a new Twilio → LiveKit SIP trunk connection.
Verification
After deployment:
- Railway build completes successfully (check Railway dashboard)
- Test call connects and routes to the correct church agent
- Agent greets caller with the church's name (not "ChurchWiseAI")
- Prayer request, callback, and visitor capture tools respond correctly
voice_call_logstable shows a new entry withstatus = 'completed'
SELECT id, church_id, created_at, duration_seconds, status
FROM voice_call_logs
ORDER BY created_at DESC
LIMIT 5;
Rollback
The voice agent does not have a one-click rollback. To rollback:
-
Revert the code change and push to main:
git revert HEADgit push origin mainRailway will auto-deploy the reverted code. LiveKit Cloud reconnects automatically once the new Railway service is running.
-
Verify calls are routing correctly again.
See Also
- rollback.md — general rollback guidance
C:\dev\churchwiseai-web\voice-agent-livekit\main.py— entry point and agent routingC:\dev\churchwiseai-web\voice-agent-livekit\verticals\church\agents.py— church agent builders- voice-agent-debug.md — if the deploy causes call issues