how to delete an agent by CLI?
# ask-ai
b
how to delete an agent by CLI?
t
Thanks for reaching out, Rongrong. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
To delete an agent using the LiveKit CLI, you can simply use this command:
Copy code
lk agent delete --id CA_MyAgentId
Just swap out
CA_MyAgentId
with the ID of the agent you'd like to delete. If you have a
livekit.toml
configuration file in your current directory, the CLI will automatically use the agent ID from there, so you might not even need to include the
--id
flag. When you run this command, the CLI will kindly ask you to confirm by saying, "Are you sure you want to delete agent [agentID]?" Just confirm, and you’re good to go. Once the deletion is successful, you’ll see a message like "Deleted agent [CA_MyAgentId]." If something goes wrong, the CLI will provide an error message explaining what happened. To double-check that the agent has been deleted, you can run
lk agent status
or list all agents with
lk agent list
. I’m here if you need any more help along the way! Sources: Agent deployment CLI reference | LiveKit Docs | cmd/lk/dispatch.go
✅ 1