lk deploy gives an error `package livekit-agents n...
# ask-ai
a
lk deploy gives an error
package livekit-agents not found in any project files. Are you sure this is an agent?
✅ 1
t
Thanks for reaching out, Ahron. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Thanks — I’m responding about the
lk deploy
error: "package livekit-agents not found in any project files. Are you sure this is an agent?" Quick checklist and next steps to fix it: 1. Confirm your project is initialized as an agent ◦ Run
lk agent init my-agent --template agent-starter-python
(or
--template agent-starter-node
) to scaffold a proper agent project if you haven’t. 1. Verify dependencies ◦ For Python: ensure
livekit-agents
appears in
pyproject.toml
or
requirements.txt
. ◦ For Node.js: ensure
@livekit/agents
appears in
package.json
. ◦ Install deps: Python projects often use `uv sync`; Node uses
pnpm install
(or
npm/yarn
if applicable). 1. Ensure required config files exist ◦ Confirm there’s a
livekit.toml
(generated by
lk agent create
or
lk agent init --deploy
) with agent metadata. 1. Use the correct initial command ◦ Use
lk agent create
for the first registration/deploy;
lk deploy
expects a recognized agent project. If you’d like, paste: • your project root file list (showing `pyproject.toml`/`package.json`), • the exact command you ran, • and whether this is Python or Node — I’ll point out the missing piece and exact commands to run. Sources: Google AI and LiveKit | LiveKit Documentation | Voice AI quickstart | LiveKit Documentation | Agents (Node.js) | livekit/livekit_composite | DeepWiki | examples/drive-thru | livekit/livekit_composite | DeepWiki | Agents (Python) | livekit/livekit_composite | DeepWiki, with interactive elements
a
Copy code
lk agent deploy
Using project [myproject]
Using agent [CA_xxxxxxxxx]
Detected agent language [python.pip]
unable to deploy agent: failed to get agent
I have a livekit.toml
t
Thanks — I’m responding about your
lk agent deploy
failure: "unable to deploy agent: failed to get agent" even though you have a
livekit.toml
. A few likely causes and quick checks to narrow it down: 1. Confirm the agent is registered ◦ Run
lk agent list
and check the agent ID shown matches
agent.id
in your
livekit.toml
. 1. Check
livekit.toml
contents ◦ Paste the
agent.id
and
project.subdomain
(or the whole file if you’re comfortable). If either is missing/incorrect,
lk agent deploy
can fail. 1. Verify project context ◦ You ran
Using project [myproject]
— ensure that is the same project where the agent was created. If not, set the correct project or pass
--project
to the command. 1. First-time deploy vs update ◦ If you never ran
lk agent create
, run that first to register the agent.
lk agent deploy
expects a previously created/registered agent. If you can, share: • Output of
lk agent list
• The contents of your
livekit.toml
(or at least
agent.id
and
project.subdomain
) • The exact commands you ran before
lk agent deploy
I’ll use those to give the exact next command or point out what to fix. Sources: Server-side | livekit/livekit_composite | DeepWiki | Agents (Node.js) | livekit/livekit_composite | DeepWiki | examples/drive-thru | livekit/livekit_composite | DeepWiki | Agents (Python) | livekit/livekit_composite | DeepWiki | Google AI and LiveKit | LiveKit Documentation, with interactive elements
a
No agents found
t
Thanks — I see “No agents found,” which explains why
lk agent deploy
fails: the agent hasn’t been registered in the project yet. What to do next (quick, in-order steps): 1. Create/register the agent (first-time setup) ◦ Run:
lk agent create --name my-agent
◦ This will register the agent with LiveKit Cloud and generate/update
livekit.toml
. 1. Verify the agent exists ◦ Run:
lk agent list
◦ Confirm the returned agent ID matches
agent.id
in
livekit.toml
. 1. Deploy after creation ◦ Run:
lk agent deploy
(or
lk agent deploy --agent <agent-id>
if you want to be explicit). If you prefer, paste the contents of your
livekit.toml
(or at least
agent.id
and
project.subdomain
) and the exact commands you’ve run; I’ll confirm the next command and any fix needed. , with interactive elements
a
the dockerfile has COPY requirements.txt ./ even I'm using pyproject.toml
t
Thanks — I’m responding about the Dockerfile referencing
requirements.txt
while your project uses
pyproject.toml
. What’s happening: some agent Dockerfile templates still use
pip
+
requirements.txt
. That conflicts with
pyproject.toml
+
uv
(the recommended Python setup). You should align the Dockerfile with your package manager. Recommended next steps: 1. If you want to use `uv`/`pyproject.toml` (recommended) ◦ Update the Dockerfile to copy
pyproject.toml
and
uv.lock
(if present) and run
uv sync --locked
(or
uv sync
) instead of
pip install -r requirements.txt
. ◦ Example steps in Dockerfile: ▪︎ COPY pyproject.toml uv.lock ./ ▪︎ RUN uv sync --locked 1. If you prefer `pip`/`requirements.txt` ◦ Generate
requirements.txt
from your lock/build and keep the existing
COPY requirements.txt .
+
pip install -r requirements.txt
flow. 1. Easier: regenerate a correct agent scaffold ◦ Run
lk agent init my-agent --template agent-starter-python
to get a starter Dockerfile that matches
pyproject.toml
. After you fix the Dockerfile: • Re-run
lk agent create --name my-agent
to register the agent (this updates/generates
livekit.toml
). • Then
lk agent deploy
. If you want, paste your current Dockerfile and
pyproject.toml
and I’ll show the exact Dockerfile edits. Sources: examples/drive-thru | livekit/livekit_composite | DeepWiki | Agents (Python) | livekit/livekit_composite | DeepWiki | examples/survey | livekit/livekit_composite | DeepWiki | pkg/agentfs/examples/python.uv.Dockerfile | examples/Dockerfile-example, with interactive elements