how do i update the secrets for my agent deployed ...
# ask-ai
d
how do i update the secrets for my agent deployed on livekit cloud? i noticed one of the secrets in my .env file is not available when my agent starts, even though i can see the secret when i use
lk agent secrets
somehow the agent container doesn’t mount some secrets when it starts (i have tried restarting the agent and redeploying the agent) i have also tried lk agent update-secrets --secrets “KEY=VALUE” the secret i’m referring to here is the MONGODB_ATLAS_URI (other secrets in my .env seem to mount correctly to the livekit agent container and are available)
t
Thanks for reaching out, George. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Let's work together to update the secrets for your agent deployed on LiveKit Cloud and resolve the missing
MONGODB_ATLAS_URI
secret. Here’s a simple step-by-step guide to help you through it: 1. First, use the
lk agent update-secrets
command to add or update your secret. For example:
lk agent update-secrets --secrets "MONGODB_ATLAS_URI=your_connection_string"
2. Next, double-check that your secret is set up correctly by listing all secrets: `lk agent secrets`This will display the secret names and timestamps, though it won’t show the actual values. 3. Make sure the secret name is formatted properly—using letters, numbers, underscores, and keeping in mind that it’s case-sensitive—and that it doesn’t exceed the 16KB size limit. 4. Take a moment to check your agent’s status to ensure it’s running smoothly without any errors:
lk agent status
5. Finally, stream the agent logs to spot any runtime issues related to the secret:
lk agent logs
If you’re still facing any trouble after trying these steps, please don’t hesitate to reach out. I’m here to help you get this sorted! Sources: autocomplete/fish_autocomplete | Secrets management | LiveKit Docs | Agent deployment CLI reference | LiveKit Docs