lively-coat-10905
11/04/2025, 3:48 PMIs there a separate event (e.g.Goal: If such an event exists, it would be better than manually usingorconversation_item_committed) that fires once the agent’s full LLM response is finalized — even if TTS is interrupted — and how can we listen to it?conversation_turn_committed
session.history[-1].
We could attach a listener and always publish the full text to the frontend when the assistant’s turn is done.tall-airline-16756
11/04/2025, 3:48 PMtall-airline-16756
11/04/2025, 3:48 PMsession.history[-1].
• Use conversation_item_added. This fires when a chat item is committed to history. Filter for items with role == "agent" and use the event’s item to get the finalized assistant text. This is independent of TTS interruptions and is the right hook for “assistant turn done” behavior. See: Events and error handling.
• Avoid relying on speech_created for this—it indicates audio creation/playout, not text commit. Same doc: Events and error handling.
• If you’re using a realtime model provider and want model-level “completion done” signals, you can also listen to the provider’s realtime completion events (e.g., ResponseTextDoneEvent / ResponseDoneEvent). Reference: Real-time AI Models & Streaming.
Would you like a code snippet to subscribe to conversation_item_added in your SDK (Node or Python)?
Sources: Events and error handling | LiveKit docs | Real-time AI Models & Streaming | livekit/livekit_composite | DeepWiki