limited-arm-86913
11/20/2025, 9:48 PMLIVEKIT_URL - Your LiveKit Cloud server URL
• LIVEKIT_API_KEY - An API key for your project
• LIVEKIT_API_SECRET - An API secret for your projecttall-airline-16756
11/20/2025, 9:49 PMtall-airline-16756
11/20/2025, 9:49 PMagent_name it auto-joins new rooms.
◦ Do not use the Playground for agent dispatch testing — Playground won’t trigger agent dispatch.
1. Or dispatch the agent explicitly
◦ If you want to target the agent or test immediately, dispatch it with the CLI:
▪︎ lk dispatch create --agent-name your-agent-name --room my-test-room
◦ Note: your log shows "agent_name": "". If you need targeted/manual dispatch, set agent_name when configuring your worker.
1. Verify agent status and logs
◦ Run lk agent status to confirm the agent is Running (not Sleeping).
◦ After creating the new room or dispatching, watch agent logs for job assignment and room connection entries.
1. Ensure frontend uses the same project
◦ Make sure your frontend connects to the same LIVEKIT_URL and uses tokens/credentials from the same project where the agent is deployed.
If you’d like, tell me:
• The room name you’re attempting to use (or whether it already exists), and
• Whether your agent was deployed with an agent_name set.
I can guide you through creating a new room or the lk dispatch steps and interpreting the agent log lines to confirm dispatch.
Sources: Secrets management | LiveKit Docs | Agent dispatch | LiveKit Docs | Agent deployment CLI reference | LiveKit docslimited-arm-86913
11/20/2025, 9:55 PMtall-airline-16756
11/20/2025, 9:56 PM--secrets, --secrets-file, or --secret-mount.
• Deployments or CLI-generated artifacts can reference multiple secrets; each secret name is tracked even though values are never shown.
To inspect what your agent has configured:
• Run:
lk agent secrets --id <your-agent-id>
This lists the secret names associated with that agent.
If you want, tell me the secret names you see (or paste the output of the command) and I’ll help you identify which are LiveKit vs. external-service secrets and whether any look unexpected.
Sources: Secrets management | LiveKit Docs | Agent Deployment & Docker | livekit/livekit_composite | DeepWiki | Agent deployment CLI reference | LiveKit docs | Deploying to production | LiveKit Docs | Deploying to custom environments | LiveKit Docslimited-arm-86913
11/20/2025, 9:57 PMtall-airline-16756
11/20/2025, 9:58 PMLIVEKIT_API_KEY / LIVEKIT_API_SECRET). Those injected values correspond to one of the keys listed in the dashboard.
How to identify/manage keys
• Compare the key IDs/creation timestamps shown in the dashboard to determine which key is newest or which was created for the agent deployment.
• If you need to know exactly which key the agent received, check deployment records or the Agent/Deployment configuration used at creation (the CLI or dashboard shows which key was referenced if a specific key was supplied).
• Use key rotation as usual: create a new key, update consumers, then revoke the old key.
If you want, share:
• A screenshot (or the key IDs and timestamps) of the API Keys list — I can help identify likely candidates and advise next steps for rotating or removing keys.limited-arm-86913
11/20/2025, 10:01 PMtall-airline-16756
11/20/2025, 10:01 PM.env file is only used for local testing. When the agent runs on LiveKit Cloud, it uses the project credentials injected at runtime (LIVEKIT_URL, LIVEKIT_API_KEY, LIVEKIT_API_SECRET). The values in your local .env are ignored by the deployed agent.
If you want to confirm what the deployed agent is using:
• Check the agent’s runtime/deployment record or dashboard for creation timestamps and referenced keys.
• Run lk agent status and then create a new room or dispatch to trigger connection logs; the agent logs will show job/room connection activity after dispatch.
If you'd like, paste the API key IDs or the output of lk agent secrets --id <agent-id> and I’ll help identify which key in the dashboard matches the injected project key.limited-arm-86913
11/20/2025, 10:03 PMtall-airline-16756
11/20/2025, 10:03 PMlk agent secrets --id <agent-id>
This shows which secret names are configured (values are never shown).
• Verify behavior and logs:
lk agent logs --id <agent-id>
Look for authentication errors or job/room connection entries after you create a new room or dispatch the agent.
• Confirm agent runtime and dispatch:
lk agent status
Create a new room (or run lk dispatch create ...) and watch logs to confirm the agent received and accepted the job.
If you want, share the agent ID and the API key IDs/timestamps you see in the dashboard and I’ll help match likely candidates and suggest next steps (rotate/update keys or force a redeploy).
Sources: Secrets management | LiveKit Docs | Agent deployment CLI reference | LiveKit docs | Log collection | LiveKit Docs | Builds and Dockerfiles | LiveKit Docslimited-arm-86913
11/20/2025, 10:05 PMtall-airline-16756
11/20/2025, 10:05 PMtest-room-123).
• In your frontend, connect with that token:
import { Room } from 'livekit-client';
const room = new Room();
await room.connect('wss://your-livekit-url', token);
console.log('Connected to room:', room.name);
When the first participant (your frontend) connects, the room is created automatically; if your agent is configured to auto-join, it will be dispatched to that new room.
2) Dispatch + create a new room (explicitly trigger agent)
• Use the CLI to create a new room and dispatch the agent:
lk dispatch create --new-room --agent-name my-agent --room test-room-123
This creates the room and assigns my-agent to it. Then connect your frontend to test-room-123 with a matching token.
3) Explicit API/CLI create (only if you need custom room settings)
• CLI:
lk room create --empty-timeout 600 test-room-123
• Or via server SDK (Go example):
room, _ := roomClient.CreateRoom(ctx, &livekit.CreateRoomRequest{
Name: "test-room-123",
EmptyTimeout: 600,
MaxParticipants: 20,
})
Note: explicit CreateRoom adds cross-region sync latency; prefer auto-create on join unless you need special room config.
Checklist to ensure agent joins
• Use a brand-new room name (auto-join only triggers for new rooms).
• Ensure frontend tokens are for the same project where the agent is deployed.
• If agent has an agent_name, use lk dispatch create to target it.
• Watch agent logs after creating/joining the room (lk agent logs --id <agent-id>) for job assignment and connection messages.
Tell me which method you want (frontend auto-join, CLI dispatch, or API create) and I’ll give exact token-generation sample code for your stack.
Sources: Rooms, participants, and tracks | LiveKit docs | CreateRoom() is Taking Too Long | Agents telephony integration | LiveKit Docs | JavaScript quickstart (web) | LiveKit docs | Authentication | LiveKit docslimited-arm-86913
11/20/2025, 10:10 PMtall-airline-16756
11/20/2025, 10:10 PMLIVEKIT_URL, LIVEKIT_API_KEY, LIVEKIT_API_SECRET). Those values are intentionally not viewable.
• Your frontend must use a token generated with the same project credentials (server-side). That token authenticates the frontend to the same project and room.
• When the frontend joins a new room, LiveKit Cloud will dispatch the agent (if configured) and the agent will join that room — no secret exposure required.
Concrete steps to test now
1. On your server, generate a token for the room name you’ll use (same project credentials your server already uses). Example (Node.js, server-side):
import { accessToken, RoomServiceClient, createLocalToken } from 'livekit-server-sdk';
const at = new AccessToken(YOUR_API_KEY, YOUR_API_SECRET);
at.addGrant({ room: 'test-room-123', roomJoin: true });
const token = at.toJwt();
(If you want, tell me your server stack and I’ll provide the exact snippet.)
1. In your frontend, connect to the same LiveKit URL with that token:
await room.connect('wss://your-livekit-url', token);
1. Watch the agent logs:
lk agent logs --id <agent-id>
After the frontend connects to the new room, the agent logs should show a job assignment and room connection. That proves the frontend and agent are in the same project/room.
If the agent does not join, check these quickly
• You used a brand-new room name (auto-join only triggers for new rooms).
• Frontend token was generated using the same project API key/secret as the deployed agent’s project.
• Agent is Running (not Sleeping): lk agent status.
• No authentication errors in agent logs after you join.
If you want, tell me:
• Which server language you use for token generation, and
• The room name you’ll test
I’ll give an exact token-generation snippet and the exact log lines to look for.limited-arm-86913
11/20/2025, 10:17 PMtall-airline-16756
11/20/2025, 10:18 PMlk agent logs --id <agent-id>).
5. Once you verify frontend + agent work with the new key, revoke the old keys in the dashboard.
Important notes
• Do not put API secrets in frontend code; only use them server-side to mint tokens.
• Revoke old keys only after you confirm the new key works to avoid downtime.
• If the agent was deployed with no explicit agent_name it will auto-join newly created rooms — use a new room name for the test.
If you’d like, tell me the agent ID and the new key’s creation timestamp and I’ll outline the exact verification log lines to expect.limited-arm-86913
11/20/2025, 10:19 PMtall-airline-16756
11/20/2025, 10:20 PMimport { AccessToken, VideoGrant } from 'livekit-server-sdk';
const at = new AccessToken(process.env.LK_API_KEY, process.env.LK_API_SECRET);
at.addGrant(new VideoGrant({ room: 'test-room-123', roomJoin: true }));
const token = at.toJwt();
• Python (server):
from livekit import AccessToken, grants
at = AccessToken(os.environ['LK_API_KEY'], os.environ['LK_API_SECRET'])
at.add_grant(grants.VideoGrant(room='test-room-123', room_join=True))
token = at.to_jwt()
Important reminders
• Do not put API secrets in frontend code.
• Use a new room name when testing auto-join agents.
• Revoke old keys only after you confirm the new key works.
If you tell me your backend language (Node, Python, Go, etc.), I’ll provide the exact snippet and the one command to redeploy/update the env var.limited-arm-86913
11/20/2025, 10:22 PMtall-airline-16756
11/20/2025, 10:22 PMconst at = new AccessToken(process.env.LK_API_KEY, process.env.LK_API_SECRET);
at.addGrant(new VideoGrant({ room: 'test-room-123', roomJoin: true }));
const token = at.toJwt();
1. Verify the new key works (do this before revoking anything)
◦ From your server, request a token for a brand-new room name (e.g., test-reset-123).
◦ In your frontend, connect using that token:
▪︎ Connect to your LiveKit URL with the token.
◦ Watch agent logs for dispatch/room join:
lk agent logs --id <agent-id>
• Confirm agent shows job assignment and room connection.
1. If verification succeeds, revoke the old keys
◦ Revoke old API keys in the dashboard. Do not revoke the new key.
◦ Confirm production traffic still works.
Why this solves your problem
• You cannot view injected secret values after deployment. Replacing keys guarantees both sides use the same project credentials without needing to read secrets.
• The agent uses whatever project key LiveKit injects at runtime. By switching to one known key and updating your token generator, frontend tokens and the agent will authenticate to the same project.
If you want, I can:
• Provide the exact token-generation snippet for your backend language, or
• Tell you the specific log lines to look for to confirm the agent joined.
Which would you like?limited-arm-86913
11/20/2025, 10:24 PMtall-airline-16756
11/20/2025, 10:24 PM.env is only used for local testing of the agent — the deployed agent ignores your local .env.
• Your server-side token generator is a separate component that mints JWT tokens for frontends. It must use the project API key/secret to sign tokens. Those signed tokens (not the raw secret) are what frontends use to join rooms.
Why you must update the server token generator when rotating keys
• If you create a new project API key/secret, you must update the server that mints tokens so it signs tokens with the new secret. If you don’t, tokens will be signed by an old (or revoked) key and frontends will fail to authenticate to the project the agent is in.
Exactly what to do (minimal steps)
1. Create new API key in Project → API Keys and save key+secret securely.
2. On your token server:
◦ Replace the old key/secret in its config/env with the new key/secret.
◦ Redeploy/restart that server so it begins signing tokens with the new key.
1. Test with a new room name:
◦ From your token server request a token for test-reset-123.
◦ Connect frontend using that token.
◦ Check agent logs: lk agent logs --id <agent-id> — you should see job assignment and room join.
1. If successful, revoke old API keys in the dashboard.
Example token snippets (use server-side only)
• Node:
const at = new AccessToken(process.env.LK_API_KEY, process.env.LK_API_SECRET);
at.addGrant(new VideoGrant({ room: 'test-reset-123', roomJoin: true }));
const token = at.toJwt();
• Python:
at = AccessToken(os.environ['LK_API_KEY'], os.environ['LK_API_SECRET'])
at.add_grant(VideoGrant(room='test-reset-123', room_join=True))
token = at.to_jwt()
One last reassurance
• You do NOT need to (and should not) change the agent’s deployed container .env. Only update the server that generates frontend tokens. Rotating keys this way guarantees both frontend tokens and the deployed agent authenticate to the same project.
If you tell me your token-server language (Node, Python, Go, etc.), I’ll give the exact snippet and the single command you can run to redeploy with the new env var.limited-arm-86913
11/20/2025, 10:28 PMtall-airline-16756
11/20/2025, 10:28 PMLK_API_KEY / LK_API_SECRET (or LIVEKIT_API_KEY / LIVEKIT_API_SECRET as you name them) hold the new values.
2) Redeploy/restart the token service
• Restart the process or redeploy the container so the service picks up the new env values.
3) Token-generation code (same for local & prod)
• Example (Python server-side):
import os
from livekit import AccessToken, grants
def create_token(room_name: str, identity: str) -> str:
at = AccessToken(os.environ['LK_API_KEY'], os.environ['LK_API_SECRET'], identity=identity)
at.add_grant(grants.VideoGrant(room=room_name, room_join=True))
return at.to_jwt()
• Call this endpoint from your frontend to get a token; never put API secrets in frontend code.
4) Test (before revoking old keys)
• Generate a token for a brand-new room (e.g., test-reset-123) using the redeployed server.
• Connect the frontend with that token.
• Watch agent logs:
lk agent logs --id <agent-id>
You should see job assignment and room connection entries after the frontend connects.
5) Revoke old keys only after verification
• Once agent + frontend connect successfully with the new key, revoke old keys in the dashboard.
If you tell me where your token service is deployed (Docker, Cloud Run, Heroku, etc.), I’ll give the exact command or steps to update the env vars and redeploy.limited-arm-86913
11/20/2025, 10:31 PMtall-airline-16756
11/20/2025, 10:32 PM.env into os.environ. That’s fine for local testing.
• In production: you should NOT rely on a .env file. Instead, set the API key/secret as environment variables in your deployment platform (Cloud Run, Docker, Heroku, systemd, etc.). The code still reads os.environ['LK_API_KEY'] / os.environ['LK_API_SECRET'] the same way.
What to do (minimal)
1. Keep your token code unchanged. Example:
import os
from livekit import AccessToken, grants
def create_token(room_name, identity):
at = AccessToken(os.environ['LK_API_KEY'], os.environ['LK_API_SECRET'], identity=identity)
at.add_grant(grants.VideoGrant(room=room_name, room_join=True))
return at.to_jwt()
1. Remove or ignore load_dotenv() in production (optional, harmless if present).
2. Set the env vars in your deployment:
◦ Docker: pass envs in the container or use Docker secrets.
◦ Cloud Run: set environment variables or use Secret Manager.
◦ Heroku: use Config Vars.
◦ Systemd: set Environment= in the unit or export in the service’s environment file.
1. Redeploy/restart the token service so it picks up the new env vars.
2. Test with a new room token and verify the agent joins.
If you tell me where you deploy (Cloud Run, Docker, Heroku, etc.), I’ll give the exact command/steps to set the env vars and restart.limited-arm-86913
11/20/2025, 10:34 PMtall-airline-16756
11/20/2025, 10:34 PM# Set variables
PROJECT_ID=your-gcp-project
SERVICE_NAME=your-cloud-run-service
REGION=your-region
NEW_KEY=lk_xxx_new_key
NEW_SECRET=lk_secret_xxx_new_secret
# Deploy with updated env vars (keeps existing image)
gcloud run deploy "$SERVICE_NAME" \
--project="$PROJECT_ID" \
--region="$REGION" \
--update-env-vars=LK_API_KEY="$NEW_KEY",LK_API_SECRET="$NEW_SECRET"
Notes:
• If your service already uses other env vars, use --update-env-vars (it updates/merges). If you prefer to set all envs explicitly, use --set-env-vars with a full list.
• You can also add secrets from Secret Manager instead of plain env vars (recommended).
3) (Optional) Use Secret Manager (recommended)
• Store secret values:
echo -n "$NEW_SECRET" | gcloud secrets create livekit-api-secret --data-file=-
echo -n "$NEW_KEY" | gcloud secrets create livekit-api-key --data-file=-
• Grant Cloud Run service account access:
SERVICE_ACCOUNT=$(gcloud run services describe "$SERVICE_NAME" --region="$REGION" --project="$PROJECT_ID" --format='value(spec.template.spec.serviceAccountName)')
gcloud secrets add-iam-policy-binding livekit-api-secret --member="serviceAccount:$SERVICE_ACCOUNT" --role="roles/secretmanager.secretAccessor"
gcloud secrets add-iam-policy-binding livekit-api-key --member="serviceAccount:$SERVICE_ACCOUNT" --role="roles/secretmanager.secretAccessor"
• Mount at deploy:
gcloud run deploy "$SERVICE_NAME" \
--project="$PROJECT_ID" \
--region="$REGION" \
--update-secrets=LK_API_SECRET=livekit-api-secret:latest,LK_API_KEY=livekit-api-key:latest
4) Verify deployment & token generation
• Confirm Cloud Run revision is ready:
gcloud run services describe "$SERVICE_NAME" --region="$REGION" --project="$PROJECT_ID" --format="value(status.latestReadyRevisionName)"
• Call your token endpoint to get a token for a NEW room:
curl -s https://<your-cloud-run-url>/token?room=test-reset-123 -o token.jwt
• In frontend, connect using that token to a new room (test-reset-123). Or locally use livekit-client to connect.
5) Confirm agent joins
• After frontend connects, watch agent logs:
lk agent logs --id <agent-id>
You should see job assignment and room connection log entries.
6) Revoke old keys
• Once you confirm agent + frontend work with the new key, revoke old API keys in the LiveKit dashboard.
If you want, I can:
• Provide the exact curl/post body to call your token endpoint if you share its path, or
• Give the single command to redeploy using Secret Manager for your SERVICE_NAME and REGION. Which would you prefer?limited-arm-86913
11/20/2025, 10:41 PMlk project list to list all linked projects. Then, set the default project for agent deployment with lk project set-default "<project-name>".
5. Deploy your agent:
6. lk agent createtall-airline-16756
11/20/2025, 10:41 PMlk agent create, here’s the clear, final picture and exact safe steps to rotate keys and verify frontend + agent match.
Quick facts
• An agent deployed via lk agent create receives the project’s LIVEKIT_URL, LIVEKIT_API_KEY, and LIVEKIT_API_SECRET automatically from LiveKit Cloud at runtime. You cannot read those injected values from the dashboard or agent.
• Your local .env is only for local testing; the deployed agent ignores it.
• Frontends authenticate by using tokens your server mints. Those tokens must be signed with the same project API key/secret the project (and thus the agent) uses.
Safe, minimal steps to guarantee frontend + agent use the same credentials
1. Create a new project API key in the LiveKit dashboard. Save key + secret securely.
2. Update your token service (deployed on Cloud Run):
◦ Replace the env vars the service uses for the API key/secret with the new values (or use Secret Manager and map them into Cloud Run).
◦ Redeploy/update the Cloud Run service so it uses the new key/secret.
◦ Your Python token code stays the same; it reads from env vars.
1. Test before revoking old keys:
◦ From your token service, request a token for a BRAND-NEW room name (e.g., test-reset-123).
◦ Connect your frontend with that token to create/join the room.
◦ Watch agent logs: lk agent logs --id <agent-id> — you should see a job assignment and room connection.
1. If the agent joins successfully, revoke old API keys in the dashboard.
Why this works
• You cannot view the agent’s injected secret, so rotating to a single known key and updating your token server guarantees both sides authenticate to the same project without needing to read secrets.
If you want, I’ll give the exact Cloud Run command to update env vars or Secret Manager commands based on your SERVICE_NAME and REGION — which do you prefer?limited-arm-86913
11/21/2025, 1:07 AMLIVEKIT_URL, LIVEKIT_API_KEY, and LIVEKIT_API_SECRET, they use these to find each other and communicate. period. such credentials are store in an .env for the backend and a .env. local for the frontend. Now, the agent is deployed(the backend) on livekit cloud, what changes should we do to make the agent communicate with the frontend just as local? Give me operational steps, please stop explaining things like you are give a lecture.tall-airline-16756
11/21/2025, 1:07 AMgcloud run deploy YOUR_SERVICE \
--region=YOUR_REGION \
--update-env-vars=LK_API_KEY="NEW_KEY",LK_API_SECRET="NEW_SECRET"
• Wait for the revision to become ready.
3) Update frontend local config
• Replace values in your frontend .env.local with:
◦ LIVEKIT_URL = your project URL (unchanged)
◦ LIVEKIT_API_KEY = NEW_KEY
◦ LIVEKIT_API_SECRET = NEW_SECRET
• Important: Do NOT ship API_SECRET to production frontend; this is just for your local test only.
4) Redeploy/restart frontend (if hosted) or reload local frontend
• For local test, restart dev server so it reads .env.local.
5) Test with a brand-new room name
• From your backend token endpoint (now using NEW_KEY/NEW_SECRET), request a token for room: test-reset-123
• In frontend, connect using that token to test-reset-123.
6) Verify agent joins
• Tail agent logs:
lk agent logs --id <agent-id>
• Expected: you see job assignment and room connection after frontend connects.
7) If agent joined successfully — revoke old keys
• Revoke all old API keys in dashboard.
If you want, give me:
• Your Cloud Run SERVICE name and REGION and I’ll give the exact gcloud command with placeholders filled.limited-arm-86913
11/21/2025, 1:09 AMtall-airline-16756
11/21/2025, 1:09 AMlk CLI and are set to the correct LiveKit project.
• You can run lk agent and lk dispatch commands.
Steps
1) Create a new project API key (dashboard)
• In LiveKit Project → API Keys, create a new key. Copy the API key and secret.
2) Update your token server (the backend that mints tokens)
• On the machine/service that runs your token-generation code, set env vars to the new values:
◦ LIVEKIT_API_KEY = <new_key>
◦ LIVEKIT_API_SECRET = <new_secret>
◦ LIVEKIT_URL = <project_livekit_url>
• Redeploy/restart that token server so it uses the new env vars.
3) Keep agent deployment unchanged
• Do NOT modify the deployed agent container or its .env. LiveKit Cloud injects the project credentials into the agent automatically; you cannot and should not try to overwrite them.
4) Test with a brand-new room
• From your token server (now using the new key/secret), request a token for room name: test-reset-123.
• In your local frontend, call your token endpoint and connect to the room using the returned token.
5) Verify agent joined
• Run:
◦ lk agent logs --id <agent-id>
• After frontend connects, logs should show job assignment and room connection.
6) If it works, revoke old keys
• In the dashboard, revoke old API keys. Do this only after successful verification.
If the agent does not join after step 4, tell me:
• Output of lk agent status
• The room name you used
I’ll tell you the exact log lines to expect and next action.limited-arm-86913
11/21/2025, 1:11 AMtall-airline-16756
11/21/2025, 1:12 AM.env (or env file) values:
LIVEKIT_URL=<project_livekit_url> LIVEKIT_API_KEY=<new_key> LIVEKIT_API_SECRET=<new_secret>
• Restart app (example):
◦ If using gunicorn/system: restart the process
◦ If running with `python app.py`: stop and start the process
2) Docker container
• Rebuild/redeploy with new envs:
docker run -e LIVEKIT_URL=<url> -e LIVEKIT_API_KEY=<new_key> -e LIVEKIT_API_SECRET=<new_secret> your-image
• Or update compose and docker-compose up -d
3) Cloud Run (if later relevant)
• Use:
gcloud run deploy SERVICE --region=REGION --update-env-vars=LIVEKIT_API_KEY=<new_key>,LIVEKIT_API_SECRET=<new_secret>,LIVEKIT_URL=<url>
4) Heroku
• Set config:
heroku config:set LIVEKIT_API_KEY=<new_key> LIVEKIT_API_SECRET=<new_secret> LIVEKIT_URL=<url> --app YOUR_APP
• Restart dynos if needed: heroku ps:restart --app YOUR_APP
5) systemd
• Edit service env or /etc/default/your-service to set vars, then:
sudo systemctl daemon-reload sudo systemctl restart your-service
6) Kubernetes
• Update secret or deployment env and rollout restart:
kubectl create secret generic livekit-creds --from-literal=LIVEKIT_API_KEY=<new_key> --from-literal=LIVEKIT_API_SECRET=<new_secret> -o yaml --dry-run=client | kubectl apply -f - kubectl set env deployment/your-deployment --from=secret/livekit-creds kubectl rollout restart deployment/your-deployment
7) Verify
• Call your token endpoint to mint a token for a NEW room and connect frontend.
• Tail logs or check health to confirm service picked up new envs.
Tell me which environment you use and I’ll give the single exact command(s).limited-arm-86913
11/21/2025, 1:12 AMtall-airline-16756
11/21/2025, 1:12 AMlk agent create on LiveKit Cloud. The only thing you need to change is the token server that mints JWTs for your frontend. You do NOT change the deployed agent. Exact steps (LiveKit Cloud context):
1) Create a new project API key in the LiveKit dashboard. Copy the API key and secret.
2) On the machine/service that runs your token server (where your Python code runs), set these env vars:
• LIVEKIT_URL=<your_project_livekit_url>
• LIVEKIT_API_KEY=<new_key>
• LIVEKIT_API_SECRET=<new_secret>
3) Restart/redeploy that token server process so it reads the new env vars.
• If local: update .env / .env.local and restart your process (stop then python app.py or restart your process manager).
• If hosted somewhere, update that service’s env configuration and restart there.
4) Test (before revoking old keys)
• Call your token endpoint to mint a token for a BRAND-NEW room (e.g., test-reset-123).
• In your frontend, connect to LIVEKIT_URL with that token.
• Tail agent logs: lk agent logs --id <agent-id> — confirm job assignment and room join.
5) If agent joined, revoke old API keys in the dashboard.
If you tell me exactly where the token server runs (local dev machine, Docker, Cloud Run, Heroku, Kubernetes, etc.), I’ll give the single exact command you need to set env vars and restart.limited-arm-86913
11/21/2025, 1:13 AMtall-airline-16756
11/21/2025, 1:14 AMlimited-arm-86913
11/21/2025, 1:14 AMtall-airline-16756
11/21/2025, 1:14 AMlk agent create ... command (including `--secrets`/`--secrets-file`) using the new project API key you create.
Which option and which environment (if A) or image/secrets (if B)? I’ll then give the single exact command to run.limited-arm-86913
11/21/2025, 1:16 AMtall-airline-16756
11/21/2025, 1:16 AM