Dialog scripts

To let users interact with your application with their voice, you must create a dialog script in Alan AI Studio. A dialog script is a scenario by which the dialog with the user is carried out. It contains a set of commands that the user can execute and actions that must be taken in response to these commands.

Dialog scripts are written in JavaScript. You can use Alan AI functions and entities and standard JavaScript means to write scripts. For details, see Dialog script concepts.

In Alan AI, you can create custom scripts or use predefined scripts. Alan AI comes with a library of script templates that can give you a good example of how a dialog script can be organized. You can add and remove predefined scripts from the project at any moment.

An Alan AI project can contain one or multiple dialog scripts. Multiple scripts can be helpful, for example, if you want to split the project logic and separate configuration and data structures from utility functions. This will make your project more transparent and easier to support.

In projects with multiple scripts, scripts are loaded in the order they are appear in the scripts panel, starting from the upper one.

To work with scripts in Alan AI Studio, you can do the following: