How to share my test project with others (where do...
# ask-ai
c
How to share my test project with others (where do I get room token from)?
t
Thanks for reaching out, Anna. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Hey there! If you want to share your test project with others and get a room token, here’s a simple way to do it: Sharing the Project: • Try out LiveKit Meet, which is a sample app. Just share the link with your friends and have them enter the token you create in the "Custom" tab. • If you’re testing with multiple users, create several tokens with unique identities and have everyone open LiveKit Meet in different browser tabs. Getting a Room Token: • Using CLI: Just run this command:
Copy code
lk token create \
--api-key <project_key> --api-secret <project_secret> \
--join --room test_room --identity test_user \
--valid-for 24h
• Programmatically: You can generate tokens on your server using libraries like
livekit-server-sdk
. For example, in Node.js:
Copy code
import { AccessToken } from 'livekit-server-sdk';

async function createToken({ roomName, participantName }) {
  const at = new AccessToken('my-key', 'my-secret', {
    identity: participantName,
    ttl: '10m',
  });
  at.addGrant({
    roomJoin: true,
    room: roomName,
    canUpdateOwnMetadata: true,
  });
  return at.toJwt();
}
• LiveKit Cloud Sandbox: You can also use the sandbox endpoint to quickly generate tokens for testing. If you have any questions or need a hand with any of these steps, just let me know—I’m here to help! Sources: TEMPLATE.md | Authentication Examples | livekit/livekit_composite | DeepWiki | Connecting to LiveKit | LiveKit Docs | Swift quickstart | LiveKit Docs | LiveKit CLI Setup | LiveKit Docs
c
How to load a new code for the existing agent?
t
Hey there! To load new code for an existing agent, here’s a simple guide based on where you’re working: For LiveKit Cloud Deployments: • Deploy New Code: Just run this command to get your updated code live: `lk agent deploy`This will build a container image with your latest code and roll it out smoothly so there’s no downtime. • Update Metadata: If you also need to tweak configs or secrets along with the code, use:
lk agent update --secrets KEY=VALUE
• Restart Without Code Changes: Want to restart the agent but keep the same code? No problem, just run:
lk agent restart
• Rollback: If something doesn’t feel right, you can always go back to a previous version with:
lk agent rollback --version [VERSION]
For Local Development: • Simply edit your agent code files and restart the local agent like this:
python3 agent.py dev
If you hit any bumps or want a hand with these steps, just give me a shout—I’m here to help!