Chaining assistants together linearly

I’m looking to use multiple different assistants to process a single user query. For example:

Assistant 1: determine the subject and intent of the user and pass to Assistant 2.
Assistant 2: come up with a response based on factors (includes tools like internet access etc). Pass to Assistant 3.
Assistant 3: filter for quality / appropriate language etc. Respond to the user.

The user’s query goes to Assistant 1, but it’s Assistant 3 that should respond.

I create a thread, and then a new “run” for Assistant 1, but then it responds to the user in the thread, which i don’t want. The instruction for Assistant 2 is inside the Run object under tools as a ToolAssistantToolsFunction. (this instruction is correct, and the one I want Assistant 2 to receive).

Can someone help me understand the mental model i need get this working?

2 Likes

like this?

  1. create thread

  2. add message

  3. run thread using assistant 1 with function calling to determine intent, etc.
    save tool result to result1
    cancel run immediately

  4. run thread using assistant2 appending result1 in instruction also with function calling
    save tool result to result2
    cancel run immediately

  5. run same thread using assistant 3 appending result2 in instruction