Skip to content

Add squads to docs #79

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions mint.json
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,10 @@
{
"group": "Phone Calling",
"pages": ["phone-calling"]
},
{
"group": "Squads",
"pages": ["squads"]
}
]
},
Expand Down
52 changes: 52 additions & 0 deletions squads.mdx
Original file line number Diff line number Diff line change
@@ -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
Loading