File structure

How a Meya bot's source code is structured.

Your Meya bot source code can be imported/exported from zip and/or connected to a GitHub code repository.

A Meya bot is made up of several primitives that make up it's source code:

  1. Flows: the YAML files containing a series of states that your bot executes
  2. Components: any custom Python code that executes at any state
  3. Intents: a set of YAML definitions that define when/if a flow should be invoked.
  4. Entities: a single CMS object used to store text-copy, media objects or object data.
<project root>
flows
  - flow1.yaml
  - flow2.yaml
  - ...
components
  - component1.py
  - component2.js
  - ...
  - componentN.py
  - …
cms
  - space1.yaml
  - space2.yaml
  - ...
- intents.yaml

Intent file format

A single intents.yaml file at the root of the source directory will store your intent definitions.

-   flow: gif
    intent: meya.keyword
    settings:
        keyword: gif
-   flow: greeting
    intent: meya.greetings
-   flow: hello_world
    intent: meya.keyword
    settings:
        keyword: hi
-   flow: weather
    intent: meya.keyword
    settings:
        keyword: weather

CMS file format

Each CMS space will be exported to it's own yaml file containing a list of all the contained entities.

-   io: output
    key: thanks
    language: ar
    tag: ''
    type: string
    value: شكر. أنا أتكلم باللغة الإنجليزية من الآن فصاعدا.
-   io: output
    key: thanks
    language: en
    tag: ''
    type: string
    value: Thanks. I'll speak in English from now on.
-   io: output
    key: thanks
    language: es
    tag: ''
    type: string
    value: Gracias. Hablaré en inglés a partir de ahora.
-   io: output
    key: thanks
    language: fr
    tag: ''
    type: string
    value: Merci. Je vais parler en anglais à partir de maintenant.
-   io: output
    key: thanks
    language: ja
    tag: ''
    type: string
    value: ありがとう。私は今から英語で話します。
-   io: output
    key: thanks
    language: ko
    tag: ''
    type: string
    value: 감사. 나는 지금부터 영어로 말할거야.
-   io: output
    key: thanks
    language: ru
    tag: ''
    type: string
    value: Благодарю. Теперь я буду говорить по-английски.