Skip to main content

Bot project structure

File structure

Main components of a chatbot project: source code with the conversation logic, automated tests and the configuration file. These components are usually separated: the source code is stored in the src folder, and tests are stored in the test folder. The configuration file must have the name chatbot.yaml and must reside in the project’s root folder.

Therefore, a minimum chatbot project contains:

  • The chatbot.yaml file that contains the project descriptor and is located in the project’s root folder.
  • The src folder where the main.sc file is located with the chatbot’s main script. This folder may also contain files with additional scripts, .csv dictionaries and .js scripts.
  • The test folder with the .xml tests for the chatbot operation script.

Project files

FileDescription
chatbot.yamlConfiguration file of the chatbot. It contains the name of the script main file, information about linked modules, configuration of the NLU module, list of tests and other configuration data.
.scScript files. These are the main files that define the conversation logic.
.jsJS library files. Contain JS code that can be used in script files. May contain functions, query processing logic, calls to external systems, etc.
.csvNamed entity dictionaries. These are required for bulk processing of city or country names, personal names, etc. in patterns.
.yamlDictionaries of responses and other parameters to be used in scripts.
.xmlTest files. Automatic tests that are executed at chatbot deployment time.
descriptor.jsonPath of the main configuration file chatbot.yaml. Used for project import/export.
.jgraph/jgraph.visualsScript visualization settings used by the J‑Graph visual editor.