Setup & Deployment Issues
Database migration fails with alembic upgrade head
Cause: Database doesn’t exist or migrations are out of sync.
Fix:
Redis connection refused
Cause: Redis server not running, or running on a different port. Fix:JWT errors across backend and UI
Cause: TheJWT_API_SECRET is different between services.
Fix: Ensure the exact same value is set in:
agent-studio-backend/app/env/.env→JWT_API_SECRETagent-studio-ui/.env.local→JWT_API_SECRET
Call & Telephony Issues
Agent worker won’t connect to LiveKit
Inbound calls aren’t reaching the agent
Diagnostic steps:Check SIP trunk exists
Verify the phone number has an inbound trunk and dispatch rule configured:Look for the phone number with non-null
inbound_trunk_id and dispatch_rule_id.Check telephony provider
Verify the phone number is properly configured at Twilio/Vonage to route SIP to LiveKit.
S3 recording URLs return errors
Cause: Stray quotes inS3_REGION environment variable or wrong credentials.
Fix:
The backend strips surrounding quotes from S3_REGION as a workaround, but it’s best to fix the source.
Outbound call not connecting
Possible causes:- No outbound trunk — the agent’s phone number doesn’t have an outbound SIP trunk
- Invalid target number — the destination number format is incorrect
- At capacity —
livekit:active_callsis at the max limit - Provider issue — Twilio/Vonage account has insufficient balance
Batch & Campaign Issues
Batch job stuck in “running” state
Cause: Celery worker crashed during dispatch. Fix:Celery tasks not executing
Performance Issues
High latency in agent responses
| Bottleneck | Symptom | Fix |
|---|---|---|
| LLM | Agent takes 2-3s to respond | Switch to Groq or use gpt-4o-mini |
| TTS | Lag after agent “thinks” | Switch to Deepgram TTS (lowest latency) |
| STT | Words appear late | Ensure Deepgram connection is stable |
| Network | Overall slow | Deploy LiveKit closer to users |
Phone number format errors
The system expects E.164 format but handles some normalization:- ✅
+16505551234 - ✅
16505551234(+ is auto-added for US numbers) - ❌
(650) 555-1234(not yet supported) - ❌
650-555-1234(not yet supported)
Always use E.164 format (
+[country_code][number]) for reliable results.