How to delete agent from cloud in cloud itself? ca...
# ask-ai
c
How to delete agent from cloud in cloud itself? can I update a deployed agent in cloud?
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.
You're asking how to delete an agent from LiveKit Cloud and whether you can update a deployed agent in the cloud. Short answers: yes — delete and update are done via the LiveKit CLI, not the cloud UI. How to delete an agent 1. Run:
Copy code
lk agent delete --id CA_MyAgentId
Or, if you’re in the agent project directory with a `livekit.toml`:
Copy code
lk agent delete
lk agent destroy
is an alias for
delete
. This removes the agent and terminates its deployments. How to update a deployed agent • Deploy a new version (recommended):
Copy code
lk agent deploy
This uploads your updated code; LiveKit builds a new container and rolls it out with a rolling deployment so new sessions go to the new version while existing sessions finish on the old version (graceful shutdown period). • Update secrets or env vars without deploying code:
Copy code
lk agent update --secrets OPENAI_API_KEY=sk-xxx
This restarts agent servers and does not interrupt active sessions. • Rollback to a previous version (paid plans):
Copy code
lk agent rollback --id CA_MyAgentId --version 20250809003117
If you want, tell me your agent ID or whether you’re working from the project directory and I can give the exact command you should run next. Sources: Agent deployment CLI reference | LiveKit docs | Deploying to production | LiveKit Docs | Deploy and scale agents on LiveKit Cloud
c
So, it's not possible using cloud UI?
t
Correct — you cannot delete or update agents from the LiveKit Cloud web UI. Agent deletion, deployments, secret/env updates, rollbacks, and related management are performed using the LiveKit CLI (
lk
commands) as described earlier.
c
when using cloud ui to create a new agent, is it necessary to use inference? Will the cloud use my api keys instead of inference?
t
You're asking whether the Cloud UI requires LiveKit Inference when creating an agent and whether the cloud will use your API keys instead of Inference. Short answer: no — Inference is optional. • Using LiveKit Inference: you do not need to provide external AI provider keys. LiveKit handles provider access and billing for supported models. • Using your own provider/plugins: you must supply your own API keys (for example OpenAI) and can inject them securely as secrets via the UI or CLI. The agent running on LiveKit Cloud will use those keys you provide. If you want, tell me whether you plan to use LiveKit Inference or a specific provider (and which one) and I’ll give the exact steps to configure secrets or the recommended setup. Sources: Models | LiveKit Docs | Introducing LiveKit Inference: A unified model interface for voice AI | Introducing LiveKit Inference: A unified model interface for voice AI | Agent Builder | LiveKit docs | Deploying to production | LiveKit Docs
c
Why am I not able to start call using preview in livekit cloud. How can I debug into what is failing and what is the issue in it?
t
You’re asking why preview calls won’t start and how to debug them. Quick answer: preview sessions have limited observability, so debug steps differ from production. To help you further I need one or two details: are you using the Agent Builder preview or a deployed agent? And do you see any error message in the UI or browser console? If you’re using Agent Builder preview, try these steps: • Check browser console for JS errors and the network tab for failed requests. • Confirm microphone/camera permissions and that the browser tab isn’t blocked from media. • Run the Connection Test Utility to verify WebRTC, WebSocket, and TURN connectivity. • If preview fails silently, deploy the agent to production and test there — production sessions appear in Agent Observability where you can view logs, transcripts, and traces. • If you updated secrets/env recently, verify they’re correct (preview may behave differently than deployed runs). If you’re using a deployed agent instead of preview, also: • View runtime logs with
lk agent logs
via the CLI. • Check the project’s Telephony call logs if this is a SIP/telephony call. Send me: • Which mode (preview or deployed), • Any error text/screenshots or browser console/network log lines, • Your browser and OS. I’ll use that to pinpoint next steps. Would you like instructions for collecting the browser console logs or for running
lk agent logs
? Sources: Agent Builder | LiveKit docs | https://blog.livekit.io/streamline-troubleshooting-with-agent-observability/#/portal| | Log collection | LiveKit Docs | Create and configure a Plivo SIP trunk | LiveKit docs | Diagnosing Connection Errors with Connection Test Utility
c
I am using the agent builder in preview mode, no error is shown. browser edge, os; mac
t
Thanks — since you’re using Agent Builder preview on Edge for macOS and no UI error appears, try these targeted steps to uncover the failure: 1. Check browser permissions • In Edge: Settings → Cookies and site permissions → Microphone. Ensure LiveKit Cloud site is allowed and the correct mic is selected. 1. Inspect developer tools • Open DevTools (Cmd+Option+I) → Console and Network tabs. • In Console, look for errors about getUserMedia, WebRTC, or CORS. • In Network, filter for failed requests (status ≥400) or WebSocket connection errors. 1. Verify media acquisition • In Console, run:
Copy code
navigator.mediaDevices.getUserMedia({ audio: true }).then(s => console.log('ok', s)).catch(e => console.error(e))
This shows if the browser can access your mic. 1. Test connectivity • Temporarily switch networks (home vs. phone hotspot) to rule out firewall/TURN issues. • If you can, run the LiveKit Connection Test utility to validate WebRTC/TURN paths. 1. Agent Builder specific checks • Confirm the agent has a model and valid instructions selected. • Remove or simplify custom plugins/hooks to isolate the issue. • Try the same preview in a different browser (Safari or Chrome) to see if Edge-specific behavior is the cause. 1. If preview still won’t start, gather these diagnostics and share them: • A copy of Console errors (or a screenshot). • Any failed Network/WebSocket requests from DevTools. • Result of the getUserMedia check above. • Edge version and macOS version. I can walk you through collecting any of these logs or tell you which console lines to paste here for fast diagnosis—which would you prefer? Sources: Agent Builder | LiveKit docs
c
The start call is working, but the agent is not getting deployed to the room. So. I am not able to have the conversation in preview with agent.
t
You're saying the preview call connects but the agent itself never joins the room, so you can't converse. Here are focused checks and next steps to find the cause and fix it. 1) Confirm agent config in Builder • Ensure a model/provider is selected and instructions/flows are saved. • Remove custom plugins/hooks temporarily to rule out runtime errors in custom code. 2) Check Agent Builder preview logs (browser) • In Edge DevTools Console, look for errors about agent signaling, authentication, or runtime exceptions. • In Network, watch for WebSocket connections or HTTP requests to the agent runtime that fail or return 4xx/5xx. 3) Verify secrets and keys used by the preview agent • If your agent requires external API keys (plugins or direct provider use), ensure those secrets are configured for preview. Preview may behave differently if secrets are missing. 4) Confirm the preview runtime is starting • In Console/Network, look for a successful "agent started" or similar signal from the preview service. If you only see media negotiation (getUserMedia/WebRTC) but no agent runtime connect, the runtime likely failed to boot. 5) Reproduce in another browser or after reload • Try Chrome or Safari to rule out Edge-specific issues. • Hard refresh the Builder page and restart the preview session. 6) Test a minimal agent • Create a very simple agent (single-turn greeting) and run preview. If that joins the room, the issue is in your agent logic or integrations. 7) If you can collect diagnostics, share: • Console error lines or screenshots • Network request entries showing failures (WebSocket or agent runtime endpoints) • Whether your agent relies on external API keys/plugins I can walk you through capturing the exact console and network lines to paste here — would you like step-by-step instructions for that?
c
I am running the very basic scripts, the example provided when starting with the cloud UI. What should I do now?
t
Thanks — since you’re running the basic example and the preview call connects but the agent never joins the room, let’s narrow this down with a short checklist and a few quick diagnostics. Please try these in order and tell me the results you get. 1. Confirm model/provider selection • In Agent Builder, ensure a model (or LiveKit Inference) is selected and the agent’s instructions are saved. 1. Check missing secrets • Does the example require any API key (OpenAI, etc.) or plugins? If yes, add the secret in Builder’s secrets panel and retry preview. 1. Look for runtime connection attempts • Open Edge DevTools (Cmd+Option+I) → Console and Network. • In Network filter for WebSocket or requests to endpoints containing “agent”, “preview”, or the LiveKit runtime. Do you see requests that fail (4xx/5xx) or a WebSocket that closes immediately? 1. Search Console for runtime errors • In Console, search for keywords: “agent”, “runtime”, “preview”, “auth”, “token”, “error”, “exception”. • If there’s no obvious error, paste any Console lines mentioning agent runtime or authorization here. 1. Test getUserMedia vs agent runtime • Run in Console:
Copy code
navigator.mediaDevices.getUserMedia({ audio: true }).then(s => console.log('mic ok')).catch(e => console.error(e))
If mic works but runtime never connects, the issue is agent-side (runtime boot/auth), not media. 1. Try a different browser • Test preview in Chrome or Safari to rule out Edge-specific behavior. 1. Minimal isolate test • Create a brand-new minimal agent (single-turn text reply) using the same example template and run preview. Does that minimal agent join the room? 1. If still failing, collect these and share them here: • Console error lines or screenshots mentioning agent/runtime/auth. • Network entry (request URL + status) for the failed agent/runtime request or WebSocket. • Whether the agent requires external API keys and whether those secrets are set. • Edge version and macOS version. If you want, I can give exact steps to capture the Network/WebSocket entry to paste here. Which diagnostics would you like help collecting?
c
can I update the code to not use inference in agent builder?
t
Yes — you can update the Agent Builder code to not use LiveKit Inference. You do this by removing or replacing inference calls in the agent code and wiring your chosen provider directly (for example, OpenAI). Key steps: 1. Edit the agent code in Builder • Open the agent’s script in the Agent Builder editor. • Remove or replace any calls that route through LiveKit Inference and instead call your provider’s SDK or HTTP API from the agent runtime. 1. Add required API keys as secrets • In the Builder UI, open the Secrets panel and add your provider keys (for example
OPENAI_API_KEY
). • Reference those secrets from your code (use the environment variable name your runtime expects). 1. Keep the agent logic minimal while testing • Use a simple request/response call to your provider to verify the integration before adding complex flows. 1. Preview and deploy • Run Preview again. If preview won’t start the agent runtime, follow the diagnostics we discussed (Console, Network, getUserMedia check). • When ready, deploy the agent to production so full observability and
lk agent logs
are available. If you tell me which provider you want to use (OpenAI, Anthropic, etc.) and whether you need a code snippet for calling it from the Builder runtime, I’ll provide the exact example and the name of the secret to set.
c
But it shows I cannot edit code in builder
t
Thanks — you mentioned the Builder shows the code as non-editable. That can happen for a few common reasons. Try the checks below and tell me which applies. 1. Permission / role • Confirm your account has Owner/Admin or project-edit rights. Users with read-only roles can’t edit Builder code. 1. Locked template or example • Some built-in templates/examples are read-only in the Builder. If you opened an example, look for a Clone, Fork, or Create new agent from template action to make an editable copy. 1. Edit mode UI • In the Builder editor, look for an Edit or Customize button (often near the script). Click that to enable the code editor for the agent instance. 1. Workspace vs deployed agent • If you opened a deployed agent instance rather than the Builder draft, open the agent in the Builder (not the deployed view). Deployed agent code may be locked. 1. Clone locally and edit • If Builder editing is not available, you can clone the agent project locally, modify code, then deploy with the CLI (
lk agent deploy
). Let me know if you want the exact clone/deploy commands. Tell me: • Do you see an Edit/Clone button, or is it greyed out? • Are you using a template/example or your own agent? I’ll give the exact next step based on your answers.
c
Does cartesia have free inference credits on starter packs/
t
I don't have the answer you're looking for. You could also try asking your question: • in one of the other Slack channels or • to https://deepwiki.com/livekit/livekit_composite which is trained on all LiveKit source code If you find the answer, please post it here to help others!