---
title: "Augment Your LiveKit Agent with Modal GPUs"
description: "LiveKit and its Agents SDK provide WebRTC-based audio-video applications, and open-weights models on Modal GPUs can augment these agents with custom or open-weights components, using BitHuman’s Expression Video Avatar voiced by Qwen3-TTS as an example to clone Charles Frye. The BitHuman avatar container, prepackaged as a self-hosted GPU container exposed via a Modal Server, provides a /launch endpoint that a LiveKit agent calls using a session token upon participant entry. A challenge arises because the endpoint returns immediately after the avatar joins, conflicting with how Modal Servers scale by in-flight requests. Modal’s recently released Sticky Sessions solve this by guaranteeing strong container affinity, allowing a client to start and end sessions and hold a slot on the container as if a request were running. GPU snapshots hide cold starts, avoiding gigabytes of model weight reloads, and the complete code is provided for implementation alongside documentation."
---

# Augment Your LiveKit Agent with Modal GPUs

[Modal](https://yomu.fyi/company/modal) · Ben Shababo · Oct 15, 2026

**Type:** Problem & solution

## Summary

LiveKit and its Agents SDK provide WebRTC-based audio-video applications, and open-weights models on Modal GPUs can augment these agents with custom or open-weights components, using BitHuman’s Expression Video Avatar voiced by Qwen3-TTS as an example to clone Charles Frye. The BitHuman avatar container, prepackaged as a self-hosted GPU container exposed via a Modal Server, provides a /launch endpoint that a LiveKit agent calls using a session token upon participant entry. A challenge arises because the endpoint returns immediately after the avatar joins, conflicting with how Modal Servers scale by in-flight requests. Modal’s recently released Sticky Sessions solve this by guaranteeing strong container affinity, allowing a client to start and end sessions and hold a slot on the container as if a request were running. GPU snapshots hide cold starts, avoiding gigabytes of model weight reloads, and the complete code is provided for implementation alongside documentation.

## Approach / What changed

Use Modal’s Sticky Sessions to guarantee container affinity for the LiveKit agent’s call to the BitHuman avatar endpoint, and leverage GPU snapshots to hide cold starts of model weights.

## Takeaways

- Modal’s Sticky Sessions provide a first-class primitive for container affinity, allowing WebSocket connections to reconnect to the same container and hold a session slot as if a request were running.
- GPU snapshots on Modal hide cold starts by avoiding the need to reload gigabytes of model weights onto the server when the container starts.
- The BitHuman Expression Video Avatar runs in a self-hosted GPU container that exposes a /launch endpoint, which a LiveKit agent calls upon participant entry to join the room.

## FAQ

### How do Modal Sticky Sessions guarantee container affinity?

Sticky Sessions allow a client to start and end sessions on a Server container, holding that session's slot as if a running request, enabling WebSocket reconnection to the same container.

### How does Modal handle cold starts for large model weights?

Modal uses GPU snapshots to hide cold starts, avoiding the reloading of gigabytes of model weights onto the Server and allowing the container to start quickly.

### What endpoint does the BitHuman avatar container expose for LiveKit?

The container exposes a /launch endpoint that the LiveKit agent calls to join the LiveKit room, returning as soon as the avatar joins.

**Tags:** [GPU](https://yomu.fyi/topic/gpu), [LiveKit](https://yomu.fyi/topic/livekit), [Modal](https://yomu.fyi/topic/modal), [WebRTC](https://yomu.fyi/topic/webrtc)

- Source: [Modal](https://modal.com/blog/livekit-modal)
- Source URL: https://modal.com/blog/livekit-modal
- Ingested by Yomu: 2026-10-23T18:00:36.860Z

[Read original post](https://modal.com/blog/livekit-modal)
