What is the best practice for handling multiple ha...
# ask-ai
d
What is the best practice for handling multiple handoff: • Multiple session with one agent per session • One session but using session.update()
t
Thanks for reaching out, W. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
For handling multiple handoffs in LiveKit, here are the best practices: • Single Session with
session.update_agent()
: This is the recommended approach for most use cases. It allows you to maintain a single conversation context while seamlessly transitioning between agents. This method simplifies state management and resource usage. For example, an initial agent can collect user information and then hand off to a specialist agent within the same session. • Multiple Sessions with One Agent Per Session: Use this approach when agents require isolated configurations or need to run independently. This is suitable for scenarios like parallel processing but can be resource-intensive and requires careful synchronization. In general, prefer the single session approach unless you have specific requirements for isolation or parallel execution. Sources: Workflows | LiveKit Docs | README.md