hundreds-vase-7385
12/04/2025, 9:55 AMtall-airline-16756
12/04/2025, 9:55 AMtall-airline-16756
12/04/2025, 9:56 AMlk agent create to start the build/deploy process.
1. Check build and runtime logs:
◦ Build logs: lk agent logs --log-type build
◦ Runtime logs: lk agent logs
1. Verify deployment artifacts:
◦ Dockerfile, livekit.toml, and agent code were uploaded and correct.
1. Confirm environment secrets are set (API keys for STT/LLM/TTS if used).
2. Check status after fixes:
◦ lk agent status — status should change to "Running" or "Sleeping" after successful deployment.
If you ran lk agent create and it still stays pending, what do you see in the build logs (lk agent logs --log-type build)? Please paste the last 10–20 lines of that output and the agent name/ID so I can help interpret them.
Sources: Deploying to production | LiveKit Docs | Deploy and scale agents on LiveKit Cloud | Agent deployment CLI reference | LiveKit docshundreds-vase-7385
12/04/2025, 10:03 AMtall-airline-16756
12/04/2025, 10:03 AMlk cloud auth.
1. Ensure you're using the correct project:
◦ List projects: lk project list
◦ Set default: lk project set-default <project-id>
1. Verify your API key/secret and permissions allow agent management.
2. Use the documented agent CLI commands (not lk run):
◦ Deploy: lk agent deploy (or lk agent create when registering a new agent)
◦ Check status: lk agent status
◦ View logs: lk agent logs and build logs lk agent logs --log-type build
If the above looks correct, please provide:
• The exact command you ran (copy/paste).
• The agent name/ID.
• Output of lk cloud auth status (or confirm you re-ran lk cloud auth).
• The last 10–20 lines of lk agent logs --log-type build (if relevant).
With those I can help pinpoint whether credentials, project selection, or CLI usage is causing the 401.
Sources: Agent deployment CLI reference | LiveKit docs | LiveKit CLI project management | LiveKit docs | Deploying to production | LiveKit Docshundreds-vase-7385
12/04/2025, 10:09 AMtall-airline-16756
12/04/2025, 10:09 AMlk cloud auth.
• Confirm project: lk project list then lk project set-default <project-id> for the project shown (p_3zkhb4vhqo5).
• Ensure the API key/secret used by the CLI are valid and have agent-management permissions.
• Use the documented agent commands (not lk run): lk agent deploy / lk agent create / lk agent delete.
To view logs while the agent is sleeping
• The agent is asleep due to inactivity. Create a new session (connect a client or start an agent session) to wake it.
• After the agent wakes, run lk agent logs (and lk agent logs --log-type build if you need build logs).
Tell me:
• The exact command you ran that produced the 401 (copy/paste).
• Output of lk cloud auth status (or confirm you re-ran lk cloud auth).
• Whether you can create a session now (so we can wake the agent and fetch logs).
I’ll interpret the outputs and guide the next steps.hundreds-vase-7385
12/04/2025, 10:09 AMtall-airline-16756
12/04/2025, 10:10 AMlk cloud auth
• Confirm the correct project is selected:
lk project list
lk project set-default p_3zkhb4vhqo5
• Verify the CLI is using valid API key/secret with agent-management permissions.
2) Wake (activate) the agent
• Create a new session (connect a client or start an agent session). Any client connection to the agent will wake it from "Sleeping" to "Running".
• After it wakes, fetch logs:
lk agent logs
lk agent logs --log-type build
If you still get 401 after re-authenticating, please paste:
• The exact command that returned 401 (copy/paste).
• Output of lk cloud auth status (or confirm you ran lk cloud auth).
• The agent ID: CA_vPoQU26cLjUo.
I’ll diagnose the next step once you share those.hundreds-vase-7385
12/04/2025, 10:13 AMtall-airline-16756
12/04/2025, 10:13 AMlk dispatch create --agent-name <your-agent-name> --room voice_assistant_room_9667
2) Dispatch when a participant connects (token-based)
• Create a participant token that includes a room configuration dispatching your agent (use the RoomConfiguration / RoomAgentDispatch fields) and connect a client with that token.
After dispatching:
• Check status: lk agent status — it should move Sleeping → Waking → Running.
• View logs: lk agent logs (once awake) and lk agent logs --log-type build for build issues.
If it still doesn't wake, tell me:
• The exact agent name/ID you used.
• Output of lk agent status.
• Any errors from lk agent logs after attempting dispatch. Sources: Deploying to production | LiveKit Docs | Agent dispatch | LiveKit docs | Rust SDKs | livekit/livekit_composite | DeepWiki | Agent deployment CLI reference | LiveKit docs