acoustic-lunch-30313
11/20/2025, 10:23 PMtall-airline-16756
11/20/2025, 10:23 PMtall-airline-16756
11/20/2025, 10:23 PMlk agent restart / lk agent deploy) to perform a controlled restart.
1. Remove stale agent instances
◦ List agents: lk agent list
◦ Delete stale agent/worker deployments: lk agent delete --id <agent_id>
◦ Deleting an entire agent deployment ensures old instances are removed and new ones start cleanly.
1. If a worker is unresponsive
◦ Prefer triggering a controlled redeploy/restart so draining completes. If the instance is truly frozen and cannot be drained, deleting the agent deployment and redeploying will restore a clean pool.
Quick diagnostic questions
• Do you see workers with no active sessions but still marked Active in the UI?
• Are you using the LiveKit CLI/agent deployment (CLI, k8s, or other environment)?
I can walk you through the exact commands for your environment (CLI, Kubernetes, or custom deploy) once you tell me which you’re using. Would you like that?
Sources: Worker lifecycle | LiveKit Docs | Deploying to custom environments | LiveKit Docs | Deploying to production | LiveKit Docs | Agent deployment CLI reference | LiveKit docsacoustic-lunch-30313
11/20/2025, 10:25 PMlk agent list I see this response:
Using default project [project-1]
unable to list agents: Error from intermediary with HTTP status code 401 "Unauthorized"
Even though I already authenticated.tall-airline-16756
11/20/2025, 10:25 PMlk agent list.
Quick checklist to diagnose and fix this:
1. Confirm current project and credentials:
◦ Run lk project list and tell me the default project shown.
1. Re-authenticate to refresh credentials:
◦ Run lk cloud auth and complete the browser sign-in, then retry lk agent list.
1. Check permissions / project linkage:
◦ Ensure the account/API key you authenticated with has agent-management permissions for that project (admin-level access is typically required).
1. If you have a livekit.toml in your working directory, the CLI will use it — move or rename it temporarily and retry to rule out a misconfigured file.
Please share:
• Output of lk project list
• Whether you used lk cloud auth or an API key, and
• Whether a livekit.toml exists in your current directory
I’ll use that to suggest the exact next command or fix.
Sources: Deploying to production | LiveKit Docs | Agent deployment CLI reference | LiveKit docs | LiveKit CLI project management | LiveKit docs | SIP APIs | LiveKit docsacoustic-lunch-30313
11/20/2025, 10:30 PMlk project list
All my projects and api keys. I do not want to share that here.
• Whether you used lk cloud auth or an API key, and
I used this and it seemed to work
• Whether a livekit.toml exists in your current directory
I do not see this filetall-airline-16756
11/20/2025, 10:30 PMlk cloud auth, try these targeted checks (no secrets needed):
1. Force-use the project explicitly
• Run: lk agent list --project <project-name-or-id>
◦ Replace with your project identifier you already see locally. This avoids relying on any CLI default.
1. Verify CLI auth state
• Run: lk auth status
◦ Paste the non-sensitive output (it shows which account/project is active, not API keys).
1. Confirm CLI config files won’t override behavior
• Check for livekit.toml in parent folders: ls -a .. (repeat up the path) — you said none in cwd, but a parent file can be used.
• Check CLI config: cat ~/.config/livekit/config.json (only share whether it references the expected project, not keys).
1. Re-authenticate to refresh scopes
• Run lk cloud auth again and retry lk agent list --project <project-id>.
1. If still 401, try using an explicit API key (temporary) to test permission scope
• Create or use an API key with admin/agent permissions in the Cloud Console, then run:
◦ LK_API_KEY=<key> LK_API_SECRET=<secret> lk agent list --project <project-id>
◦ Only run this as a test — don’t paste keys here.
If you prefer, tell me the outputs of:
• lk auth status
• lk agent list --project <project-id> (project name only)
and whether re-running lk cloud auth changed the result. I’ll guide the next step based on those results.acoustic-lunch-30313
11/20/2025, 10:48 PMlk auth status is
No help topic for 'auth'. atall-airline-16756
11/20/2025, 10:49 PMNo help topic for 'auth' output and the 401 when running lk agent list.
Two likely causes: CLI command/version mismatch or stale/insufficient credentials. Try these steps and share the outputs:
1. Check CLI version
• Run: lk --version
• Paste the output.
1. Re-run the correct auth flow
• Run: lk cloud auth and complete the browser sign-in. Then retry:
◦ lk agent list --project <project-id>
1. Confirm configured projects
• Run: lk project list
• Share the non-sensitive output showing project names/IDs (don’t share keys).
1. If 401 persists, test explicitly with the project flag
• Run: lk agent list --project <project-id>
• Share the exact error text.
1. Optional diagnostic (no secrets)
• Check CLI config references: cat ~/.config/livekit/config.json and tell me whether it lists the project you expect.
Tell me the outputs of steps 1, 3, and 4 and I’ll guide the next action.
Sources: Deploying to production | LiveKit Docs | LiveKit CLI project management | LiveKit docs | Voice AI quickstart | LiveKit docsacoustic-lunch-30313
11/20/2025, 10:49 PMtall-airline-16756
11/20/2025, 10:50 PMlk agent list.
Since your CLI is current, this is an authentication/authorization or project-selection issue. Please run the following commands and share only the non-sensitive outputs:
1. Ensure a default project is set:
• Run: lk project list
• If your intended project is not marked as default, set it:
◦ lk project set-default <project-id-or-name>
• Then retry: lk agent list
1. If you prefer to avoid changing defaults, explicitly target the project:
• lk agent list --project <project-id-or-name>
1. Re-authenticate to ensure scopes and linkage are fresh:
• lk cloud auth (complete the browser sign-in), then retry step 1 or 2.
1. If 401 persists, run:
• cat ~/.config/livekit/config.json
◦ Tell me whether it references the project you expect (do not paste keys).
One of these will reveal whether the CLI is pointed at a different project or whether your account lacks agent-management permissions. Tell me the outputs of lk project list and lk agent list --project <project-id> (error text only) and I’ll guide the exact fix.
Sources: Agent deployment CLI reference | LiveKit docs | Analytics API | LiveKit docs | Deploying to production | LiveKit Docsacoustic-lunch-30313
11/20/2025, 10:54 PMtall-airline-16756
11/20/2025, 10:54 PMlk project list
• Reply whether your intended project appears and if one is marked Default.
1. If your project is not Default, set it
• Command: lk project set-default <project-id-or-name>
• Then run: lk agent list and tell me the exact result (error or list).
1. If your project was already Default or step 2 still gives 401, re-authenticate
• Command: lk cloud auth
• Complete the browser sign-in, then run:
◦ lk agent list --project <project-id-or-name>
• Tell me the exact error text if it still fails.
1. Check account permissions (no secrets)
• In the Cloud Console, confirm the account/API key you used has admin/agent-management permissions for that project. Tell me if you can confirm that.
If you prefer, run step 1 now and paste the non-sensitive output; I’ll tell you the exact next command based on that.