proud-lawyer-39815
09/07/2025, 2:42 AMtall-airline-16756
09/07/2025, 2:42 AMtall-airline-16756
09/07/2025, 2:42 AMlivekit-plugins-langchain package. This makes it super easy to use LangGraph workflows as large language models (LLMs) within LiveKit's AI agents framework, especially if you're working on voice AI applications.
Here’s a quick way to get started:
• First, install the plugin with pip install "livekit-plugins-langchain~=1.1".
• Then, define and compile your LangGraph workflow.
• Finally, plug that workflow into a LiveKit AgentSession using the LLMAdapter.
If you want a hands-on example, check out the LiveKit agents GitHub repo here: LangGraph Integration Example.
Feel free to reach out if you want a hand with the setup or if you have any specific ideas you’re exploring—I’m here to help! Sources: LangChain integration guide | LiveKit Docs | livekit-plugins/livekit-plugins-langchain/livekit/plugins/langchain/py.type... | Large language model (LLM) integrations | LiveKit Docsproud-lawyer-39815
09/07/2025, 2:47 AMtall-airline-16756
09/07/2025, 2:48 AMpip install "livekit-agents[cartesia]~=1.2"
2. Next, set your API keys in a .env file for Cartesia, OpenAI, Deepgram, and LiveKit.
3. Then, define multiple agents (like Greeter, Expert, Support) each with their own Cartesia TTS voices and make sure they keep the context between agents.
Here’s a simplified example to get you started:
from livekit.agents import Agent, AgentSession
from livekit.plugins import cartesia, deepgram
class GreeterAgent(Agent):
def __init__(self):
super().__init__(
instructions="You are a friendly greeter.",
stt=deepgram.STT(),
tts=cartesia.TTS(voice="greeter-voice-id")
)
class ExpertAgent(Agent):
def __init__(self):
super().__init__(
instructions="You are a technical expert.",
stt=deepgram.STT(),
tts=cartesia.TTS(voice="expert-voice-id")
)
async def entrypoint(ctx):
session = AgentSession()
await session.start(agent=GreeterAgent(), room=ctx.room)
If you want a full example with smooth agent transitions and context preservation, just check out the LiveKit agents GitHub repo or feel free to ask me for more details—I’m here to help! Sources: examples/voice_agents/restaurant_agent.py | Cartesia STT integration guide | LiveKit Docs | complex-agents/personal_shopper/README.md