When doing agent transfer, is the entry_point func...
# ask-ai
c
When doing agent transfer, is the entry_point function executed again from the start? Like if I am loading some data for my orchestrator agent and passed initially, is this data shared with the other agents during transfer or passed through again in the entrypoint?
t
Thanks for reaching out, Subham. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Thanks for your question! The
entry_point
function actually runs just once during the entire job lifecycle. This usually happens when a new process starts for a job, like when someone joins a room. So, during an agent transfer, it won’t be executed again. Instead, the data is smoothly shared between agents using the
userdata
object, which sticks around across transfers. Plus, important context like chat history is carefully preserved and passed along through things like the
on_enter()
methods, which help merge and copy context from previous agents. This way, the session stays continuous and seamless without needing to call the
entry_point
function again. I hope this helps clarify things for you! Sources: Job lifecycle | LiveKit Docs | Worker lifecycle | LiveKit Docs | complex-agents/personal_shopper/personal_shopper.py | examples/voice_agents/error_callback.py | Building Multi-Agent Architectures with LiveKit Agents