Use Squads to handle complex workflows and tasks.

Sometimes, complex workflows are easier to manage with multiple assistants. You can think of each assistant in a Squad as a leg of a conversation tree. For example, you might have one assistant for lead qualification, which transfers to another for booking an appointment if they’re qualified.

Prior to Squads you would put all functionality in one assistant, but Squads were added to break up the complexity of larger prompts into smaller specialized assistants with specific tools and fewer goals. 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.

1{
2 "squad": {
3 "members": [
4 {
5 "assistantId": "information-gathering-assistant-id",
6 "assistantDestinations": [{
7 "type": "assistant",
8 "assistantName": "Appointment Booking",
9 "message": "Please hold on while I transfer you to our appointment booking assistant.",
10 "description": "Transfer the user to the appointment booking assistant after they say their name."
11 }],
12 },
13 {
14 "assistant": {
15 "name": "Appointment Booking",
16 ...
17 },
18 }
19 ]
20 }
21}

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