Skip to main content

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!

NameTypeDescription
global_meta_dataOptionalobjectA powerful and flexible environmental variable which can accept arbitrary data that is set initially in the SWML script or from the SWML set_global_data action. This data can be referenced globally. All contained information can be accessed and expanded within the prompt - for example, by using a template string.
hintsOptionalstringAn array of hints (as strings) to provide context to the dialogue.
languagesOptionalobjectAn array of JSON objects defining supported languages in the conversation.
paramsOptionalobjectA JSON object containing parameters as key-value pairs.
post_prompt_auth_passwordOptionalstringAuth password for post_url endpoint.
post_prompt_auth_userOptionalstringAuth username for post_url endpoint.
post_promptOptionalobjectThe final set of instructions and configuration settings to send to the agent.
post_prompt_urlOptionalstringThe URL to which to send status callbacks and reports.
pronounceOptionalobjectAn array of JSON objects to clarify the AI's pronunciation of words or expressions.
promptRequiredobjectEstablishes the initial set of instructions and settings to configure the agent.
SWAIGOptionalobjectAn array of JSON objects to create user-defined functions/endpoints that can be executed during the dialogue.