# Research and Application of a Multi-Agent-Based Intelligent Mine Gas State Decision-Making System
## 4 Construction of the Intelligent Mine Gas State Decision-Making System  
### System Design  
In the design of the Intelligent Mine Gas State Decision-Making System, the choice of architecture is crucial. A modular architecture can enhance the system's flexibility and scalability, but it may also lead to increased complexity and affect data processing speed. While a single-layer structure is simple and easy to understand, it lacks modularity and struggles to adapt to future changes in requirements. Therefore, considering the system's complexity and future expansion needs, we opted for a layered architecture. The layered architecture clearly delineates system functional modules, improving maintainability and scalability. It breaks down complexity, allowing each layer to be independently optimized, thereby enhancing overall system performance and user experience.  
The layered architecture in this study is divided into three main levels: the data layer, the core layer, and the application layer, as illustrated in Figure 2. The purpose of this layering is to ensure accurate data collection, secure storage, and efficient processing, thereby guaranteeing the stable operation and high performance of the system.  
Data Layer: Responsible for collecting and integrating data sources related to gas safety production in mines and establishing a database to store and manage this critical information. The data layer ensures the integration of different data sources by standardizing data formats and interfaces, thereby enhancing the accuracy and consistency of the data. Through the comprehensive processing of this data, the data layer provides a rich and reliable information foundation for in-depth analysis and decision-making within the system.  
Core Layer: Serving as the intelligent core of the system, the LLMs undertake the critical task of advanced data processing and analysis. The LLM system integrates various technical modules, including agent workflow settings, prompt templates, tool management, memory management, human feedback retrieval-augmented generation, and asynchronous processing, to handle user queries or analyze data. It searches for relevant information in the knowledge base and generates responses based on the retrieved information set. By leveraging the powerful natural language understanding, text generation, and decision-making capabilities of LLMs, the core layer enhances the speed of data analysis and effectively responds to user queries.  
Application Layer: The application layer serves as the direct interface for user interaction with the system, offering a range of practical functions, including user management, file operations, alarm queries, intelligent Q&A, smart assessments, report generation, and voice assistance. The system features a graphical user interface that is easy to operate, allowing users to perform various tasks seamlessly. Additionally, the system provides data  
Figure 2: The three-layered structure of the intelligent mine gas state decision-making system, comprises the data layer, core layer, and application layer.  
visualization capabilities, making trends in gas concentration changes and alarm information clear and accessible for real-time monitoring and analysis. Through its intuitive interface design and intelligent recommendation features, the application layer enhances user convenience, enabling users to quickly access the information they need and efficiently manage gas safety.  
Through this layered architecture design, the system can effectively handle data related to mine safety production and provide corresponding services based on different user needs. Furthermore, this design approach facilitates system expansion and maintenance, creating conditions for future improvements and updates.