modern-winter-66316
12/06/2025, 7:34 AMtall-airline-16756
12/06/2025, 7:34 AMtall-airline-16756
12/06/2025, 7:34 AMagent_name?
• When did the issue start (recent change or deploy)?
• What symptoms occur: timeouts, failures to connect, delays, wrong agent routed, or something else?
• Deployment details: cloud provider, instance type (e.g., t3/t4 vs m5/c5), and number of agent workers per agent_name.
If you prefer, paste one representative log block and I’ll point to the most likely causes and next steps.
Sources: SIP troubleshooting guide | LiveKit docs | Agent dispatch | LiveKit docs | Agents Framework | livekit/livekit_composite | DeepWiki | How to Get Help from LiveKit | sip | livekit/livekit_composite | DeepWikimodern-winter-66316
12/06/2025, 7:34 AMtall-airline-16756
12/06/2025, 7:35 AMagent_name? If explicit, confirm the agent_name configured in the agent and in the dispatch rule.
• The exact state shown for the agent when a dispatch is attempted (e.g., "Running", "Active", and any recent state transitions).
• Any error messages or events in LiveKit Cloud (or your control plane) when a dispatch is sent.
• Deployment details: cloud provider, instance type (e.g., t3/t4 vs m5/c5), and number of agent workers registered for that agent_name.
• Whether this started after a config change or deploy, and if old dispatch rules/trunks were recently removed or updated.
Paste one log block and the `agent_name`/dispatch rule snippet and I’ll point to the most likely root cause and next steps.modern-winter-66316
12/06/2025, 7:35 AMtall-airline-16756
12/06/2025, 7:35 AMagent_name? If explicit, share the exact agent_name used in the agent and in the dispatch rule.
• A timestamped log excerpt from a failed dispatch attempt (agent-side or control-plane event) showing when the dispatch was sent and any agent events nearby.
• The agent state shown at the moment of the dispatch attempt (e.g., "Running", "Active", and any recent transitions).
• The dispatch rule configuration (rule type, conditions, and target agent_name or pool). Redact any sensitive tokens.
• Whether this started after a recent config change or deployment.
If you paste the agent_name, one representative log block, and the dispatch rule snippet, I’ll analyze likely causes (name mismatch, explicit-vs-automatic dispatch behavior, job timeout, or resource contention) and give precise next steps.modern-winter-66316
12/06/2025, 7:39 AMtall-airline-16756
12/06/2025, 7:39 AMcloud-english-teacher, the token using with_room_config(room_config), and the agent showing active but no dispatch logs.
Quick summary of likely causes and focused checks to run next:
1) Agent registration vs dispatch target
• Confirm the agent process registers with LiveKit using the exact agent_name string cloud-english-teacher. Even a subtle whitespace/casing difference will prevent routing.
• Check LiveKit Cloud UI for the agent’s reported agent_name (not just the agent ID) to confirm it matches the dispatch rule.
2) Token / roomConfig usage
• You said the token uses with_room_config(room_config) and includes agent_name. For explicit dispatch, the dispatch system looks for that agent_name on the room — verify the produced token actually contains the agent_name field at dispatch time. Capture the room creation payload (or the encoded token contents) and confirm roomConfig.agent_name == "cloud-english-teacher".
3) Agent startup / readiness
• Agent logs are empty for dispatch events. Confirm the agent process is registering as an agent worker (not just running). Look for a registration or heartbeat event on startup that includes the version and agent_name. If the agent exits quickly after startup or fails to complete registration, it won’t receive dispatches.
• Since you recently changed the entrypoint and Dockerfile, confirm the agent’s runtime is actually executing the agent code path (not only main:entrypoint but the code that calls LiveKit agent registration). Run a quick startup log that prints “registered as agent cloud-english-teacher” or similar.
4) Job timeout / immediate disconnect symptom
• Room disconnecting immediately suggests the dispatch system attempted to route the job but there was no agent connection within the job timeout window (default 10s). If no dispatch logs appear, it’s also consistent with dispatch never being scheduled due to token/room config mismatch.
• If you confirm agent is registering, consider increasing worker count for that agent_name or checking that the Cloud-hosted agent instance isn’t failing resource checks.
5) Recent deploy changes to verify
• You removed ServerType.AGENT and changed entrypoint. Verify those changes did not remove the code path that calls the LiveKit agent SDK registration APIs.
• Ensure the Docker image copied main.py and that main.py calls the agent registration flow on start.
Concrete next steps for you to run (quick checklist)
1. In LiveKit Cloud UI, confirm agent shows agent_name: cloud-english-teacher.
2. Capture one failed room creation token/payload and paste the roomConfig portion here to confirm agent_name.
3. Restart the agent container and paste the first 30s of logs — look for registration/heartbeat messages.
4. If agent logs remain empty, run locally (or add a debug log) to confirm the registration function is executed after your entrypoint change.
5. If agent registers correctly but still no dispatch, tell me the exact room creation timestamp and I’ll correlate with dispatch attempts.
If you want, paste the roomConfig JSON and the first 30s of agent startup logs and I’ll point to the exact mismatch or missing registration call.