livekit-compat shim (preview).
Front-proxy the media
Shipped. The voice gateway terminates the caller (SIP trunk or browser
QUIC) and bridges the audio to your existing LiveKit room. Your agent code is
untouched — it sees a normal room participant.
Browser compat shim
Preview. Swap one import so a
livekit-client browser app publishes and
subscribes over MoQT/QUIC instead of the SFU. No media server to operate.Path A — front-proxy the media (shipped)
Put the voice gateway in front of your LiveKit deployment. The gateway owns the hard edge — a PSTN SIP trunk, or a browser leg over QUIC on the single:443
plane — decodes it to the runtime’s 8 kHz PCM audio bus, and relays that audio
over a WebSocket media bridge to a small bridge process you run alongside your
LiveKit deployment. That bridge joins your LiveKit room as an ordinary
participant, so your agent needs no changes at all.
What’s shipped vs. what you deploy. The gateway-side bridge — a
vendor-bridge pipeline node plus the WebSocket media handler — is in-tree and
shipped. The bridge sidecar that joins your LiveKit room is a component you
run next to your LiveKit deployment, using your LiveKit URL, API key, and
secret. The edge is shipped; the bridge is a thin component you operate.
Point an agent at the vendor bridge
Instead of a cascade or a duplex model, the agent’s pipeline routes the
call’s media to your external vendor. The exact field names live in the
Runtime Configuration reference;
the shape is:With this config the runtime does not run turn detection or a model — it
hands the caller’s audio to the bridge and streams the bridge’s audio back
onto the call. Your LiveKit agent owns the conversation.
agent-config.yml
Route a trunk or number to that agent
Attach an inbound number or SIP trunk to the agent so real calls reach it.
Provisioning a trunk and a DID is covered in
SIP Trunking and
Number Provisioning.
Run the bridge sidecar next to LiveKit
Deploy the bridge process where it can reach both the gateway’s WebSocket
media bridge and your LiveKit server. It connects to the gateway to receive
caller audio and, using your LiveKit credentials, joins the target room and
republishes that audio as a participant track — then relays the agent’s audio
back the other way.
The bridge is an external component (declared separately from the engine),
so its exact CLI and container image ship with the bridge, not the gateway.
Conceptually it needs three things: the gateway bridge URL, your
LIVEKIT_URL + LIVEKIT_API_KEY + LIVEKIT_API_SECRET, and the room name
to join.This is the same vendor-bridge mechanism used for Vapi and Twilio agents —
swap
target. It is a config-level front-proxy, not a rewrite of your runtime.
See Keep Your Existing Runtime for
the full “transport-only” spectrum.Path B — the browser compat shim (preview)
If your LiveKit surface is a browser app (livekit-client), you can skip the
edge bridge entirely and run the client’s audio over our transport directly. The
livekit-compat shim re-implements the livekit-client API — Room,
RoomEvent, tracks, participants — on top of MoQT/QUIC, so the common voice path
(publish the mic, subscribe to remote audio, exchange data) is a one-line import
swap. There is no SFU and WebRTC’s transport is never used.
RTCRtpScriptTransform) and refuses to connect on a browser that
would silently fall back to plaintext WebRTC. Today that means Chromium-family
browsers. The full deep-dive — install, what maps to what, the fallback ladder —
is in Keep Your Existing Runtime and
WebRTC Diversion.
Which path?
These are not mutually exclusive — front-proxy a phone leg and move a
browser client onto the transport at the same time.
| You have | Use | Status |
|---|---|---|
| A LiveKit agent you want on the PSTN / QUIC edge | Front-proxy the media (Path A) | Shipped edge + a bridge you run |
A LiveKit browser app (livekit-client) | The livekit-compat shim (Path B) | Preview |
| A LiveKit Python agent, transport only | Front-proxy (Path A) or the transport primitives | Path A shipped; Python shim not available |
Related
Keep Your Existing Runtime
The full transport-only spectrum — the shim and the raw MoQT primitives.
From Self-Hosted LiveKit
The end-to-end migration path — trunks, tokens, and rollout.
Bridge a LiveKit Agent
A worked example of connecting a LiveKit agent to a call.
Custom Agent Runtime
The same front-proxy pattern for any non-LiveKit runtime.