> ## Documentation Index
> Fetch the complete documentation index at: https://docs.piebald.ai/llms.txt
> Use this file to discover all available pages before exploring further.

> In Piebald, you can queue messages to be sent when the model's done generating.

# Message queuing

export const MuxVideo = ({playbackId, title = "Video demo"}) => <iframe className="w-full aspect-video rounded-xl" src={`https://player.mux.com/${playbackId}?accent-color=%23ff8400`} title={title} allow="accelerometer; gyroscope; autoplay; encrypted-media; picture-in-picture" allowFullScreen></iframe>;

<Badge color="green">Available in [Piebald Pro](https://piebald.ai/pricing)</Badge>

While the agent is working, you may want to send additional messages to iterate or steer or to queue up another task when it's done with its current work.  Piebald has three modes for messaging during generation:

* **Interrupt & send immediately:** This will nterrupt the current generation or tool call immediately and send the message.
* **Queue & send as soon as possible:** This will send the message when the model is finished generating the current message or calling the current tool, but without forcibly interrupting it.
* **Queue as a follow-up:** This will send the message when the agent is completely finished with the task at hand, i.e. it responds with text only, without calling any tools.

Queued messages appear in a small box directly above the message input and can be reordered, discarded, or restored to the message input for editing.

Here's a demo where a message is queued while the model is generating:

<MuxVideo playbackId="pYWvzbNalKpxmeR00PXHWdV6e2akLyCaZUFwlMRZ3nBs" title="Message queuing (Pro)" />
