hundreds-evening-11581
12/17/2025, 9:47 AMtall-airline-16756
12/17/2025, 9:47 AMtall-airline-16756
12/17/2025, 9:48 AMlk agent list use testproject because the CLI is picking the project from the repo's local config rather than the default shown in lk project list.
Two quick ways to fix/check:
1. Run the command with an explicit project:
lk agent list --project test_project
1. Check/remove/update the livekit.toml in your current directory (~/Work/agent-starter-python). If it contains a [project] entry pointing to testproject, it will override the CLI default. To view:
cat livekit.toml
Update the [project] subdomain to the correct project or remove the file if you want the global default to apply.
If you tell me how you switched projects (which command you used) or paste the livekit.toml contents, I can confirm the exact change to make.
Sources: Agent deployment CLI reference | LiveKit docshundreds-evening-11581
12/17/2025, 10:14 AMtall-airline-16756
12/17/2025, 10:15 AMlk cloud auth and sign in, then confirm the Playground is using the same LiveKit account/project.
1. Force the project when testing
◦ From your agent directory run:
lk agent list --project test_project to ensure the CLI/project context matches the agent’s registered project.
1. Environment variables / .env
◦ Ensure LIVEKIT_API_KEY, LIVEKIT_API_SECRET, and LIVEKIT_URL in your .env match the project shown in your agent logs (wss://testproject-u43es40w.livekit.cloud).
1. Download required files (if you need model-based features)
◦ Run: uv run src/agent.py download-files then restart uv run src/agent.py dev. Missing ML libs means model functionality is limited until models are downloaded and supported.
1. Network / WebSocket reachability
◦ Verify your machine can reach the LiveKit WebSocket URL (no corporate firewall blocking):
curl -v <https://testproject-u43es40w.livekit.cloud> and check browser console/network tab when the Playground attempts to connect for WebSocket errors.
1. Playground errors / logs
◦ Open the browser devtools Console/Network when connecting from the Agents Playground and paste any error messages (auth failure, 401, WebSocket close codes, CORS, etc.). Specific error text will pinpoint the problem.
If you prefer, paste:
• the Playground error message(s),
• your .env (redact secrets),
• and the output of lk agent list --project test_project.
I’ll use that to give the exact next step.
Sources: Voice AI quickstart | LiveKit docs | Agents (Python) | livekit/livekit_composite | DeepWiki | LiveKit CLI Setup | LiveKit Docs | Rust SDKs | livekit/livekit_composite | DeepWiki | Diagnosing Connection Errors with Connection Test Utilityhundreds-evening-11581
12/17/2025, 10:23 AMtall-airline-16756
12/17/2025, 10:23 AMawait session.start(room=ctx.room, agent=...). If you can, paste the small section where you create/start the AgentSession.
1. Check audio output is enabled
• If you set room options, ensure audio_output=True. If using an avatar worker, audio may be handled differently.
1. Verify the agent was dispatched and started a job
• Run:
lk agent status
lk agent logs
Share any lines showing AgentSession started, published audio track, or exceptions.
1. Test TTS/console locally
• Try uv run src/agent.py console (or a minimal example that calls session.start() and session.generate_reply(...)) to confirm TTS/LLM will produce audio locally.
1. Confirm env and token/project match
• You already redacted secrets — confirm LIVEKIT_URL exactly matches the URL in the agent logs and the Playground project. (No action if they already match.)
1. Browser DevTools
• In the Playground, open DevTools → Console & Network. Look for WebSocket events or log lines when the room joins and when tracks are published; paste any relevant errors or warnings.
If you prefer paste here:
• The AgentSession start code (redact secrets),
• Output of lk agent status and recent lk agent logs.
I’ll analyze those and tell you the exact next step.
Sources: Voice AI quickstart | LiveKit docs | Virtual avatar plugins | LiveKit Docs | Agent session | LiveKit docs | Deploying to custom environments | LiveKit docshundreds-evening-11581
12/17/2025, 10:25 AMtall-airline-16756
12/17/2025, 10:25 AMawait session.start(room=ctx.room, agent=...)
1. Confirm the agent name used in your rtc handler or dispatch, and how you generate the room token in Playground. If you dispatch by agent name, the name must match the token/dispatch rule.
2. Share these CLI outputs (paste here):
• lk agent status
• lk agent logs (last ~100 lines)
1. While Playground is connected, open browser DevTools → Console/Network and paste any WebSocket events or console logs around room join/publish time.
2. Quick check you can run now:
• From the machine running the agent, watch for a publish event in logs while Playground is connected. Run lk agent logs --follow and then connect via Playground; paste any new lines about published audio track or errors.
Send the code snippet and those outputs and I’ll tell you the exact change to make.hundreds-evening-11581
12/17/2025, 10:28 AMtall-airline-16756
12/17/2025, 10:29 AMno agents found because the CLI is querying the project currently selected for the command (it shows "Using project [testproject]") while your local worker registered under the other project (test_project / the URL wss://testproject-u43es40w.livekit.cloud). The agent is running but the CLI is looking in a different project.
Do these checks and paste the results:
1. Explicitly list agents for the project the agent registered with:
lk agent list --project test_project
1. Confirm the CLI project selection and any local override:
◦ Run lk project list and verify which project has the *.
◦ Check for a livekit.toml in your agent directory that may be overriding the default:
cat livekit.toml
1. Show agent registration from the agent logs (while agent is running):
lk agent logs --follow
Paste the lines that mention registration (the lines showing the worker id and URL).
1. If lk agent list --project test_project still shows no agents, run:
lk agent list --project test_project --verbose
and paste that output.
Once you paste the outputs (especially the lk agent list --project test_project result and the livekit.toml contents), I’ll tell you the exact change to make so `lk agent status`/`lk agent list` show your running agent and so the Playground can dispatch to it.hundreds-evening-11581
12/17/2025, 10:35 AMtall-airline-16756
12/17/2025, 10:35 AMlk agent list --project test_project still shows “Using project [testproject]” and “No agents found.”
Two important points:
• The CLI’s --project and lk project set expect the project identifier/subdomain (e.g., testproject-u43es40w), not the friendly name with underscores (test_project).
• A livekit.toml in your current directory can override the CLI default project.
Please run these commands and paste the outputs:
1. Show the exact projects and which is set:
lk project list
1. Try listing agents with the project subdomain your agent registered to (use the subdomain shown in your agent logs, e.g. testproject-u43es40w):
lk agent list --project testproject-u43es40w
1. Check for a local override file:
cat livekit.toml
(if the file doesn’t exist, say “no file”)
If the agent then appears with lk agent list --project <subdomain>, run:
lk project set testproject-u43es40w
lk agent status
and confirm the agent shows as RUNNING.
Paste the outputs of steps 1–3 and I’ll tell you the exact edit or command to make the CLI and Playground use the same project so dispatch/publishing works.hundreds-evening-11581
12/17/2025, 10:36 AMtall-airline-16756
12/17/2025, 10:36 AMlivekit.toml points to the correct subdomain and agent id.
Do this now so the CLI and Playground use the same project and we can confirm the agent is visible:
1. Set the project to the subdomain:
lk project set testproject-u43es40w
1. Verify agent visibility:
lk agent list
lk agent status
Paste the outputs here. If the agent appears, reconnect the Playground and watch lk agent logs --follow — paste any new lines about AgentSession started or published audio track. If the agent still doesn't appear, paste the outputs from steps 1–2 and your lk agent logs --follow output and I’ll tell you the exact next step.hundreds-evening-11581
12/17/2025, 10:37 AMtall-airline-16756
12/17/2025, 10:38 AMlk cloud auth
Sign in with the same LiveKit account you used for the Playground.
3) Explicitly list agents using the agent subdomain (exact value from logs)
• Replace <subdomain> with the subdomain from the agent logs (e.g. testproject-u43es40w):
lk agent list --project <subdomain>
lk agent list --project <subdomain> --verbose
4) Confirm your local config (.env and livekit.toml)
• Paste the contents (redact API secrets) of:
◦ livekit.toml (you already showed it; confirm its location: is it in ~/Work/agent-starter-python?)
◦ .env (show LIVEKIT_URL value and confirm it matches the agent logs' URL)
• If LIVEKIT_URL differs from the agent logs' URL, update it to match the subdomain the agent registered to.
5) If lk agent list --project <subdomain> still shows "No agents found"
• Run lk agent logs --follow while you connect the Playground and paste any new log lines that appear.
• Run lk project list and paste its output so I can confirm which project is currently set by the CLI.
What I need from you now
• The exact registration line(s) from your running agent logs (the lines showing the worker id and URL).
• Output of:
◦ lk agent list --project testproject-u43es40w --verbose
◦ lk project list
◦ Confirmation of where livekit.toml is located and your `.env`'s LIVEKIT_URL value (redact secrets).
Once you paste those, I’ll tell you the exact command or file edit to make the CLI show your running agent and get the Playground dispatching audio.hundreds-evening-11581
12/17/2025, 10:39 AMtall-airline-16756
12/17/2025, 10:39 AMlk project list
2) Re-authenticate the CLI so it uses the same LiveKit account as the Playground:
lk cloud auth
(Complete the login flow, then re-run lk project list.)
3) Explicitly list agents against the subdomain while forcing the config file load:
lk agent list --project testproject-u43es40w --config ./livekit.toml --verbose
4) Show the agent registration lines from the running agent logs (paste the exact lines):
lk agent logs --follow
Look for lines like registered worker {"id": "...", "url": "wss://<subdomain>.livekit.cloud", ...} and paste those lines.
5) Confirm your .env values (redact secrets) — I only need the LIVEKIT_URL value and to know which env file you loaded:
• Which file did you load? (.env, .env.local, etc.)
• Value of LIVEKIT_URL (redact token parts), e.g. <wss://testproject-u43es40w.livekit.cloud>
Why each step:
• lk project list verifies CLI project selection.
• lk cloud auth ensures CLI credentials match the Playground account.
• --config ./livekit.toml forces the CLI to use the same local config the agent is using.
• Agent log lines confirm the exact subdomain the agent registered to.
• .env check confirms the agent and CLI are pointing to the same LiveKit URL.
After you paste the requested outputs I’ll tell you the single exact command or file edit to make the agent appear in lk agent list and for the Playground to dispatch audio.hundreds-evening-11581
12/17/2025, 10:40 AMtall-airline-16756
12/17/2025, 10:40 AMlk and can be dispatched:
1. Set the CLI project to the agent's subdomain:
lk project set testproject-u43es40w
1. Re-authenticate the CLI to ensure it uses the same account as the Playground:
lk cloud auth
Complete the login flow in the browser.
1. Ensure your agent process and CLI point at the same config:
• Confirm LIVEKIT_URL in the env file you load (you said load_dotenv(".env.local")) equals:
<wss://testproject-u43es40w.livekit.cloud>
• Confirm livekit.toml in your agent directory has:
[project]
subdomain = "testproject-u43es40w"
1. Now verify agent visibility:
lk agent list
lk agent status
1. While Playground is connected, follow agent logs to watch for session start / publish events:
lk agent logs --follow
Look for lines like AgentSession started and published audio track.
If after step 1–4 the CLI still shows “No agents found,” paste these exact outputs:
• lk project list
• lk agent list --verbose
• The LIVEKIT_URL value from .env.local (redact secrets)
I’ll tell you the single change needed based on those outputs.