Alan AI Studio logs

With Alan AI Studio logs, you can get useful runtime information about your AI assistant, see how dialog scripts operate and identify issues. To access logs in Alan AI Studio, at the bottom of the code editor, click the up icon.

Alan AI logs the following types of events:

  • System logs: general system messages

  • Syntax logs: information about errors and problems in dialog scripts

  • Phrases logs: information about unrecognized phrases, input interactions and the AI assistant replies during dialog sessions


In addition to the system log data, you can generate log messages from your dialog script. For details, see Writing messages to Alan AI Studio logs.

To get information about a specific type of messages, use filters at the top of the logs panel:

  • Syntax OK: to display syntax errors in the dialog script

  • Errors: to display the runtime errors

  • Info: to display the info messages and messages written with the console.log function

  • Unrecognized: to display unrecognized users’ phrases

  • Input: to display input interactions

  • Output: to display output interactions

  • Cur. dialog: enable this option to display log messages only for the current dialog session

  • Cur. script: enable this option to display log messages only for the dialog script currently selected in the left pane

You can also export logs or clear the logs pane:

  • To export logs to a CSV file, in the top right corner of the logs pane, click the Download logs icon.

  • To clear logs, in the top right corner of the logs pane, click the Clear logs icon.


Writing messages to Alan AI Studio logs

To check how your dialog works and debug it, use the console.log() and console.error() functions. You can insert these functions in corresponding points of dialog scripts to:

  • Check the output for objects, variables and slots used in the script

  • Capture events

  • Troubleshoot errors and so on

To see the logged message, open Alan AI Studio logs, make sure the Info or Error filter is on and find the required line in Alan AI Studio logs.

In the example below, all values captured with the NUMBER and FOOD slots are written to the logs:

Dialog script
intent('I want $(NUMBER) $(FOOD burger_|pizza_|wing_) and $(NUMBER) $(FOOD burger_|pizza_|wing_)', p => {
    console.log('Numbers array:', p.NUMBER_);
    console.log('Food array:', p.FOOD_);`Your order is: ${p.NUMBER_[0].number} ${p.FOOD_[0].value} and ${p.NUMBER_[1].number} ${p.FOOD_[1].value}`);