my setup : 1. agent is deployed on livekit cloud 2...
# ask-ai
b
my setup : 1. agent is deployed on livekit cloud 2. sip enabled 3. sip inbound trunk and dispatch rule created 4. exotel setup done for sip call now when i call on exotel number , agent picks up the call successfuly . this is normal setup. now i have deleted the agent from livekit cloud dashboard . so agent should not pick up the call , but what is happening is even if i deleted agent , agent is picking up the call and starts talking . why is this happening ?
✅ 1
t
Thanks for reaching out, Tejas. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Thanks — I hear your concern about the deleted agent still answering calls. You're saying you deleted the agent from the LiveKit Cloud dashboard but when you call the Exotel number the agent still picks up. Let’s clarify what’s happening and how to stop it. What’s happening • Deleting the agent deployment does not remove the SIP dispatch rule that routes inbound calls. The dispatch rule still tries to dispatch an agent for incoming SIP calls, so calls can continue to be answered until that rule is changed or removed. • There can also be a short propagation delay after changes, but the primary cause is the dispatch rule remaining active. What you can do now 1. Delete or disable the SIP dispatch rule that points to the (now-deleted) agent. ◦ CLI example:
Copy code
lk sip dispatch delete <dispatch-rule-id>
• Or list rules first to confirm:
Copy code
lk sip dispatch list
1. Verify the agent deployment and the dispatch rule are both removed. 2. If you manage agents programmatically, add a cleanup step to remove associated SIP dispatch rules when deleting agents. If you’d like, tell me: • The dispatch rule ID (or paste the output of
lk sip dispatch list
), and • Whether you deleted the agent from the dashboard or via API/CLI— —and I’ll guide you through the exact commands or next checks. Sources: Python SDKs | livekit/livekit_composite | DeepWiki | Creating SIP Inbound Trunks and Dispatch Rules with Python SDK | sip | livekit/livekit_composite | DeepWiki, with interactive elements
b
why it is related to dispatch rule . i know if i delete dispatch rule , it will not pick up. that is not my problem . my concern is why agent is picking why agent is still alive if i delete it and also on dashboard it is gone
t
Thanks — I understand you’re asking why the agent process still answers calls even though it’s been deleted from the dashboard. Short answer • Deleting the agent from the dashboard removes the control-plane configuration, but it does not guarantee the running agent process was immediately terminated. If the agent process is still running (or is draining a session) it remains connected to the dispatch system and can keep handling calls. Why that happens • The dashboard shows control-plane state; runtime processes (containers/VMs/pods) may continue running until they receive and act on a shutdown signal. • Agents perform graceful drain: they stop taking new jobs but let active sessions finish (there may be a drain timeout). • If the agent process was not shut down by your orchestrator (or deletion did not propagate), it stays registered and accepts jobs. What to check now (quick steps) 1. Confirm the agent process is stopped in your runtime (Kubernetes pod, container, VM). 2. Check agent logs for receipt of SIGTERM/SIGINT or "draining" messages. 3. Run CLI status/log commands if available:
lk agent status
and
lk agent logs
. 4. If the process is still running, terminate it manually (or via your orchestrator) so it disconnects from dispatch. If you want, share: • How the agent is deployed (LiveKit Cloud-managed, Kubernetes, Docker, etc.), and • Any recent agent logs showing shutdown/drain behavior — and I’ll guide you to the exact commands or next steps to fully stop that running instance. Sources: Self-hosted deployments | LiveKit Documentation | Server lifecycle | LiveKit Documentation | Deployment reliability on LiveKit Cloud | LiveKit | Why is my Agent insights data missing? | LiveKit, with interactive elements
b
(cellassist-py3.12) PS D:\Cellstrat\Cellassist_voice_agent\cellassist-agent-backend> lk agent logs WARNING: config file C:\Users\HP/.livekit/cli-config.yaml should have permissions 600 WARNING: config file C:\Users\HP/.livekit/cli-config.yaml should have permissions 600 Using project [ShreeAkshaya-DentalAethsetics] Using agent [CA_W5AhF6Xm82D2] no agent deployments found (cellassist-py3.12) PS D:\Cellstrat\Cellassist_voice_agent\cellassist-agent-backend> lk agent status WARNING: config file C:\Users\HP/.livekit/cli-config.yaml should have permissions 600 WARNING: config file C:\Users\HP/.livekit/cli-config.yaml should have permissions 600 Using project [ShreeAkshaya-DentalAethsetics] Using agent [CA_W5AhF6Xm82D2] no agents found (cellassist-py3.12) PS D:\Cellstrat\Cellassist_voice_agent\cellassist-agent-backend>
t
Thanks — I see your CLI output shows "no agent deployments found" and "no agents found" which matches the dashboard, yet the agent still answers calls. That means the control-plane record was removed but a runtime process is still connected to dispatch. What to check next 1. Confirm a running agent process on the host(s) where you deployed the agent: ◦ If you ran it locally (Python): look for a running Python process for your agent and stop it. ▪︎ Windows: open Task Manager and end the Python process; or run
tasklist | findstr python
then
taskkill /PID <pid> /F
. ▪︎ Linux/macOS:
ps aux | grep python
and
kill <pid>
(or
kill -9 <pid>
if needed). ◦ If Docker:
docker ps
-> find the agent container ->
docker stop <container-id>
. ◦ If Kubernetes:
kubectl get pods -n <namespace>
->
kubectl delete pod <pod-name>
or
kubectl scale deployment/<name> --replicas=0
. ◦ If Cloud Run / other managed service: stop or delete the service revision. 1. Inspect agent logs on that host to confirm shutdown behavior (look for SIGTERM/SIGINT or "draining" messages). If you see draining, the agent may be finishing active sessions before exiting. 2. After stopping the process, make a test call to confirm it no longer answers. Also verify
lk agent status
shows no active agents. If you tell me how you launched the agent (local Python, Docker, Kubernetes, or LiveKit Cloud-managed), I’ll give the exact commands to locate and stop the running instance. , with interactive elements