What are the practical applications of using egres...
# ask-ai
w
What are the practical applications of using egress and ingress? Context: I have an agent builder frontend, and a backend that takes the config from the frontend, puts it in a Metadata, and dispatches an agent and the frontend user in a room.
t
Thanks for reaching out, Someshwar. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Thanks — you're asking how egress and ingress apply to your agent-builder flow (frontend → backend metadata → dispatch agent + user into a room). Here’s a concise, practical breakdown tied to that workflow. Ingress (bringing external media into the room) • Use to inject external streams/files (RTMP/WHIP/HLS/MP4/SRT) as a participant so agent and user see/hear the same source. • Practical uses: ◦ Add a training video, diagnostics feed, or third-party live stream into the session for the agent to reference. ◦ Feed audio from a call bridge or SIP gateway so the agent can process/transcribe it. • How it fits your flow: ◦ Frontend can specify the source URL in the builder config. ◦ Backend creates an Ingress for the room using that metadata; the stream appears as a participant available to agent and user. Egress (exporting/forwarding room or track data) • Use to record sessions, broadcast them, or send raw media to external processors. • Practical uses: ◦ Record full sessions (Room Composite) to cloud storage for QA, compliance, or post-call analysis. ◦ Stream the session to an external CDN (RTMP/SRT) for live broadcast. ◦ Send raw audio (Track Egress/WebSocket) to real-time transcription, sentiment analysis, or ASR services. • How it fits your flow: ◦ Backend can start egress when dispatching the room (using metadata to name files or route outputs). ◦ You can record the composite view (agent + user + ingress) and/or forward specific tracks (agent audio) for downstream processing. Combined patterns you’ll likely use • Ingress + Agent: Inject a reference video or live feed the agent can analyze and narrate to the user. • Agent + Track Egress: Agent’s audio is forwarded live to transcription/analytics while the room is recorded for audit. • Metadata-driven automation: Store recording IDs, stream targets, or source URLs in metadata so backend starts appropriate ingress/egress automatically when dispatching. If you want, I can: • Suggest which egress type to use for a specific downstream (e.g., ASR vs. full-archive). • Show the minimal API calls you’d make from your backend to start an ingress or egress for a dispatched room. Sources: Stream import | LiveKit docs | Egress examples | LiveKit docs | Universal Egress | Egress output types | LiveKit docs | RoomComposite Egress | LiveKit Docs