Skip to main content

Overview

The Voice Agent Runtime is a Python microservice that handles all real-time voice processing. It’s separate from TalkifAI Studio (the web app) and runs on a dedicated Google Cloud VM for performance. Repository: Livekit-Production-Agent Stack: Python, FastAPI, LiveKit Agents SDK

Key Responsibilities


Architecture


Session Lifecycle


Provider Integrations

STT Providers (providers/stt.py)

LLM Providers (providers/llm.py)

TTS Providers (providers/voice.py)


Batch Calling System

The runtime includes a Redis-backed batch calling system (batch_system/):
  • ARQ for async job processing
  • Two-level concurrency: Org limit + Batch limit
  • Auto-retry: 3 attempts per call
  • Scheduling: IANA timezone support

Environment Variables


Deployment

The runtime is deployed on a Google Cloud VM (not serverless) because:
  • LiveKit agent workers need persistent WebSocket connections
  • Low-latency audio processing benefits from dedicated compute
  • Batch calling workers need long-running processes
Scaling: Deploy multiple VMs behind a load balancer. Each VM runs independent agent workers. See Dockerfile and .github/workflows/ for CI/CD details.