Are call recordings aka egress done by Livekit Med...
# ask-ai
s
Are call recordings aka egress done by Livekit Media Server or by the Livekit Agent ? Who is responsible for what parts ?
t
Thanks for reaching out, Sameer. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Thanks — great question. I’ll clarify who does what when it comes to call recordings (egress) in LiveKit. Short answer • Recordings (egress) are performed by the Egress service. • The LiveKit Media Server (SFU) and the LiveKit Agent play supporting roles but do not do the actual recording. What each component is responsible for • Egress service ◦ Responsible for recording/exporting media from rooms. ◦ Runs separately from the SFU so recording/transcoding won’t impact real‑time routing. ◦ Provides multiple egress modes: room composite (composited layout via a headless Chrome), track composite (synchronized tracks for a participant), and track egress (individual raw tracks). ◦ Handles transcoding (GStreamer), saving to cloud storage (e.g., S3), and streaming to destinations like RTMP. ◦ Can be started/stopped via API, CLI, or automated rules. • LiveKit Media Server (SFU) ◦ Routes and forwards real‑time WebRTC media between participants (no transcoding for routing). ◦ Does not perform the recording itself. ◦ When an egress run begins, the SFU supplies media streams to the Egress service by letting the egress component join the room as a hidden participant (e.g., a browser instance for composite captures). • LiveKit Agent ◦ Acts as an intelligent participant (speech-to-text, LLM interactions, TTS, etc.). ◦ Does not record media by itself. ◦ Can programmatically trigger egress (start/stop) via server SDK calls and can run logic before recording — for example, collecting recording consent from participants. Key integration points / examples • You can configure automatic recording at the SIP dispatch rule level so calls routed via that rule are recorded by the Egress service. • The Agent can gate recordings (collect consent or run business logic) and then call the Egress API to begin recording. • The SFU supplies the media; the Egress service captures/transcodes/exports it. If you’d like, I can: • Walk through the specific egress mode that fits your use case (room composite vs track egress). • Show example API calls to start/stop egress for your application. • Explain how to wire the Agent to trigger egress and collect consent. Which of those would you like to see next? Sources: Universal Egress | examples/bank-ivr | livekit/livekit_composite | DeepWiki | Collect recording consent with tasks | LiveKit Documentation