How do i update changes in my backend to go to the...
# ask-ai
e
How do i update changes in my backend to go to the cloud using livekit cloud and uv
✅ 1
t
Thanks for reaching out, Brian. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Thanks — I can help with that. I’m responding to your question about how to push backend changes to LiveKit Cloud when you’re using “uv.” Quick question before I give exact steps: by “uv” do you mean the Python package manager/toolchain (the Astral
uv
workflow used with LiveKit agents), or something else? Also, what kind of backend are you updating (a LiveKit Agent written in Python, a custom server, or something else)? Knowing that will let me give precise commands. If you mean a LiveKit Python agent using
uv
, here’s the typical workflow you can follow to update code and deploy it to LiveKit Cloud: 1. Prepare your environment ◦ Make sure the LiveKit CLI is installed and authenticated to your LiveKit Cloud project: ▪︎
lk cloud auth
1. Build & deploy the updated agent a. From your project root, rebuild and deploy with: ▪︎
lk agent deploy
▪︎ This builds a container image from your code (the Dockerfile typically runs
uv sync --locked
to install exact dependencies from
uv.lock
), then performs a rolling deployment so new instances run the updated code while old instances drain existing sessions. a. If this is the first deploy for a new agent: ▪︎
lk agent create
(creates config and deploys the agent) 1. Update secrets or environment variables (if your backend changes require them) ◦
lk agent update-secrets --secrets API_KEY=new-value --overwrite
◦ This updates environment variables and restarts the agent. 1. Verify the deployment ◦ View logs and deployment status: ▪︎
lk agent logs
◦ Confirm new sessions are routed to the new version while old sessions drain. 1. Build considerations ◦ Ensure your
Dockerfile
uses
uv sync --locked
(or equivalent) so dependency versions are reproducible. ◦ Use
.dockerignore
to keep build context small. If you use CI/CD (recommended) • Automate deploys with GitHub Actions (there’s a
livekit/deploy-action@v2
) so pushes to main can trigger
lk agent deploy
. If “uv” is something else or if your backend is not a LiveKit agent, tell me: • Which language/framework your backend uses (Python agent, Node, Go, etc.) • Whether you use a Dockerfile already or rely on a buildpack • Any error messages you see when running
lk agent deploy
or building locally Once you confirm “uv” and your backend type, I’ll give the exact commands and a sample Dockerfile or CI workflow tailored to your setup. Sources: Google AI and LiveKit | LiveKit Documentation | Build Your First AI Voice Agent in Python: Complete Tutorial | LiveKit | Deployment reliability on LiveKit Cloud | LiveKit | examples/drive-thru | livekit/livekit_composite | DeepWiki | examples/survey | livekit/livekit_composite | DeepWiki, with interactive elements