> ## Documentation Index
> Fetch the complete documentation index at: https://docs.voiceblox.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Agent Runtime

> How the Voiceblox Python agent worker runs alongside the Next.js app.

# Agent Runtime

The Voiceblox agent runs as a standalone **Python worker process** using the [LiveKit Agents Python SDK](https://github.com/livekit/agents). 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:

```bash theme={null}
# Terminal 1 — Next.js app
pnpm dev

# Terminal 2 — Python agent server (spawns workers on demand)
pnpm agent:server
```

See [Python Worker](/deployment/python-worker) for full setup instructions and supported providers.

## Deploying with Docker

See [Docker Compose](/deployment/docker) for running the worker alongside the web app in a container.
