how can i delete agent when i'm getting twirp erro...
# ask-ai
m
how can i delete agent when i'm getting twirp error internal: agent not found
t
Thanks for reaching out, Droxy. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Hey there! The error "Twirp error: internal: agent not found" usually pops up when the agent ID you're trying to delete isn't in the system. This might happen if the agent was already deleted, never created, or if the ID you entered is a bit off. Here’s how you can fix it: 1. First, check that the agent actually exists by running
lk agent list
. This will show you if the agent ID is part of your project. 2. Make sure you’re using the right agent ID. If you have a
livekit.toml
file in your folder, it can help resolve the agent ID automatically. If not, just provide the ID directly with the
--id
flag. 3. To delete the agent, use:
lk agent delete --id CA_yourAgentId
. If your directory has a properly set up
livekit.toml
, you can simply run
lk agent delete
. 4. Double-check that you’re working in the correct project, since agents are tied to specific projects. If you’ve confirmed the agent ID exists but you’re still seeing the error, it might mean the agent was just deleted recently and the system hasn’t fully updated yet. Sources: autocomplete/fish_autocomplete | Agent deployment CLI reference | LiveKit Docs | LiveKit CLI | livekit/livekit_composite | DeepWiki