LiveKit
WebRTC room transport (roomio) and the LiveKit dispatch source.
The LiveKit plugin family lets agents-go run with LiveKit: roomio binds a
LiveKit room as a session transport, and the control-plane Source lets a
worker take dispatch from a LiveKit server. Both are optional — nothing in the
core imports LiveKit.
Capabilities
Transport (WebRTC room I/O + transcription) · dispatch source
Install & build tag
import "github.com/webdeveloperben/agents-go/plugins/livekit/roomio"roomio pulls the WebRTC/media stack, so it builds behind the livekit build
tag with native audio libraries (Opus / SoXR):
go build -tags livekit ./...roomio — room transport
Bind a room to a session with roomio.Bind (the Binding
form) or roomio.NewRoomIO(...).Start(...):
session.Start(ctx, agents.StartOptions{
Agent: agent,
Transport: roomio.Bind(transport.RoomConnectOptions{
URL: url, Token: token, ParticipantName: "agents-go",
}, roomio.Options{}),
})roomio.Options controls transcription (publish, JSON, sync/speaking-rate),
pre-connect audio, room deletion on close, participant kinds, and encryption. See
Connecting to a room for where the URL
and Token come from.
LiveKit dispatch source
livekit.NewSource(cfg) gives a worker a DispatchSource backed by a LiveKit
server, so the same worker binary runs behind LiveKit instead of the embedded
dispatcher — the server mints each job's room URL/Token and hands them to the
entrypoint. See Deploy a worker.
Caveats
Requires the livekit build tag and native Opus/SoXR. Job reconnect/retry and
migration are handled by the LiveKit wire adapter and remain future work.
Related
- Connecting to a room · Transports
- Architecture — LiveKit-optional dispatch.