Create dynamic, multi-stage conversations.
Plan Your Stages
Implement a Stage Change Tool
new-stage
response type. This creates the new stage. How you send the response depends on the tool type:
X-Ultravox-Response-Type
header to new-stage
.responseType="new-stage"
on your ClientToolResult
object.Configure Stage Transitions
selectedTools
when creating the call as well as during new stages (if needed).selectedTools
during the creation of the call.
List Calls
) works as expected.
However, if you are using call stages then you most likely want to use the stage-centric API endpoints to get stage-specific settings, messages, etc.
Use List Call Stages
to get all the stages for a given call.
Ultravox API | Stage-Centric Equivalent |
---|---|
Get Call | Get Call Stage |
List Call Messages | List Call Stage Messages |
List Call Tools | List Call Stage Tools |
property | change with new stage? |
---|---|
systemPrompt | Yes |
temperature | Yes |
voice | Yes |
languageHint | Yes |
initialMessages | Yes |
selectedTools | Yes |
firstSpeaker | No |
model | No |
joinTimeout | No |
maxDuration | No |
timeExceededMessage | No |
inactivityMessages | No |
medium | No |
recordingEnabled | No |