This site is no longer updated.Go to new Conversational Cloud docs

JAICP DSL


JAICP DSL is a language designed for the development of the chatbot behavior logic. The JAICP DSL provides a convenient format for describing the finite state machine the chatbot is running on.

The script file has a tree structure. The degree of nesting is controlled by indentation, similar to python and yaml.


JAICP DSL uses the linguistic structures of two types:

  • NLU tags — sets the user's intentions.
  • Declarative tags — describe chatbot structure, set dependencies between files and rules of transition between states.
  • Reaction tags — are carried out when dialogue gets into a particular state.

Local and global tags

DSL contains global and local tags. Global tags include ! in the name, for example:

  • intent — local tag.
  • intent! — global tag.

The local tag is active only in the dialog context, and transition to the state is possible from the nearest parent state or from child states. You can use the global tag to transfer the dialogue into this state from any other state.


List of tags


Tag Description
intent The path to the intent is written after the tag. An intent is a key entity of the NLU service; it unifies a set of phrases, user intent and other metadata.
q Contains a pattern. It is a local tag, which works only within a current state and its nested states.
e Is used for a single example, a reference a user request is to be compared to. One tag is one reply.
eg An example group. When there a multiple examples for comparison, the e tag is impractical. You can use the eg tag and specify the required number of examples in a separate reference file.
event Reaction to an event occurring in a channel, account or project.
init Tag that allows you to specify the js-script to be executed when the bot script is loading. This js-script can install some handlers, create temporary variables, and perform other initialization.
patterns The named patterns are to appear in .sc file after this tag. You can use them within any project file.
require Tag serves to connect all the dependent files to the main script. In essence, it is an alternative option for indicating all the dependent files within chatbot.yaml.
state The current state of a chatbot. States can have a nested structure.
theme The entry point of a chatbot. The system goes into this state right after a bot’s launch.
a Delivers a text of the bot response.
buttons Buttons which execute transitions between script’s states.
go Deferred transition into specified state: reactions of a target state won’t be executed, but next user’s phrase will be processed in the target state’s context.
go! Immediate transition into specified state: all reactions of a target state will be performed.
if/else/elseif Tags for simple conditions, outputting different responses depending on the conditions, transition to other states depending on the conditions.
inlineButtons Inline-buttons. By clicking on the inline button data or URL (callback_data or URL respectively) can be passed on. Inline-buttons are displayed inside a dialogue as chatbot responses.
newSession Starts a new session.
random Executes one random chatbot reaction out of all nested reactions.
script Reaction script executes functions, inquiry processing logic, external system calls, work with the memory etc.
audio Use this tag to include audio recordings to bot replies.
image Output of an image.