choomba
02/19/2025, 11:14 PMVapi
02/20/2025, 10:23 PM// Squad Member 1's response before transfer
const response = `I've collected the following information:
- Address: ${collectedAddress}
- Other data: ${otherData}
Transferring you to my colleague who will help further.`;
2\. Configure the transfer with `rolling-history`:
const transferTool = {
type: 'transferCall',
destinations: [{
type: 'assistant',
assistantName: 'Squad Member 2',
transferMode: 'rolling-history',
message: '' // Silent transfer
}]
};
3\. Squad Member 2 can reference the previous conversation to extract the information:
// In Squad Member 2's system prompt
const systemPrompt = `
You are Squad Member 2. Review the conversation history to find any collected information.
Look for structured data shared by Squad Member 1 before the transfer.
`;
Why This Works:
1\. The conversation history preservation is built into the transfer system
2\. No need to modify variable values mid-call
3\. Information remains in context naturally
4\. More reliable than trying to update variables during runtimeAiTitus :)
02/21/2025, 3:04 PMShubham Bajaj
02/22/2025, 6:21 PMAiTitus :)
02/22/2025, 7:15 PM