creamy-tiger-14805
08/30/2025, 9:04 AMtall-airline-16756
08/30/2025, 9:04 AMtall-airline-16756
08/30/2025, 9:04 AMcreamy-tiger-14805
08/30/2025, 9:05 AMtall-airline-16756
08/30/2025, 9:06 AMlk cloud auth
If you’re juggling multiple projects, you can set your default project like this:
lk project set-default "<project-name>"
◦ Next, deploy your agent with:
lk agent deploy [working-dir]
Just make sure there’s a livekit.toml file in that directory. For example:
lk agent deploy .
• Assigning Names to Agents:
◦ When you initialize your agent, set the agent_name field in the WorkerOptions.
◦ For Python, it looks like this:
if __name__ == "__main__":
agents.cli.run_app(agents.WorkerOptions(
entrypoint_fnc=entrypoint,
agent_name="my-telephony-agent"
))
◦ And for Node.js, you can do:
new Worker({
agentName: "my-telephony-agent",
// other options
});
Just a heads up: named agents are great for explicit dispatch—you won’t see them automatically assigned to rooms. After you deploy, you can easily dispatch them using the LiveKit API, CLI, or client SDKs. If you have any questions or need a hand, I’m here to help!
Sources: Agents telephony integration | LiveKit Docs | Dispatching agents | LiveKit Docs | protobufs/livekit_cloud_agent.proto | Agent deployment CLI reference | LiveKit Docs | Agent dispatch | LiveKit Docscreamy-tiger-14805
08/30/2025, 9:22 AMtall-airline-16756
08/30/2025, 9:23 AMWorkerOptions.
Here’s a little example in Python to make it clearer:
if __name__ == "__main__":
cli.run_app(
WorkerOptions(
entrypoint_fnc=entrypoint,
agent_name="my-telephony-agent" # This is where you name your agent
)
)
Make sure your code has the agent_name field filled out to explicitly give your agent a name. The directory you’re in mainly matters for things like deploying via the CLI, but it won’t change what your agent is called.
If you’re still running into trouble, no worries! Just let me know how you’re running the agent and feel free to share any bits of your code or setup. I’m here to help!
Sources: Agent dispatch | LiveKit Docs | Agent deployment CLI reference | LiveKit Docs | Agents telephony integration | LiveKit Docscreamy-tiger-14805
08/30/2025, 9:25 AMtall-airline-16756
08/30/2025, 9:26 AMindex.annoy and metadata.pkl.
• Prepare the Knowledge Base: Run the build_rag_data.py script to turn your documents into embeddings. This script takes care of splitting the documents, generating embeddings, and saving everything so it’s ready for retrieval.
• Implement RAG-Enabled Agent: Create an agent class that includes a function_tool to fetch results from the knowledge base. For example, you can use the livekit_docs_search tool to search the vector database and pull up relevant info.
• Integrate into Workflow: Bring it all together by using the RAGEnrichedAgent within an AgentSession alongside LLM, STT, and TTS components. This lets your agent dynamically retrieve knowledge during conversations.
• Optional Knowledge Ingestion: If you want, use scripts like sync_livekit_repos.py or pull_kb.py to scrape and prep documentation from places like kb.livekit.io.
If you want to dive deeper, check out the RAG example in the LiveKit repository for detailed scripts and examples. And hey, if you hit any bumps or have a special use case, just give me a shout—I’m here to help!
Sources: Large language model (LLM) integrations | LiveKit Docs | Ollama integration guide | LiveKit Docs | LangChain integration guide | LiveKit Docs | Baseten LLM integration guide | LiveKit Docs | rag/main.pycreamy-tiger-14805
08/30/2025, 11:47 AMtall-airline-16756
08/30/2025, 11:48 AMcreamy-tiger-14805
08/30/2025, 11:49 AMtall-airline-16756
08/30/2025, 11:49 AMLIVEKIT_URL, LIVEKIT_API_KEY, and LIVEKIT_API_SECRET.
◦ Start your agent in dev mode by running something like python myagent.py dev (or the equivalent command for your language).
• Jump into the hosted Playground:
◦ Head over to the hosted Agents Playground.
◦ Pop in your LiveKit server URL and a room access token to connect to your LiveKit Cloud instance and chat with your agent.
• *If you prefer, you can self-host the Playground:*`LIVEKIT_API_KEY=YOUR_API_KEY
LIVEKIT_API_SECRET=YOUR_API_SECRET
NEXT_PUBLIC_LIVEKIT_URL=wss://YOUR_LIVEKIT_URL`
◦ Start by cloning the Playground repo: git clone https://github.com/livekit/agents-playground.git.
◦ Create an .env.local file with your LiveKit credentials like this:
◦ Then run the Playground locally with npm run dev and open http//localhost3000 in your browser.
• Customize your Playground experience (optional): You can tweak settings like audio, video, and chat using the NEXT_PUBLIC_APP_CONFIG environment variable to fit what your agent can do.
And that’s it! These steps will help you test your agent live in the Playground. If you hit any bumps or have questions, just give me a shout—I’m here to help!
Sources: README.md | Agents playground | LiveKit Docs | Agents Playground | LiveKit Docs | README.md