rapid-honey-43838
03/03/2026, 8:47 PMtall-airline-16756
03/03/2026, 8:47 PMtall-airline-16756
03/03/2026, 8:48 PMon_user_turn_completed is invoked, and what it receives.
What triggers it
• on_user_turn_completed runs when the user’s turn has ended — i.e., after the system detects the user has stopped speaking but before the agent generates its reply.
• Typical turn-end signals are voice activity detection (VAD), an end-of-speech signal from the STT component, or a turn-detector model.
Parameters it receives
• `turn_ctx`: the chat context up to, but not including, the user’s latest message.
• `new_message`: the user’s latest message (the content of the completed turn).
What happens next
• After on_user_turn_completed executes, new_message is appended to the chat context and the agent proceeds to process/generate a response.
When this node is available
• This hook is available only for STT → LLM → TTS pipelines (i.e., pipelines that have the user’s turn in text form).
If you want, tell me which pipeline or SDK you’re using and I can show a short example of where to attach this hook in your code.
Sources: Pipeline nodes and hooks | LiveKit Documentation | Turns overview | LiveKit Documentation | External data and RAG | LiveKit Documentationrapid-honey-43838
03/03/2026, 8:49 PMtall-airline-16756
03/03/2026, 8:49 PMuser_state_changed for the fastest detection to kick off pre-processing (e.g., start an LLM warm-up or show a typing indicator).
• Use interim transcripts to refine or begin intent extraction while the user continues speaking.
• Final transcription or user_input_transcribed should trigger the steady-state response generation.
If you tell me which SDK or pipeline you’re using (browser, Node, Python, or the composite pipeline), I can show a short code snippet showing where to hook these events.
Sources: Turns overview | LiveKit Documentation | Agent session | LiveKit Documentation | Agent speech and audio | LiveKit Documentation | examples/voice_agents | livekit/livekit_composite | DeepWiki