echoing-oil-67421
10/02/2025, 3:29 PMechoing-oil-67421
10/02/2025, 4:44 PMechoing-oil-67421
10/03/2025, 1:29 AMsession.update_agent function that can be used to switch between agents (good thing I implemented in Python because the docs say it's not available in Node.js).
I ended up moving away from my previous implementation that only used one LiveKit Agent object. I instead instantiate an Agent object for each agent I have in LangGraph, each with their own TTS with different voices and I gave them each a custom LLM node adapter that gets tokens streamed from the same LangGraph graph.
The way I implemented this is by having a LangGraph buffer class that handles the stream from the graph, adding chunks to a buffer and keeping track of when the speaker changes. Then I have simple wrapper LLM adapters that each pull from the LangGraph buffer class, treating it as if it were a plain LLM provider.thousands-television-12141
10/05/2025, 10:23 AM