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 1 commit
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
63 changes: 63 additions & 0 deletions assistants/multiple-assistants.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
---
title: "Multiple Assistants"
sidebarTitle: "Multiple Assistants"
description: "Use Multiple Assistants 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.

Multiple assistants enable calls to transfer assistants mid-conversation, while maintaining full conversation context.

## Usage

To use multiple assistants, you can pass multiple assistants in the `assistants` array when starting a call.
Each assistant model should be assigned the relevant transfer tool for other assistants.
Assistants are specified by name and are transferred when the model recognizes a specific trigger.

```json
{
"assistants": [
{
"name": "Personal Information",
"model": {
"provider": "openai",
"model": "gpt-4o",
"tools": [
{
"type": "transferCall",
"destinations": [
{
"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."
}
]
}
]
},
"firstMessage": "Hello! What's your name?",
...
},
{
"name": "Appointment Booking",
"model": {
"provider": "openai",
"model": "gpt-4o",
},
...
}
]
}
```


## Best practices

The following are some best practices for using multiple assistants 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
3 changes: 2 additions & 1 deletion mint.json
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,8 @@
"assistants/custom-llm",
"assistants/persistent-assistants",
"assistants/dynamic-variables",
"assistants/background-messages"
"assistants/background-messages",
"assistants/multiple-assistants"
]
},
{
Expand Down
Loading