Hi everyone! I have been experiencing something st...
# agents
f
Hi everyone! I have been experiencing something strange. my agent is deployed to the livekit cloud, and my frontend livekit components are all setup correctly. but once in about 3 conversation when the conversation starts It gets stuck on the connecting phase. and the agent does not connect to the room and conversation does not start. It happens only in production when using the agent in the cloud, when i run the agent locally it does not happen. When i try to inspect the agent logs through the CLI I see that when the issue occurs the agent does not seem to join the room and the enterypoint code does not seem to be triggered at all, even though the room as been created and token issued. anyone else experienced something like that?
r
Do you have a link to a session id on your dashboard where that happened?
f
Hey @refined-appointment-81829 thank you for your attention, Yes of course here is a link to a session that did not work: https://cloud.livekit.io/projects/p_2h1bchh42rd/sessions/RM_VTPMCDyGKkt8 And here is a link to a session that did work: https://cloud.livekit.io/projects/p_2h1bchh42rd/sessions/RM_6aLCxPseneNv A pattern I noticed that might be irrelevant, is that on sessions that succeded the participent joining event is recorded before the agent joining event. and in session where the issue happened the agent joined first. With that pattern in mind I tried making the agent dispatch always after the user connects using the agent dispatch config while creating the token. I coundnt make it work, so i paused following this route because I wasnt even sure this was the problem. I think my next step will be trying to deploy the agent on Render and see if it presists, will update.
r
Maybe test your agent using LiveKit Cloud hosted agents to see if that works better for you
f
@refined-appointment-81829 My agent is already deployed to the livekit cloud - thats where the issue is happening. deployed it through the CLI with lk agent deploy/create. when you say LiveKit Cloud hosted agents do you mean any specific configuration?
Solved - I changed to explict dispatch by agent name, and that solved it.
r
explicit dispatch is the recommended method
👍 1