ai
Create an AI agent with a prompt. Since the text prompt is central to getting great results out of the AI, it is highly recommended that you also read the Prompting Best Practices guide.
Parameters
The only required parameter is prompt
. But the others are quite powerful, so we recommend trying them out!
Name | Type | Description |
---|---|---|
prompt | object | Establishes the initial set of instructions and settings to configure the agent. This is a required parameter. |
post_prompt | object | The final set of instructions and configuration settings to send to the agent. |
post_prompt_url | string | The URL to which to send status callbacks and reports. |
post_prompt_auth_user | string | Auth username for post_url endpoint. |
post_prompt_auth_password | string | Auth password for post_url endpoint. |
params | object | A JSON object containing parameters as key-value pairs. |
SWAIG | object | An array of JSON objects to create user-defined functions/endpoints that can be executed during the dialogue. |
hints | string | An array of hints (as strings) to provide context to the dialogue. |
languages | object | An array of JSON objects defining supported languages in the conversation. |
pronounce | object | An array of JSON objects to clarify the AI's pronunciation of words or expressions. |
verbose_logs | boolean | Enable verbose logging. |
hold_music | string | A URL for the hold music to play, accepting WAV, mp3, and FreeSWITCH tone_stream. |
hold_on_process | boolean | Enables hold music during SWAIG processing. |
debug_webhook_url | string | Each interaction between the AI and end user is posted in real time to the established URL. |
debug_webhook_level | boolean | Enables debugging to the set URL. If a URL is set, this param defaults to 1. |
acknowledge_interruptions | boolean or string | Instructs the agent to acknowledge crosstalk and confirm user input when the user speaks over the agent. |
interrupt_prompt | string | Provide a prompt for the agent to handle crosstalk. |
interrupt_on_noise | boolean | When enabled, barges agent upon any sound interruption longer than 1 second. |
input_poll_freq | string | Check 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_volume | string | Set the AI volume with numerical values between -50 and +50 . |
barge_match_string | string | Takes 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_words | string | Defines the number of words that must be input before triggering barge behavior, in a range of 1-99. |
swaig_allow_swml | boolean | Allows your SWAIG to return SWML to be executed. |
swaig_allow_settings | boolean | Allows tweaking any of the indicated settings, such as barge_match_string, using the returned SWML from the SWAIG function. |
swaig_post_conversation | boolean | Post entire conversation to any SWAIG call. |
conversation_id | string | Used by check_for_input and save_conversation to identify an individual conversation. |
transfer_summary | boolean | Pass a summary of a conversation from one AI agent to another. For example, transfer a call summary between support agents in two departments. |
save_conversation | boolean | Performs an additional call to save the current conversation summary by conversation ID. Use this param to preserve conversation context between calls. |
local_tz | string | Takes 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_file | string | Defines a file via URL to play background noise. |
background_file_loops | boolean | Sets background_file behavior to loop if true . |
background_file_volume | string | Defines background_file volume within a range of -50 to +50 . |
digit_timeout | string | Sets time duration to wait for DTMF before timing out, in a range from 1 to 30000 milliseconds. |
digit_terminators | string | Sets a digit, such as a pound (# ) sign, to terminate input. Fun fact: The pound sign is also known as an "octothorp." |
end_of_speech_timeout | string | Sets a time duration for the agent to wait after speech before timing out, in a range between 250 to 10000 milliseconds. |
energy_level | string | Sets voice detection threshold for user speech, in a range from 0 to 100 dB. |
attention_timeout | string | Sets 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_timeout | string | Sets a time duration for the user to speak before timeout, in a range from 10000 to 3600000 . |
outbound_attention_timeout | string | Sets a time duration for the outbound call recipient to respond to the AI agent before timeout, in a range from 10000 to 600000 . |
languages_enabled | boolean | Allows multilingualism when true . |
conscience | string | Sets the prompt which binds the agent to its purpose. |
agent_meta_data | object | A 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. |