The InjectAgentMessage message is a JSON message you can send to immediately trigger an agent statement.
InjectAgentMessage lets your server put words in the agent’s mouth mid-conversation. The optional behavior field controls how the message interacts with any ongoing user or agent turn: wait for silence, or queue within the current turn.
behavior valuesdefault: the agent speaks only if neither the user nor the agent is mid-turn. If a turn is in progress, the server rejects the request and replies with InjectionRefused. This matches the original InjectAgentMessage behavior.queue: the server appends the message after any ConversationText that is already queued, without interrupting the current agent turn or the in-flight think response. If nothing is queued, the agent speaks the message immediately.default: wait for silencequeue: append after any current ConversationTextThe server sends an AgentAudioDone message after the last InjectAgentMessage is spoken.
InjectionRefusedWhen behavior is default or queue and the request arrives while the user is mid-turn, the server ignores the request and replies with InjectionRefused. If the agent is mid-turn, the server returns InjectionRefused only when behavior is default.
Pick the behavior value that matches what you want to happen to the current turn.
defaultUse default when the injection is only appropriate during silence and you would rather drop it than step on the conversation.
queueUse queue when you want the agent to say something after whatever it is currently saying, without stepping on it. This is the right choice for filler during function calls, where the model has already emitted pre-function narration and you want to extend it rather than replace it.