diff --git a/mint.json b/mint.json index 93cef35..1b8e70b 100644 --- a/mint.json +++ b/mint.json @@ -171,6 +171,10 @@ { "group": "Phone Calling", "pages": ["phone-calling"] + }, + { + "group": "Squads", + "pages": ["squads"] } ] }, diff --git a/squads.mdx b/squads.mdx new file mode 100644 index 0000000..fe92efa --- /dev/null +++ b/squads.mdx @@ -0,0 +1,52 @@ +--- +title: "Squads" +sidebarTitle: "Introduction" +description: "Use Squads to handle complex workflows and tasks." +--- + +Sometimes, complex workflows are easier to manage with multiple assistants. +For example, you might have one assistant for asking about personal information, and another for booking appointments. +Each of these assistants can have their own configuration and may require drastically different prompts. + +Squads enable calls to transfer assistants mid-conversation, while maintaining full conversation context. + +## Usage + +To use Squads, you can create a `squad` when starting a call and specify `members` as a list of assistants and destinations. +The first member is the assistant that will start the call, and assistants can be either persistent or transient. + +Each assistant should be assigned the relevant assistant transfer destinations. +Transfers are specified by assistant name and are used when the model recognizes a specific trigger. + +```json +{ + "squad": { + "members": [ + { + "assistantId": "information-gathering-assistant-id", + "assistantDestinations": [{ + "type": "assistant", + "assistantName": "Appointment Booking", + "message": "Please hold on while I transfer you to our appointment booking assistant.", + "description": "Transfer the user to the appointment booking assistant after they say their name." + }], + }, + { + "assistant": { + "name": "Appointment Booking", + ... + }, + } + ] + } +} +``` + + +## Best practices + +The following are some best practices for using Squads to reduce errors: + +- Group assistants by closely related tasks +- Create as few assistants as possible to reduce complexity +- Make sure descriptions for transfers are clear and concise