When passing chat context from one agent to anothe...
# ask-ai
f
When passing chat context from one agent to another, is the system prompt passed as well?
t
Thanks for reaching out, Abdullah. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
I understand how important it is to have a smooth handoff between agents, so let me help clarify this for you. When transferring chat context, the system prompt isn’t automatically passed along—each agent begins with their own set of instructions. However, if it’s set up explicitly during the handoff, the previous agent’s chat context, including system messages, can be shared. To make sure the system prompt information is preserved or transferred, here are a few approaches you can consider: • Pass the existing chat context during the handoff, which might include the prior system messages. • Use custom logic to copy and merge chat context, allowing you to choose whether to include or exclude system messages. • Reapply or summarize instructions dynamically for the new agent to keep things consistent. If you'd like, I’m here to walk you through the details of how to set this up—just let me know! Sources: Workflows | LiveKit Docs | complex-agents/personal_shopper/personal_shopper.py | examples/voice_agents/restaurant_agent.py | Agent-assisted warm transfer | LiveKit Docs