able-jackal-84140
09/26/2025, 10:59 AMtall-airline-16756
09/26/2025, 10:59 AMtall-airline-16756
09/26/2025, 11:00 AMlk project add command to add your local server as a project like this:
lk project add my-local-project \
--url http://localhost:7880 \
--api-key <my-api-key> \
--api-secret <my-api-secret> \
--default
This will set your local server as the default project. You can easily check it with:
lk project list
Method 2: Use Environment Variables
• If you prefer, just set these environment variables in your shell:
export LIVEKIT_URL=http://localhost:7880
export LIVEKIT_API_KEY=<your-api-key>
export LIVEKIT_API_SECRET=<your-api-secret>
The CLI will then automatically use these to connect to your local server.
Method 3: Use Command-Line Flags
• For quick, one-time commands, you can specify the server URL, API key, and secret right in the command:
lk room join --url http://localhost:7880 --api-key <key> --api-secret <secret> --identity test-user my-room
Feel free to pick whichever method feels easiest for you. And if you have any questions or need a hand with anything else, just let me know—I’m here to help!
Sources: livekit-agents/livekit/agents/cli/cli.py | Development Environment Setup | livekit/livekit_composite | DeepWiki | LiveKit CLI project management | LiveKit Docs | cmd/lk/agent.go | Accepting incoming calls | LiveKit Docsable-jackal-84140
09/26/2025, 11:03 AMtall-airline-16756
09/26/2025, 11:04 AMable-jackal-84140
09/26/2025, 11:25 AMtall-airline-16756
09/26/2025, 11:26 AMagent_name in RoomConfiguration when generating a participant’s access token. Here’s a friendly example in Node.js:
import { RoomAgentDispatch, RoomConfiguration } from '@livekit/protocol';
import { AccessToken } from 'livekit-server-sdk';
const at = new AccessToken();
at.identity = 'my_participant';
at.addGrant({ roomJoin: true, room: 'my-room' });
at.roomConfig = new RoomConfiguration({
agents: [new RoomAgentDispatch({ agentName: 'groq-agent' })],
});
const token = await at.toJwt();
3. Agent Behavior and Media Processing
• Once dispatched, your agent will join the room as a participant. It can process audio and video streams, generate responses using LLMs, and interact with users in real time through SDKs and plugins. It’s quite powerful!
4. Alternative Dispatch Methods
• API: You can programmatically dispatch an agent to a room using the AgentDispatchService.
• CLI: Alternatively, use the lk dispatch create command along with --agent-name and --room flags for quick dispatching.
If you have any questions or need a hand with any of these steps, please don’t hesitate to reach out. I’m here to support you every step of the way!
Sources: LiveKit Agents | LiveKit Docs | examples/avatar_agents/anam/agent_worker.py | Docs::Agents | AI Agents Framework | livekit/livekit_composite | DeepWiki | Anatomy of an Agent | LiveKit Docs