Squad Context/Memory Across Assistants
# support
s
I'm really struggling to work out the best way to handle cross assistant squad memory, specifically some elements of the conversation depend on previous answers to questions asked by earlier assistants. I've tried, rolling-history and setting pseudo-boolean variables in my prompt as well as overriding variables, through the API, mid conversation but neither work consistently. This functionality would be HUGE for the UX of my voice agent, and so I'm just really curious to understand if handling different dialogue trees, based on responses/answers with earlier assistants is feasible? If so, what are the best practices? Call ID: aa2456c2-5d4a-4cde-88ee-990b5a1560e4 The assistant IDs in question are: First Assistant: 31a878fe-50da-4448-b372-f1a7ebcc397d Second Assistant: 0fd27e41-2a2a-458f-bbc5-02b71d42dcb3 https://cdn.discordapp.com/attachments/1383108088671899910/1383108088919228488/message.txt?ex=684d9749&is=684c45c9&hm=cbf90f4ce49175743d445259b89681f1b15db74872bff2d627e734cb4b2fefed&
k
Use an external state store like a database or key-value store to track user context and flags, design modular dialogue flows, route between them based on stored values, and avoid packing all logic into a single prompt..
s
In terms of routing between them based on stored values, would that be achieved via dynamic transfers to an assistant based on stored data or some other method?
k
Routing between flows based on stored values is handled using conditional edges and global nodes within workflows, while dynamic transfers are triggered via tools and webhooks that use stored data to determine the destination..
s
Right, so there would be no way to achieve this with traditional assistants?
In which case is it possible to incorporate the query tool into a workflow assistant? and can a squad be comprised of both traditional and workflow assistants
k
Traditional assistants can't handle dynamic routing or conditional logic based on stored values, but workflow assistants in Vapi can, using conditional edges, global nodes, and tools like the Query Tool; and yes, you can combine both types in a squad for hybrid functionality..
So create conditional flows using edge conditions and global nodes, run the Query Tool via Tool Nodes to store data, trigger dynamic transfers with API or Transfer nodes, and combine both traditional and workflow assistants in a single squad..
s
Sorry to be a pain in the bum. I don't see the option to add any of my query tools within the workflow tool node? Am i missing something dashboard wise here? Or is something I have to achieve via API?
When I say query tool, I'm specifically referring to some kind of access to a knowledge base/information files, available within a workflow.
c
It is not currently supported but it is in the roadmap.
s
Ahh, bummer. Can you think of any alternative strategies, given the need for some knowledge retrieval? Can I include a workflow within a squad? Or use a transfer call tool to another assistant once the conversation routing is complete?
Or if the questions and answers required aren’t super broad, perhaps set up a global node with a conversational prompt containing a condensed knowledge base?
c
You might want to use a tool call and then create a custom KB through Pinecone. That could be a better option.
4 Views