breezy-keyboard-19095
10/03/2025, 7:14 AMtall-airline-16756
10/03/2025, 7:14 AMtall-airline-16756
10/03/2025, 7:14 AMlk agent update and lk agent update-secrets. Both are used to modify the configuration of a LiveKit Cloud Agent and will restart the agent after making changes, but they each have their own special focus:
• lk agent update: Think of this as your all-in-one update command. It lets you change both metadata and secrets for an agent. You can update secrets using the --secrets or --secrets-file flags, and once done, it restarts the agent workers to apply the changes.
• lk agent update-secrets: This one is designed just for updating the secrets of an agent. It comes with an --overwrite flag if you want to replace all existing secrets with a fresh set. Like the other command, it also restarts the agent after updating.
So, if your goal is simply to update secrets, lk agent update-secrets is a great, focused choice. But if you need to update a wider range of settings, including metadata, then lk agent update is the way to go.
Sources: cmd/lk/agent.go | Agent deployment CLI reference | LiveKit Docs | Secrets management | LiveKit Docsbreezy-keyboard-19095
10/03/2025, 7:15 AMtall-airline-16756
10/03/2025, 7:15 AMlivekit.toml configuration file there.
2. Deploy the Updated Code: In your project directory, just run this command:
`lk agent deploy`This will package your code, upload it to LiveKit Cloud, build a new version, and deploy it seamlessly.
3. Graceful Update: The best part is that during deployment, your current sessions won’t be interrupted. Old instances will finish their work gracefully while the new ones take over incoming sessions.
4. Optional Secrets: If you need to add any secrets, simply include them like this:
lk agent deploy --secrets KEY1=VALUE1 --secrets KEY2=VALUE2
5. Verify Deployment: After deploying, you can check how things are going with:
lk agent status
6. Rollback (if needed): And if you ever run into any issues, don’t worry—you can roll back to a previous version easily:
lk agent rollback --version <version-number>
This way, your update happens smoothly without any service disruption. If you have any questions or need a hand with any step, just let me know—I’m here to help!
Sources: cmd/lk/agent.go | Deploy and scale agents on LiveKit Cloud