Agent Runtimes
TheAGENT_RUNTIME environment variable controls how the agent is started when you click Test in the builder or make a request to /api/agent-session.
The three modes
| Mode | Value | Requires a separate process? | Best for |
|---|---|---|---|
| In-process | inprocess | No | Local development, zero-config testing |
| TypeScript worker | typescript | Yes (pnpm agent-typescript:dev) | Production (TypeScript) |
| Python worker | python | Yes (pnpm agent-python:dev) | Production (Python), broader provider ecosystem |
inprocess (default)
The TypeScript agent runs inside the Next.js process. No separate terminal needed./api/agent-session calls startLocalAgent() directly. The agent reads the AgentConfig from the LiveKit room metadata and publishes step/state events on the voiceblox.agent.events data channel — the same path used in worker modes.
Limitations: The in-process agent shares memory and CPU with Next.js. For production workloads, use a dedicated worker.
typescript worker
A standalone TypeScript worker process connects to your LiveKit project and handles agent jobs.python worker
A standalone Python worker process with full feature parity and a broader provider/plugin ecosystem via the LiveKit Agents Python SDK.How dispatch works
Fortypescript and python modes, /api/agent-session:
- Creates a LiveKit room with the
AgentConfigJSON serialized into the room metadata - Calls
AgentDispatchClient.createDispatch()to dispatch the job to a registered worker namedvoiceblox - Returns a JWT so the browser can join the room
inprocess mode, steps 2–3 are replaced by a direct call to startLocalAgent() inside the same process.