How do I join as a participant when my local agent...
# ask-ai
b
How do I join as a participant when my local agent is running with the cli dev mode? Because the logs shows that the worker is registered but then I don't have any way of just using it? I cannot use console mode only because I need to test multiple participants joining
t
Thanks for reaching out, miguel. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
You're asking how to join as a participant while your local agent runs in CLI
dev
mode so you can test multiple participants without using
console
mode. Good question — here's how to do that. 1. Run the agent in dev mode so it registers as a worker (keep it running). 2. Join the room as normal participants from separate clients (browser tabs, other machines, or CLI), using unique identities. Options: ◦ LiveKit Meet (web): open https://meet.livekit.io → Custom → set URL to
ws://localhost:7880
(or your server URL) and paste a participant token, then Connect. Open multiple tabs to simulate many participants. ◦ Generate a token with the CLI and use it in your client:
Copy code
lk token create --api-key devkey --api-secret secret --room my-room --identity user1 --join --valid-for 1h
• Use the CLI
lk room join
to simulate participants and publish demo media:
Copy code
lk room join --url ws://localhost:7880 --api-key devkey --api-secret secret --identity bot_user --publish-demo my-room
Run this multiple times with different
--identity
values for multiple participants. 1. Confirm the agent reacts: the agent in dev mode waits for jobs and will receive participant events when those clients join. In your agent code, ensure you handle
participant_connected
events and call
ctx.connect()
if the agent itself should join the room. If you want, tell me: • the room name you’re using and • whether you want scripted demo participants (CLI) or real browser/mobile clients, and I’ll give exact commands and a short checklist to run several participants quickly. Sources: Agent server | LiveKit docs | LiveKit CLI Setup | LiveKit Docs | Voice AI quickstart | LiveKit docs