how to run livekit agent cli
# ask-ai
h
how to run livekit agent cli
t
Thanks for reaching out, YUNYI. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
To run the LiveKit Agent CLI, follow these steps: Sources: LiveKit Agents | GitHub::livekit::agents | livekit-agents/livekit/agents/cli/_run.py
h
which step?
t
Hey there! I totally get that the LiveKit Agent CLI can be a bit confusing. I'd love to help you out and make sure we're on the same page. Could you tell me a bit more about what you're aiming to do? I'm wondering: • Are you trying to start the worker to wait for users to connect? • Are you running it in development mode for debugging? • Do you want to join a specific LiveKit room? The more details you can share, the better I can help you find exactly the right step. I'm here to make this as smooth as possible for you!
h
tell me the steps to run how to run livekit agent cli
t
Hey there! I'll walk you through setting up the LiveKit Agent CLI – it's easier than you might think! 😊 1. First, let's get those environment variables sorted: ā—¦
LIVEKIT_URL
ā—¦
LIVEKIT_API_KEY
ā—¦
LIVEKIT_API_SECRET
ā—¦ Any extra API keys you might need (like
OPENAI_API_KEY
) 1. Ready to start your worker and wait for connections? Just run:
node my_agent.js start
2. If you're in development and want those nice, colorful debug logs, use:
node my_agent.js dev
3. Want to jump into a specific LiveKit room that's already going? No problem! Try:
node my_agent.ts connect --room <my-room>
Got any questions? I'm here to help! Don't hesitate to reach out if something isn't crystal clear. 🌟
h
what is the code for python agent.py console?
t
Hey there! Want to test out your LiveKit agent locally? It's super easy! Just run this command in your terminal:
Copy code
python agent.py console
Console mode is awesome for getting a quick feel for how your agent works. Here's what you can expect: • You'll chat directly in the terminal using your local audio setup - how cool is that? • Feel free to switch between Text and Audio modes anytime by hitting Ctrl+B. • When you're done, just press Q to exit. • The best part? It runs completely locally, so no complicated server setup needed! Need any help getting started? I'm right here to help! 😊 Sources: Voice AI quickstart | LiveKit Docs | GitHub::livekit::agents | livekit-agents/livekit/agents/cli/cli.py
h
I want to see the code
t
Hey there! šŸ‘‹ Let me walk you through running the LiveKit agent in console mode – it's super easy!
Copy code
python agent.py console
Want to get a bit more specific? No problem! You can add some extra details like this:
Copy code
python agent.py console --url [LIVEKIT_URL] --api-key [LIVEKIT_API_KEY] --api-secret [LIVEKIT_API_SECRET]
Pro tip: You can also set these up using environment variables if that's more your style: •
LIVEKIT_URL
•
LIVEKIT_API_KEY
•
LIVEKIT_API_SECRET
Quick console mode shortcuts to remember: • Press Ctrl+B to switch between Text/Audio mode – how cool is that? • Press Q to quit whenever you're done. Got any questions? I'm totally here to help! Just give me a shout if you need anything else. 😊 Sources: Voice AI quickstart | LiveKit Docs | GitHub::livekit::agents | livekit-agents/livekit/agents/cli/_run.py