tall-fountain-87900
11/24/2025, 11:23 AMtall-airline-16756
11/24/2025, 11:23 AMtall-airline-16756
11/24/2025, 11:25 AMMODEL_LIVEKIT_ENVS secret), a missing .env file, and a deprecation + room-connection warning. Here’s how to fix each quickly.
What’s happening (summary)
• The agent cannot find LiveKit connection settings, causing: No LiveKit env found for model and the APIStatusError.
• The process warns .env is not found at /app/.env, so environment variables expected at startup are not loaded.
• The Bey plugin specifically expects a secret named MODEL_LIVEKIT_ENVS (missing).
• padding_duration is deprecated (warning only).
• The agent also warns the room connection wasn’t established within 10s — usually because job_ctx.connect() wasn’t called early or the agent failed to authenticate due to missing envs.
Immediate fixes (do these in order)
1. Create/load a .env (for local/dev) or inject env vars in your deployment:
◦ Add at least:
▪︎ LIVEKIT_URL=<your_livekit_url>
▪︎ LIVEKIT_API_KEY=<your_api_key>
▪︎ LIVEKIT_API_SECRET=<your_api_secret>
1. Provide the MODEL_LIVEKIT_ENVS secret expected by the Bey plugin:
◦ Option A — environment variable (quick test / local):
▪︎ In .env set:
MODEL_LIVEKIT_ENVS={"LIVEKIT_URL":"wss://...","LIVEKIT_API_KEY":"...","LIVEKIT_API_SECRET":"..."}
• Option B — cloud secret (production):
◦ Add MODEL_LIVEKIT_ENVS into your secret manager (e.g., Google Secret Manager) with the same JSON payload and ensure the service account has access.
1. If using LiveKit agent CLI to update secrets in deployed agents, use the agent CLI to inject secrets (example pattern):
◦ lk agent update-secrets --secrets "LIVEKIT_URL=..." --secrets "LIVEKIT_API_KEY=..." --secrets "LIVEKIT_API_SECRET=..."
(Use your deployment’s specific CLI/secret workflow to add MODEL_LIVEKIT_ENVS similarly.)
1. Replace deprecated parameter:
◦ Update any Silero VAD config using padding_duration to prefix_padding_duration to remove the warning.
1. Ensure the agent connects to the room early:
◦ Call await job_ctx.connect() (or equivalent) early in your job handler so the room connection is established within the expected timeout.
Quick verification steps
• Restart the agent process after adding envs/secrets.
• Confirm logs no longer show the No LiveKit env found for model or Secret 'MODEL_LIVEKIT_ENVS' not found errors.
• Confirm room connection succeeds (no 10s warning).
If you want, tell me:
• Whether you’re running locally or in GCP/k8s/LiveKit Cloud, and
• The exact format you prefer to store the secret (env var JSON vs separate LIVEKIT_* vars),
and I’ll give the exact commands/snippet to add the secret for that environment.
Sources: Secrets management | LiveKit Docs | Company directory phone assistant | LiveKit Docs | Next.js quickstart | LiveKit docs | Agent deployment CLI reference | LiveKit docs | Deploying to custom environments | LiveKit Docstall-fountain-87900
11/24/2025, 11:27 AMtall-airline-16756
11/24/2025, 11:28 AMMODEL_LIVEKIT_ENVS exists and contains the LiveKit creds Bey expects. Anam likely uses the separate LIVEKIT_* vars while Beyond Presence requires MODEL_LIVEKIT_ENVS (JSON/string with the same creds).
◦ Example .env entry (single line JSON):
MODEL_LIVEKIT_ENVS={"LIVEKIT_URL":"wss://test1-jl58sr5y.livekit.cloud","LIVEKIT_API_KEY":"API52yNX8hMFCRF","LIVEKIT_API_SECRET":"BaaP0KlLzyQohEO80inKnEB1fDyI66kB59IYGdHxxdAQ"}
1. Fix the LIVEKIT_URL value you posted — it contains Markdown-style link text and a mismatched host:
◦ Use the correct host and raw URL, e.g.:
LIVEKIT_URL="wss://test1-jl58sr5y.livekit.cloud"
• Ensure LIVEKIT_API_KEY and LIVEKIT_API_SECRET are correct and match the secret.
1. Where to put MODEL_LIVEKIT_ENVS
◦ Local/dev: add it to /app/.env (same place as your other LIVEKIT_* vars).
◦ Cloud/prod: add MODEL_LIVEKIT_ENVS to your secret manager (e.g., Google Secret Manager) or inject via your agent/infra secrets mechanism and ensure the service has access.
1. After adding/updating:
◦ Restart the agent process so it reloads env vars.
◦ Watch logs for the prior errors (No LiveKit env found for model and Secret 'MODEL_LIVEKIT_ENVS' not found) to confirm they disappear.
If you want, tell me:
• Are you running locally or in a cloud deployment (GCP / Kubernetes / LiveKit Cloud)?
• Do you want the exact command to add MODEL_LIVEKIT_ENVS to Google Secret Manager or to update your agent secrets?
I can provide the precise command/snippet for your environment.