Sandbox Error ‘Agent did not join the room’
# ask-ai
b
Sandbox Error ‘Agent did not join the room’
t
Thanks for reaching out, Liam. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
The error ‘Agent did not join the room’ typically occurs when an agent fails to connect to a room within the expected timeframe, often due to configuration, network, or server-side issues. Here are some steps to troubleshoot: • Check Agent Configuration: Ensure the agent is properly configured, including the correct name and metadata. Review dispatch logs for connection errors. • Verify Network Connectivity: Confirm that the agent has proper network access to the LiveKit server and that no firewall rules are blocking the connection. • Inspect Participant Connection: Monitor the connection state using
room.connectionState
and handle disconnect events appropriately. • Review Logs: Check agent dispatch logs for failure reasons like
JOIN_FAILURE
or
CONNECTION_TIMEOUT
. If you need further assistance, please share details about your agent configuration, server setup, and any relevant error logs. Sources: examples/agent_dispatch.py | examples/agent-dispatch/index.ts | complex-agents/drive-thru/frontend/components/session-view.tsx | Web and mobile frontends | LiveKit Docs | livekit-agents/livekit/agents/job.py