# Enhancing Conversational Agent Development Through a Semi-Automatization Development Proposal
## 4 Proposal
### Definition of a Domain-Specific Language Through the Implementation of a Metamodel  
Within this proposal, a DSL was meticulously defined and implemented as a metamodel (MM) designated XatbotMM. This metamodel was developed using the Eclipse Modeling Framework (EMF), a component of the Eclipse Modeling Project (EMP) [37], and encapsulates the core abstractions and relationships necessary to define and manage conversational agents. Through this metamodel, chatbots can be conceptually represented as models composed of instances of its metaclasses. Figure 3 shows the design of the XatbotMM metamodel implemented in Eclipse. This metamodel comprises nine precisely defined metaclasses, each representing a distinct concept within the conversational agent domain of the Xatkit Chat Platform framework. * Platform: Specifies the platform used by the bot to interact with users, such as WhatsApp or React, as supported by XatbotMM. * Provider: Represents the NLP provider. Currently, it supports integration with DialogFlow and NLPJS, the latter being a library for natural language understanding tasks such as entity extraction, sentiment analysis, and automatic language detection. * Intents: Captures the conversational capabilities of the agent through attributes such as intent names and training sentences, which are essential for the NLP provider to recognize user inputs accurately. * State: Defines the states of the bot within the conversational flow. * Transition: Models the possible state transitions that determine the bot's behavior. * ConditionalTransition: Allows transitions between states to be triggered based on specific conditions. * TestMessage and MultimediaMessage: Represent test cases and multimedia content, respectively, which can be included in the conversation logic. Through the use of XatbotMM, multiple conversational agents can be efficiently constructed by defining models that specify their logic. Users need only define the intents, training sentences, states, transitions, and corresponding responses in the model. These  
Figure 3: The proposed XatbotMM. The asterisk at the end of an association indicates one or many-to-many relationship. high-level abstractions streamline the chatbot development process, reducing the complexity of implementation, and promoting consistency. Regarding the structure and behavior of the agent, the agent's logic is defined through four states, which collectively dictate its behavior:  
* stateInit: This state serves as the initialization point of the chatbot. Upon activation, the bot performs any necessary setup tasks and transitions control to the next state. * stateWaiting: In this state, the agent waits for the user's input. It analyzes the text received to determine whether it corresponds to a greeting or a request for information about the agent. * stateGreeting: If user input is classified as a greeting, the chatbot transitions to this state. Here, it generates and delivers an appropriate response to acknowledge the user's salutation. * statePresentation: Upon user inquiry about the chatbot itself (statePresentation), the agent provides relevant self-information before returning to the stateWaiting state, ensuring continuous readiness for subsequent user input. This process is also followed after the initial greeting (stateGreeting). For integration with NLP and deployment platforms, the model includes several additional components to enhance its functionality. * NLP Provider: The chatbot's ability to interpret user input and generate responses relies on an NLP provider. In the model, this element specifies the NLP service to be utilized, enabling intent recognition and language understanding. * Platform Specification: In the model, a platform element is defined to determine the deployment environment of the agent. In this example, the chatbot is configured to operate on the React platform, ensuring compatibility with this widely used development framework. Figure 4 presents an example of an ecore model of a conversational agent.