Skip to main content

ai

Create an AI agent with a prompt.

Parameters

The only required parameter is prompt. But the others are quite powerful, so we recommend trying them out!

NameTypeDescription
promptobjectEstablishes the initial set of instructions and settings to configure the agent.
This is a required parameter.
post_promptobjectThe final set of instructions and configuration settings to send to the agent.
post_prompt_urlstringThe URL to which to send status callbacks and reports.
post_prompt_auth_userstringAuth username for post_url endpoint.
post_prompt_auth_passwordstringAuth password for post_url endpoint.
paramsobjectA JSON object containing parameters as key-value pairs.
SWAIGobjectAn array of JSON objects to create user-defined functions/endpoints that can be executed during the dialogue.
hintsstringAn array of hints (as strings) to provide context to the dialogue.
languagesobjectAn array of JSON objects defining supported languages in the conversation.
pronounceobjectAn array of JSON objects to clarify the AI's pronunciation of words or expressions.
verbose_logsbooleanEnable verbose logging.
hold_musicstringA URL for the hold music to play, accepting WAV, mp3, and FreeSWITCH tone_stream.
hold_on_processbooleanEnables hold music during SWAIG processing.
debug_webhook_urlstringEach interaction between the AI and end user is posted in real time to the established URL.
debug_webhook_levelbooleanEnables debugging to the set URL. If a URL is set, this param defaults to 1.
acknowledge_interruptionsboolean or stringInstructs the agent to acknowledge crosstalk and confirm user input when the user speaks over the agent.
interrupt_promptstringProvide a prompt for the agent to handle crosstalk.
interrupt_on_noisebooleanWhen enabled, barges agent upon any sound interruption longer than 1 second.
input_poll_freqstringCheck for input function with check_for_input. Example use case: Feeding an inbound SMS to AI on a voice call, eg., for collecting an email address or other complex information.
ai_volumestringSet the AI volume with numerical values between -50 and +50.
barge_match_stringstringTakes a string, including a regular expression, defining barge behavior. For example, this param can direct the AI to stop when the word "hippopotomus" is input.
barge_min_wordsstringDefines the number of words that must be input before triggering barge behavior, in a range of 1-99.
swaig_allow_swmlbooleanAllows your SWAIG to return SWML to be executed.
swaig_allow_settingsbooleanAllows tweaking any of the indicated settings, such as barge_match_string, using the returned SWML from the SWAIG function.
swaig_post_conversationbooleanPost entire conversation to any SWAIG call.
conversation_idstringUsed by check_for_input and save_conversation to identify an individual conversation.
transfer_summarybooleanPass a summary of a conversation from one AI agent to another. For example, transfer a call summary between support agents in two departments.
save_conversationbooleanPerforms an additional call to save the current conversation summary by conversation ID. Use this param to preserve conversation context between calls.
local_tzstringTakes a time zone string. For example: UTC+5, America/New_York, or any other convention defined by the International Bureau of Weights and Measures (BIPM).
background_filestringDefines a file via URL to play background noise.
background_file_loopsbooleanSets background_file behavior to loop if true.
background_file_volumestringDefines background_file volume within a range of -50 to +50.
digit_timeoutstringSets time duration to wait for DTMF before timing out, in a range from 1 to 30000 milliseconds.
digit_terminatorsstringSets a digit, such as a pound (#) sign, to terminate input. Fun fact: The pound sign is also known as an "octothorp."
end_of_speech_timeoutstringSets a time duration for the agent to wait after speech before timing out, in a range between 250 to 10000 milliseconds.
energy_levelstringSets voice detection threshold for user speech, in a range from 0 to 100 dB.
attention_timeoutstringSets a time duration for the user to respond to the AI agent before timeout, in a range from 10000 to 600000, or 0 milliseconds.
inactivity_timeoutstringSets a time duration for the user to speak before timeout, in a range from 10000 to 3600000.
outbound_attention_timeoutstringSets a time duration for the outbound call recipient to respond to the AI agent before timeout, in a range from 10000 to 600000.
languages_enabledbooleanAllows multilingualism when true.
consciencestringSets the prompt which binds the agent to its purpose.
agent_meta_dataobjectA powerful and flexible environmental variable which can accept arbitrary data. All contained information can be accessed and expanded within the prompt - for example, by using a template string.