hey guys im having problems connecting to my cloud...
# ask-ai
f
hey guys im having problems connecting to my cloud-deployed agent, even tho i have deployed the agent succesfully when i try to start a call with either with agents playground or locally with a react app the agent never joins the room, can someone help me with it?
t
Thanks for reaching out, Carlos. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
I'm here to help you get your cloud-deployed agent connected smoothly! Could you please share a bit more about your setup? For example: • Are you seeing any specific error messages or logs when the agent doesn’t join the room? • Have you had a chance to check if the environment variables (LIVEKIT_URL, LIVEKIT_API_KEY, LIVEKIT_API_SECRET) are set up correctly? • Are you using the Build plan? Sometimes, agents might take a little longer to start because of cold starts. With these details, we can better understand what’s going on and find the best way to get things working for you. Sources: room.go | cmd/lk/agent.go | README.md | Web and mobile frontends | LiveKit Docs | Troubleshooting & Common Issues | livekit/livekit_composite | DeepWiki
f
All im seeing is that the agent never joins the room, i have setup my env variables correctly and im using the build plan
sorry, im using the ship plan
t
Thanks for sharing that you’re on the Ship plan and have your environment variables set up correctly. Let’s work through some steps together to figure out why your agent isn’t joining the room: • Check Agent Status: You can use these commands to see how your agent is doing and review the logs:
Copy code
# Check agent status
lk agent status --id <agent-id>

# View deployment logs
lk agent logs --id <agent-id> --log-type=deploy
• Monitor Connection States: It’s helpful to keep an eye on your app’s connection state by using the SDK’s
room.connectionState
property and making sure you handle the
Disconnected
event properly. • Worker Availability: Double-check that you have multiple agent instances running and that your deployment is scaled to meet your needs. • Agent Dispatch Timing: Take a look at how long it takes for the agent to be dispatched and actually join the room. Pay attention to any delays between
agentDispatchedAt
and
agentJoinedAt
. If you’re still running into trouble, please feel free to share any specific error messages or patterns you’re noticing in the logs. I’m here to help you get to the bottom of this! Sources: Community & Support | livekit/livekit_composite | DeepWiki | Troubleshooting & Common Issues | livekit/livekit_composite | DeepWiki | Web and mobile frontends | LiveKit Docs | pkg/loadtester/agentloadtester.go | pkg/rtc/room.go