What does it mean when my deployed agent's status ...
# ask-ai
g
What does it mean when my deployed agent's status in the livekit cloud is saying "Pending" and how do I connect my deployed agent to my frontend project, because it seems to only connect for the local agent
t
Thanks for reaching out, Eden. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Hey there! Could you please let me know if the "Pending" status shows up in the agent list or status output when you run
lk agent status
? Or is it tied to a particular job or task assigned to the agent? Also, does this status stick around, or does it change to something else after a while? Thanks so much! Sources: Agent deployment CLI reference | LiveKit Docs | livekit/livekit_agent.pb.go | livekit-protocol/livekit/protocol/agent.py | livekit-protocol/src/livekit.rs
g
When I ran the
t
Hey there! To get your deployed agent connected to your frontend project in LiveKit, just follow these simple steps: 1. Deploy the Agent: First, use the LiveKit CLI to deploy your agent. Start by authenticating with your LiveKit Cloud project using
lk cloud auth
, then run
lk agent create
from your agent project directory. 2. Configure Frontend Environment Variables: Next, set these variables in your frontend project:Make sure these match the credentials your agent is using. ◦
LIVEKIT_API_KEY
◦
LIVEKIT_API_SECRET
◦
NEXT_PUBLIC_LIVEKIT_URL
(if you're using Next.js) 1. Ensure Both Systems Use the Same Room: It’s important that both your frontend and agent join the same LiveKit room. Usually, the frontend creates the room name, and the agent joins as an AI participant. 2. Initialize Frontend with LiveKit SDK: Use a supported LiveKit SDK (like React or Next.js) to handle media tracks, data streams, and keep everything in sync. 3. Start Both Components: Finally, run your agent (for example, with
python agent.py dev
) and your frontend (like
pnpm dev
), then open your frontend’s local URL to see it in action. Just double-check that both the agent and frontend are up and running, and that your environment variables and room names line up. If anything feels off, you can always check your agent’s deployment status with
lk agent status
and peek at the logs using
lk agent logs
. You’ve got this! Sources: Agent deployment CLI reference | LiveKit Docs | livekit/livekit_agent.pb.go | livekit-protocol/livekit/protocol/agent.py | livekit-protocol/src/livekit.rs | Web and mobile frontends | LiveKit Docs
g
Ok when i ran the lk agent status command, It said "sleeping" (PS C:\Users\3d3n2\agent-starter-python> lk agent status WARNING: config file C:\Users\3d3n2/.livekit/cli-config.yaml should have permissions 600 WARNING: config file C:\Users\3d3n2/.livekit/cli-config.yaml should have permissions 600 Using project [voice-app] Using agent [CA_56AnUJL6PgmM] ┌─────────────────┬─────────────────┬─────────┬──────────┬────────────┬─────────┬───────────┬──────────────────────┐ │ ID │ Version │ Region │ Status │ CPU │ Mem │ Replicas │ Deployed At │ ├─────────────────┼─────────────────┼─────────┼──────────┼────────────┼─────────┼───────────┼──────────────────────┤ │ CA_56AnUJL6PgmM │ v20250829202858 │ us-east │ Sleeping │ 0m / 2000m │ 0 / 4GB │ 1 / 1 / 1 │ 2025-08-29T203031Z │)
t
Hey there! When you see the status "Sleeping," it means your agent is currently scaled down to zero active replicas but is all set to scale up whenever it’s needed. This is totally normal for agents that adjust dynamically based on demand. To make sure your deployed agent connects smoothly with your frontend project, here are a few things to check: 1. Room Connection: Both your agent and frontend need to be in the same LiveKit room. Just double-check that the room name matches on both sides. 2. Environment Variables: Take a quick look to confirm that
LIVEKIT_API_KEY
,
LIVEKIT_API_SECRET
, and
NEXT_PUBLIC_LIVEKIT_URL
(if you’re using Next.js) are set correctly in your frontend project and line up with what the agent is using. 3. Agent Activation: Don’t worry—the agent will automatically wake up and scale up whenever it needs to jump into action, like joining a room or handling a task. If you notice the agent isn’t waking up like it should, you can peek at its logs using
lk agent logs
to get some clues. And of course, feel free to reach out if you want a hand with anything else!
g
Wait check my code and tell me if Im doing something wrong