is there any hook that is invoked when the agent's...
# ask-ai
k
is there any hook that is invoked when the agent's turn has ended?
t
Thanks for reaching out, Hyeonsu. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
LiveKit offers a handy hook called
on_user_turn_completed()
, which kicks in right after the user finishes speaking and just before the agent starts responding. That said, there isn’t a specific, documented hook for when the agent’s turn wraps up. If you want to do something at the end of the agent’s turn, you might need to handle it within the agent’s logic itself, either during or after the TTS generation. Feel free to reach out if you'd like me to help you figure this out! Sources: Pipeline nodes and hooks | LiveKit Docs | Voice pipeline nodes | LiveKit Docs