UltravoxSession
. The session is used to join and leave calls. The UltravoxSession
contains methods for:
Create Call
request.clientVersion
field in the Get Call
response.deferResponse
is set, the agent will not respond (i.e. no LLM generation will be done).
true
to skip LLM generation (agent won’t reply). Can be used to provide additional guidance to the model.'text'
or 'voice'
.selectedTools
during Create Call
.nameOverride
is set then must match that name. Otherwise must match modelToolName
.parameters
→ An object containing key-value pairs for the tool’s parameters. The keys will be strings.Returns → Either a string result, or an object with a result string and a responseType, or a Promise that resolves to one of these.For example:registerToolImplementation
.
ClientToolImplementation
function.'client' not 'http'
"client": {}
to the tool definition.Register Tool with Client
registerToolImplementation()
for more information.Only Body Parameters Allowed
UltravoxSession
exposes status. Based on the UltravoxSessionStatus
enum, status can be one of the following:
status | description |
---|---|
disconnected | Session is not connected. This is the initial state prior to joinCall. |
disconnecting | Session is in the process of disconnecting. |
connecting | Session is establishing the connection. |
idle | Session is connected but not yet active. |
listening | Listening to the end user. |
thinking | The model is processing/thinking. |
speaking | The model is speaking. |
UltravoxSession
object also provides debug messages. Debug messages must be enabled when creating a new session and then are available via an event listener similar to status and transcripts: