String return
You can return a simple string, which will be used as the system prompt for the virtual agent:Dictionary return
This feature is experimental and may change without warning.
content
Equivalent to returning a string, this field specifies the system prompt:
utterance
Specifies the exact phrase the virtual agent will speak after executing the function:
content and utterance are returned:
- The agent will stream the
utteranceto the user and end the turn. - The
contentrules will apply to the next turn.
handoff
Initiates a call handoff after the function executes. This follows the format of a handoff object:
invite
Hands the call off using a SIP INVITE. Configuration fields depend on project telephony integration requirements:
hangup
Ends the call after the function executes:
listen Return Object
Configures the agent to listen on the next turn.
To use
asr.timeout, you must include an utterance. Without it, the timeout won’t apply.ASR timeout doesn’t apply to DTMF-only input. If using both channels, make sure you include an
utterance so the ASR settings take effect.
