Skip to main content
PUT
Speak
Make the agent speak arbitrary text mid-conversation. Overrides whatever the agent was about to say. Use for scripted interjections, custom greetings, or human-in-the-loop takeover.

When to use

  • Human handoff: a live agent takes over and needs to say a specific thing
  • System notifications: announce something the LLM shouldn’t have to reason about (“Your call is being transferred…”)
  • Custom greetings: inject a personalized greeting the LLM might otherwise phrase awkwardly
  • Scripted flows: force the agent to say a specific line at a specific point in a structured workflow

What it does

The current LLM turn (if any) is interrupted. The text you supply is sent straight to TTS and the avatar renders it. After the utterance completes, the LLM regains control on the user’s next turn.

Example

Interrupt behavior

Add context afterwards

If you want the LLM to know it just said something outside its usual turn:
With add_to_context: true, the utterance is added to the LLM’s message history so it can reason about what was said.

Common uses

Trigger a personalized greeting

Announce transfer to human

Next steps

Authorizations

x-api-key
string
header
required

Path Parameters

conversation_id
string
required

The unique identifier of the active conversation.

Example:

"conv_abc123"

Body

application/json
text
string
required

The text the agent should speak in the conversation.

Example:

"Hello, Hi from team trugen."

Response

The agent has spoken the provided text.

message
string
Example:

"Agent is speaking the provided text."