square-flag-66304
12/24/2025, 10:01 AMtall-airline-16756
12/24/2025, 10:01 AMtall-airline-16756
12/24/2025, 10:01 AMlk agent create, lk agent deploy, or other)
• Is this a first-time deploy or an update?
• Any recent changes to your agent code, livekit.toml, Dockerfile, or environment variables
• Whether your project is linked via lk cloud auth and which LiveKit plan you’re on (free vs paid)
Common issues I’ll check for once you send those:
• Missing or misconfigured secrets/environment variables
• Missing or invalid livekit.toml or Dockerfile (the lk CLI can auto-create these)
• Docker build failures or runtime errors
• Plan limits (e.g., cold start behavior on free plans)
Send the error and answers above and I’ll walk through specific troubleshooting steps.
Sources: Deploying to production | LiveKit Docssquare-flag-66304
12/24/2025, 10:02 AMtall-airline-16756
12/24/2025, 10:02 AMuv add livekit-agents
If you need STT/LLM/TTS extras, add them like:
uv add "livekit-agents[deepgram,openai,elevenlabs]"
1. Confirm pyproject.toml contains the dependency, e.g.:
[project]
dependencies = [
"livekit-agents",
...
]
1. Re-run the command that failed:
lk agent create
Notes
• The permission warnings for C:\Users\Abcom/.livekit/cli-config.yaml are informational and won’t block deployment.
• If you still see the error after adding the dependency, tell me:
◦ The contents of your pyproject.toml (or paste the dependencies section)
◦ The command you ran and any new error output
I’ll guide you step-by-step from there.
Sources: Examples | livekit/livekit_composite | DeepWiki | Agents Framework | livekit/livekit_composite | DeepWiki | SDKs | livekit/livekit_composite | DeepWikisquare-flag-66304
12/24/2025, 10:04 AMtall-airline-16756
12/24/2025, 10:04 AMlk agent list
b. Delete the unwanted agent: lk agent delete <agent-id>
c. Retry: lk agent create
• Upgrade your plan to allow more agents (Ship or Scale unlock unlimited agent deployments):
◦ Open the LiveKit Cloud dashboard → Billing → Change Plan
◦ After upgrading, run lk agent create again
If you want, tell me the output of lk agent list and I can guide which agent to delete or walk you through upgrading.
Sources: LiveKit Pricing | Deploying to production | LiveKit Docssquare-flag-66304
12/24/2025, 10:10 AMtall-airline-16756
12/24/2025, 10:10 AMTypeError: bad argument type for built-in operation at req.register.agent_name = self._agent_name, and the repeated "failed to connect to livekit, retrying in 0s" warnings. I’ll help you fix that.
Quick checklist and next steps (please share answers or snippets requested so I can help further):
1. Ensure agent_name is a string
• In your handler registration (e.g., @server.rtc_session(...)) confirm you pass a quoted string:
@server.rtc_session(agent_name="your-agent-name")
async def entrypoint(ctx: JobContext):
...
• If you set agent_name from an env var, confirm it is loaded as a string.
1. Check environment variables
• Confirm these exist and are non-empty strings: LIVEKIT_API_KEY, LIVEKIT_API_SECRET, LIVEKIT_URL.
• Paste the relevant lines (redact secrets) from your .env or how you load them (e.g., load_dotenv()).
1. Inspect how self._agent_name is set
• If you customized agent initialization, paste the code that sets _agent_name (or tell me if you use defaults). The value must be a Python str, not None/int/dict.
1. Verify dependency version
• Ensure livekit-agents is installed and up to date in your environment:
◦ Share pyproject.toml dependencies section or the output of pip show livekit-agents.
◦ If outdated, run: uv add livekit-agents (or update your dependency manager).
1. If you’ve done the above and still fail, share minimal logs and code
• Paste the small snippet where you register the agent and any env-loading code.
• If possible, paste the top ~10 lines of the worker traceback and the self._agent_name value right before the failing line (you can add a temporary debug print like print(type(self._agent_name), self._agent_name)).
If you prefer, paste:
• pyproject.toml dependencies section
• The @server.rtc_session(...) block
• How you load env vars
I’ll pinpoint the exact fix once I see those.
Sources: Repeater | LiveKit docs | Agent server options | LiveKit docs