is there anythin like on_enter but for user/ parti...
# ask-ai
p
is there anythin like on_enter but for user/ participant s non agents
t
Thanks for reaching out, Minas. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Absolutely! There are some great ways in LiveKit to handle participant events similar to
on_enter
, especially for non-agent users or participants: • You can take advantage of the participant entrypoint function by using the
add_participant_entrypoint
method on the
JobContext
. This function will be triggered whenever a participant joins the room, including those who were already there when the agent started. It’s a handy way to keep track of everyone! • Another approach is to listen for the
participant_connected
event on the
Room
object. For example, by using
ctx.room.on("participant_connected", on_participant_connected_handler)
, you can respond to new participants joining and run any custom logic you need. Both of these options work similarly to
on_enter
, but they’re designed specifically for non-agent participants. I hope this helps you get everything set up smoothly! Sources: Pipeline nodes and hooks | LiveKit docs | Job lifecycle | LiveKit Docs | avatars/hedra/education_avatar/agent.py