Skip to main content
This guide assumes knowledge of what double-texting is, which you can learn about in the double-texting conceptual guide. The guide covers the enqueue option for double texting, which adds the interruptions to a queue and executes them in the order they are received by the client. Below is a quick example of using the enqueue option. Enqueue is the default double texting (multi-tasking) strategy when creating runs in the Agent Server.

Setup

First, we will define a quick helper function for printing out JS and CURL model outputs (you can skip this if using Python):
Then, let’s import our required packages and instantiate our client, assistant, and thread.

Create runs

Now let’s start two runs, with the second interrupting the first one with a multitask strategy of “enqueue”:

View run results

Verify that the thread has data from both runs:
Output: