When I delete an agent, does it clear every thing ...
# ask-ai
c
When I delete an agent, does it clear every thing attached to it? like the memory used etc?
t
Thanks for reaching out, Subham. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Thanks for reaching out! When you delete an agent in LiveKit, the system gently handles a cleanup process to keep everything running smoothly: • It stops all pending and active jobs linked to that agent. • Removes participants and tracks associated with the agent from the rooms. • Marks the agent as deleted within the system. This process takes care of clearing session-level data. However, the documentation doesn’t specifically mention if all memory usage tied to the agent is immediately and completely cleared. If you’d like, I’m happy to help dig deeper into memory deallocation or any resource cleanup questions you have—just let me know! Sources: livekit/livekit_cloud_agent.pb.go | pkg/rtc/room.go | cmd/lk/agent.go | Agent deployment CLI reference | LiveKit Docs
c
is a fresh deployment linked to the old agent?
t
Hi there! I just wanted to share a little insight about Fresh deployments in LiveKit. Each time you create a new deployment, it’s completely separate from any agents that might have been deleted before. So, there's no connection or reassociation with those deleted agents. If you have any other questions or need further clarification, I’m here to help! Sources: Agent deployment CLI reference | LiveKit Docs | protobufs/livekit_agent_dispatch.proto | cmd/lk/agent.go | Agent deployment CLI reference | LiveKit Docs
c
how to use inbound trunks in livekit cloud?
t
I'm here to help you get started with using inbound trunks in LiveKit Cloud. Here's a simple guide to walk you through the process: 1. Create an Inbound Trunk: You can easily set this up using the LiveKit CLI, Cloud dashboard, or SDKs. For instance, with the CLI, just create a JSON file containing your trunk configuration and run
lk sip inbound create inbound-trunk.json
. If you want, I can help you create this file! 2. Set Up a Dispatch Rule: This step lets you route incoming calls to a LiveKit room. You might want to send each caller to a unique room by using a specific prefix. If you’d like, I can guide you through setting this up. 3. Enable Features: You have the option to turn on helpful features like noise cancellation or caller filtering within your trunk configuration to enhance call quality. 4. Manage Trunks: Whenever you need to list, update, or delete trunks, the CLI or SDKs have you covered. Feel free to ask if you want tips on managing these smoothly. If you’d like more detailed instructions or support with any particular step or feature, just let me know—I’m happy to assist you! Sources: Inbound calls with Twilio Voice | LiveKit Docs | packages/livekit-server-sdk/src/SipClient.ts | livekit-api/livekit/api/sip_service.py | src/main/kotlin/io/livekit/server/SipServiceClient.kt | SIP inbound trunk | LiveKit Docs
c
While triggering calls, i am getting issues where the agent's audio is coming with breaks, what can be the reason, I am have integrated with telephony,
t
I'm sorry to hear you're experiencing audio breaks during agent calls when using telephony in LiveKit. This can be frustrating, but don’t worry—we can work through it together! These issues often stem from interruption handling, buffer management, or network/audio processing challenges. Here are some helpful steps you can try: • Disable Interruptions: If interruptions aren’t necessary for your setup, setting
allow_interruptions=False
can help keep the audio playback smooth and uninterrupted. • Configure Interruption Thresholds: Adjust parameters like
min_interruption_words
to avoid interruptions happening too soon. • Enable Buffered Playback: Using the Multimodal Agent API allows for smart buffering and synchronized audio playback, which can really enhance call stability. • Implement Noise Cancellation: Turning on background noise and echo cancellation for SIP agents can make a big difference in audio clarity. • Use WebRTC: Make sure WebRTC is handling audio transport, as it’s designed for low-latency audio transmission and can improve overall call quality. Trying these steps should help reduce audio breaks and make your calls sound much better. If you’d like, I’m here to guide you through setting any of these up—just let me know! Sources: livekit-agents/livekit/agents/voice/agent_activity.py | OpenAI and LiveKit partner to turn Advanced Voice into an API | SIP troubleshooting guide | LiveKit Docs
c
Copy code
{
  "message": "inference is slower than realtime",
  "level": "WARNING",
  "name": "livekit.plugins.silero",
  "room": "outbound_+917978884674_1757941995",
  "delay": 2.054637625999984,
  "pid": 97,
  "job_id": "AJ_va2u8MCy9nVH",
  "timestamp": "2025-09-15T13:13:25.012939+00:00"
}
getting the above error
t
I understand that seeing the 'inference is slower than realtime' warning in the LiveKit Silero plugin can be a bit concerning. This message appears when the time taken for voice activity detection (VAD) inference is longer than the audio window being processed. This might happen because of a few reasons: • CPU Utilization: The ONNX runtime uses only 1 thread to keep things stable, which can sometimes slow down inference. • Execution Provider: By default, the plugin uses the CPU and doesn’t take advantage of GPU acceleration. • Resampling Overhead: If your input audio sample rate is different from what the model expects (8kHz or 16kHz), resampling adds extra processing time. To help improve this, here are some friendly tips you can try: • Pre-warm the VAD model during your agent’s initialization to avoid initial delays. • Make sure your system has enough CPU resources available for inference. • Try to provide audio input at 16kHz or 8kHz to skip the resampling step. • If your setup supports it, consider disabling
force_cpu
so the plugin can use GPU acceleration for faster inference. Following these steps should help reduce the inference latency and prevent that warning from popping up. If you have any questions or need a hand with this, please don’t hesitate to reach out—I’m here to help! Sources: plugins/silero/src/vad.ts | livekit-plugins/livekit-plugins-silero/livekit/plugins/silero/onnx_model.py
c
Copy code
{
  "message": "process memory usage is high",
  "level": "WARNING",
  "name": "livekit.agents",
  "memory_usage_mb": 561.1015625,
  "memory_warn_mb": 500,
  "memory_limit_mb": 0,
  "pid": 100,
  "job_id": "AJ_LfxJhBBcDpyk",
  "timestamp": "2025-09-15T13:15:32.144331+00:00"
}
can I check the memory assigned and delete some of them if required?
t
I’m glad you reached out! LiveKit keeps a close eye on memory usage for agents and gives you a heads-up when things get a bit too high. Here’s a friendly guide to help you manage memory smoothly: • Check Memory Usage: You can easily peek at real-time stats like current and peak memory use, CPU load, and session details right from the LiveKit Cloud dashboard. • Automatic Cleanup: If memory usage goes beyond the set limit, don’t worry—the agent process will automatically stop to free up resources. • Manual Cleanup: While LiveKit doesn’t have direct APIs to delete specific memory chunks, you can definitely improve things by adding cleanup functions in your application code to free memory when needed. If you’d like, I’m here to help you optimize memory usage or set up the right thresholds for your agents. Just let me know! Sources: cmd/lk/agent.go | livekit-agents/livekit/agents/ipc/supervised_proc.py | agents/src/ipc/supervised_proc.ts | components/media_lib_sal/include/media_lib_mem_trace.h | src/llama-context.h