flyingemolga
02/25/2025, 10:34 AMAuthentication/Dependent Tool Call or Authentication/Dependent Call Transfer? The intention would be to limit functionality of an assistant/squad, like tool calls and call transfers until a user has successfully run a different tool call which "unlocks" the functionality.
For instance, currently I have a squad where one of the members needs to walk the customer through an authentication process before transferring to the next member in the squad. Currently I'm relying on my prompting not to have the customer transferred to the next member without having authenticated. I have some fall backs in place to avoid anything terrible happening if this does happen, but it would be nice to "lock" transfers until an authentication tool call has run successfully.
Additionally, it might be nice to be able to "lock" other tool calls until a relevant tool call has run successfully. For example I have a tool call which checks whether the database can be updated with information provided by a user - only if successful, do I want the assistant to be able to run a separate tool call to send an SMS or email for instance. I have database rules which stop the second tool call succeeding if the first wasn't correctly run, but that doesn't stop the assistant from trying anyways - it would be nice to block the tool call entirely based on the condition of the first tool.
I'm thinking you could implement something like this:
{
"name": "tool_call_1",
"type": "authentication_tool_call",
"dependent_members": ["second_squad_member_name"],
"dependent_tools": ["tool_call_2"]
...
}
Where the the assistant can't transfer to second_squad_member_name or use tool_call_2 unless tool_call_1 gets a response in a specific format (probably an additional boolean property like {"authenticated": true/false}).