with the 1.x livekit agent (python) can I have mul...
# ask-ai
f
with the 1.x livekit agent (python) can I have multiple LLM's involved concurrently? e.g. multiple concurrent agents (sort of)?
t
Thanks for reaching out, Doug. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Just a heads-up: the LiveKit 1.x Python agent doesn’t support running multiple LLMs at the same time within a single agent or session. But don’t worry—it does offer some handy options: • Sequential Multi-Agent Workflows: You can create workflows where control passes between different agents, each using its own LLM. • Agent Updates: You’re able to swap out or update agents during a session, though only one agent (and its LLM) is active at any moment. • Fallback LLMs: There’s a failover setup that switches to a backup LLM if the primary one runs into trouble, but again, just one LLM runs at a time. If you have a particular scenario in mind, just let me know! I’d be happy to chat through the best way to make it work with what’s available. Sources: examples/voice_agents/multi_agent.py | README.md | LLM Integrations | livekit/livekit_composite | DeepWiki | Large language model (LLM) integrations | LiveKit Docs
f
Does each agent maintain its own context? If I start with agent A, build context ==> then switch to Agent B (new context) ==> go back to A, does the context I had built for A remain intact upon return?
t
Every agent in LiveKit keeps its own context. When you switch between agents, the new agent can pick up where the last one left off by carrying over the important messages. And if you go back to the original agent, its context will still be there, unless you’ve changed or cleared it during your session. If you’d like a hand setting this up or have any specific needs, just give me a shout—I’m here to help! Sources: Workflows | LiveKit Docs | complex-agents/personal_shopper/personal_shopper.py