Skip to main content

Agent Runtime

The Voiceblox agent runs as a standalone Python worker process using the LiveKit Agents Python SDK. When you click Test in the builder or call /api/agent-session, the app dispatches a job to the worker.

How it works

  1. The app creates a LiveKit room with the AgentConfig JSON in the room metadata
  2. It calls AgentDispatchClient.createDispatch() to dispatch the job to the registered Python worker
  3. The browser receives a JWT and joins the room
  4. The worker picks up the job, reads the config from metadata, builds the LLM/TTS/STT instances, and starts the session

Running the worker

Start the Next.js app and the Python worker in separate terminals:
# Terminal 1 — Next.js app
pnpm dev

# Terminal 2 — Python agent worker
pnpm agent-python:dev
For production:
pnpm agent-python:start
See Python Worker for full setup instructions and supported providers.

Deploying with Docker

See Docker Compose for running the worker alongside the web app in a container.