1. Introduction
Artificial intelligence (AI) has brought significant transformation to the agriculture sector, opening many advanced and innovative avenues for researchers and agricultural domain experts [
1]. The growing use of AI in agriculture benefits not only farmers, but the entire food chain. Undoubtedly, the integration of cutting-edge technologies into conventional farming practices is essential to meet the demands of rapid population growth, with the population expected to reach 10 billion by 2050 [
2]. Rice is one of the major crops of Pakistan, contributing 8% to global rice production and 10% to the world’s rice exports [
3]. However, rice cultivation emits
(methane),
(nitrous oxide), and other greenhouse gases (GHGs), which significantly contribute to global warming [
4]. As outlined by the International Rice Research Institute (IRRI) [
5], proper land preparation is an essential step for rice cultivation; the land must be adequately leveled, and the soil moisture and conditions must be carefully monitored. AI has notably transformed various farming processes into digitized and automated frameworks, including soil tillage and seeding, weed detection and monitoring, crop yield prediction, harvest monitoring, livestock management, irrigation control, and more [
6]. The findings of this study align with UN SDGs 2 (Zero Hunger), 8 (Decent Work and Economic Growth), 13 (Climate Action), and 15 (Life on Land) [
7]. Robotic machines and autonomous systems are increasingly being used in agriculture to automate production processes and overall farm management. This adoption accelerates the crop production cycle and minimizes unnecessary delays [
8].
Recently, AI agents and agentic AI have gained considerable attention in fields such as healthcare, transportation, finance, smart cities, agriculture, and more [
9]. Today, AI agents are capable of autonomous learning to enhance their performance and can intelligently interact within dynamic environments [
10]. The distinction between AI agents and agentic AI lies in the fact that traditional AI agents function as single-entity systems designed to achieve goal-oriented tasks, while agentic AI consists of multiple agents that communicate and coordinate with one another to perform interrelated subtasks dynamically [
11,
12,
13]. Although AI technologies have been widely explored in agriculture, most existing studies have focused on isolated functionalities such as soil analyses [
14], climate predictions [
15], or vision-based disease detection [
16]. These approaches lack a unified framework that enables autonomous, multi-dimensional sensing and coordinated decision-making across field environments. Moreover, the current agricultural robotics research often emphasizes hardware development without integrating intelligent multi-agent coordination or real-time cross-modal data fusion [
17]. In the context of rice cultivation, particularly in developing countries like Pakistan, there remains a notable gap in systems capable of simultaneously monitoring soil nutrients, climate conditions, and plant health while providing actionable insights through natural language interfaces. The existing studies on agent-based agricultural systems have rarely incorporated modern large language models (LLMs) to facilitate autonomous reasoning, farmer interaction, or seamless integration with heterogeneous field agents [
18,
19]. To address these limitations, this study proposes a comprehensive agentic AI framework that integrates soil, climate, and vision-sensing agents into a coordinated multi-agent architecture supported by a locally developed agricultural robot. Furthermore, we introduced an LLM-powered chatbot built on the Gemini framework [
20], enabling the real-time interpretation of sensor data, natural language interaction, and autonomous decision support. This integrated approach fills the identified research gap by providing a practical, field-ready, multi-agent system capable of supporting modern precision agriculture and improving the rice farming efficiency [
21].
Figure 1 shows a conceptual view of the proposed work. Nevertheless, the main contributions of this work are mentioned below:
The proposal of an agent-based framework for smart agriculture.
The implementation of a multi-agent chatbot using an LLM for various tasks such as climate sensing, soil property monitoring, and vision-based rice plant disease detection.
The establishment of communication between Agent A (soil sensing), Agent B (weather sensing), and Agent C (vision sensing), all connected to a supervisor agent.
The development of a complete dashboard to receive and visualize sensor data.
An analysis and evaluation using loss and accuracy plots.
1.1. Problem Statement
Modern agriculture is rapidly transitioning toward data-driven and autonomous farming systems due to increasing climate uncertainty, soil degradation, labor shortages, and the growing demand for sustainable crop production. Although recent studies have highlighted the role of AI in soil assessments [
14], climate predictions [
15], and plant disease detection [
16], the existing solutions remain siloed and unable to operate collectively in real-time field environments. Furthermore, the current agricultural robotics and AI approaches lack a unified multi-agent or agentic AI framework capable of integrating heterogeneous sensing modalities, coordinating tasks autonomously, and supporting scalable farm automation [
17,
18]. These limitations led to the following research questions that guided this study:
How can AI be used to make data-driven decisions in farming using soil health, crop conditions, and weather patterns? Prior studies have emphasized the need for integrating soil, climate, and crop indicators into unified decision support systems [
14,
15].
How can agentic AI automate communication and workflow among multiple agricultural agents? Recent surveys have indicated that multi-agent systems in agriculture remain limited in autonomy, coordination, and real-time communication [
18].
What computer vision models can efficiently detect diseases in rice plants for real-time field deployment? Deep learning advancements exist, but few models are optimized for practical rice-field scenarios [
16].
How can weather forecasting be leveraged to support early decision-making and prevent agricultural losses? Studies have highlighted challenges in integrating predictive climate analytics directly into automated farm decisions [
15].
Therefore, there is a compelling need to develop an agentic AI-based agricultural framework that unifies soil sensing, climate forecasting, and vision-based disease detection into a coordinated multi-agent system capable of autonomous communication, optimized workflow distribution, and real-time decision support for smart rice farming.
1.2. Major Contributions
This study makes notable contributions to address the environmental impact of the agriculture industry with the integration of AI for a sustainable environment:
Agentic AI framework integration: A multi-agent AI framework is proposed in this study that integrates soil, weather, and vision agents to enable context-aware decision-making.
Comparative analysis of sequential models on soil data: Multiple soil analysis models, such as the LSTM, 1D-CNN, and GRU models, were trained to evaluate their performance on real-time sensor data and identify which model performs best.
Environmental awareness through sensor data: This work analyzed how temperature and humidity data alone can be useful in training weather forecasting models that support real-time environmental awareness.
Integration of vision and agentic AI: The performance of ViT, mobileViT, and diffusion models, combined with RiceNet, was evaluated on a rice disease dataset and integrated into a voting classifier within the agentic AI framework.
Real-time guidance for farmers: Real-time guidance is provided to farmers through an interactive chatbot and agronomists in regional languages using state-of-the-art large language models and generative AI techniques.
This study bridges the gap between traditional decision-making in agriculture and AI-enabled environmental intelligence with the integration of a multi-agent framework for soil, weather, and vision. It further evaluated the performance of different deep learning algorithms on crop and soil datasets while providing real-time assistance to farmers using a multilingual chatbot and agronomists’ advice to provide a sustainable agriculture environment. The rest of this paper is organized as follows:
Section 2 presents a literature review aligned with our work; in
Section 3, the system overview is covered; in
Section 4, the workflow of the multi-agent framework are presented; in
Section 5, the experiment and results are covered; in
Section 6, discussion and future work is covered; and in
Section 7 we conclude our work.
2. Literature Review
The world’s population is projected to reach 10 billion by 2050, creating an urgent need for effective and sustainable farming solutions [
22]. Traditional agricultural practices are becoming insufficient, making intelligent systems essential for optimizing food production and resource utilization [
8]. As noted by Rosana Cavalcante de Oliveira et al. [
22], modern agriculture faces increasing challenges such as climate change and supply chain disruptions. In response, researchers like Nazish Aijaz et al. [
1] highlight the role of AI-driven precision farming, where real-time data from Internet of Things (IoT) devices enhances crop yield and reduces waste. Similarly, Mohammed A. Hamed et al. [
23] discussed the use of AI-based predictive analytics to forecast yields and detect plant diseases at early stages, thereby improving decision-making and minimizing risks. In parallel, Din et al. [
24] addressed the challenge of rice-grain adulteration by introducing RiceNet, a deep CNN model that surpasses traditional techniques, achieving up to a 94% accuracy in classifying five rice grain varieties. Their research demonstrates how deep learning-based solutions can improve traditional farming and labor-intensive agriculture problems. Sumaira Ghazal et al. [
25] gave an overall overview of computer vision for agriculture, indicating its application throughout the digital life cycle, from image acquisition to treatment planning, but they also identified the difficulty of integrating these models in real-world settings due to environmental instability and the lack of available facilities, which restrict complete automation. Cinar et al. [
26] reported that the support vector machine (SVM) achieved an accuracy of 81.5% and a precision of 83.4%, indicating a moderate performance. Among the deep learning models, GoogleNet demonstrated superior results, with an accuracy of 89.4% and a precision of 87.3%. On the other hand, however, their proposed model included deep AlexNet achieving an accuracy of 96.1% with a precision of 94.3%, reflecting better modeling in comparison to GoogleNet. Building on these advancements, Kuska et al. [
27] emphasized the revolutionizing potential of LLMs for agriculture. They contended that LLMs are better, domain-specific search engines that return expert-level answers. This is consistent with Arcila’s [
28] perspective on ChatGPT (GPT-4) (Chat-Generative Pre-Trained Transformer) as a fusion of search engine and smart assistant that can provide targeted and context-aware farming guidance. For example, LLMs can augment farmer consultations by providing accurate guidance on crop growing, equipment, breeding, or plant pathology directly to users, even without the presence of human experts. This is most relevant in the case of smart agriculture systems, where autonomous decision-making relies on real-time sensor input and deep domain knowledge. To clearly highlight how existing studies align with the core challenges addressed in this research, the reviewed literature was systematically mapped to the four research questions, as summarized in
Table 1, demonstrating how prior work motivates the need for an integrated agentic AI framework for smart farming.
After identifying the research questions and the corresponding gaps highlighted in the literature, it became clear that the existing agricultural AI systems remain fragmented, lacking a unified agentic framework capable of autonomous sensing, decision-making, and field-level action. To address these limitations, we propose an integrated agentic AI system that extends precision agriculture toward full autonomy. At the core of this system is our custom-designed Mali Robot, developed specifically to automate critical farming operations based on real-time sensor feedback and logic derived from a large language model (LLM). The Mali Robot autonomously irrigates crops when the soil moisture levels are low, applies pesticides when rice leaf disease is detected, and issues alerts during unusual weather conditions. A multi-agent chatbot also gives farmers real-time, language-adaptive advice based on live data from soil, climate, and vision agents. This system, which uses sensing, thinking, and acting, shows how smart AI can change regular farming into a completely automated, data-focused environment.
Research Objectives
Sustainability in agriculture requires innovation and an improved approach to replace traditional farming practices that harm the environment. AI is capable of achieving this by optimizing current farming practices and introducing efficient techniques that promote proper resource management, a sustainable environment, and less human effort. Thus, the objectives of this study were as follows:
Develop an AI system that conducts real-time soil analyses using sensor data to estimate the soil health by measuring the moisture levels and nutrient content in the soil.
Integrate computer vision models to detect and classify diseases in rice leaves, supporting farmers in the application of treatment at an early stage.
Design an agentic AI framework that facilitates communication and workflow among soil, weather, and vision agents to achieve context-aware decision-making.
Evaluate and improve AI models to ensure that they provide accurate results and are reliable under different environmental situations.
From these objectives, this study proposes the following scope and rationale: Use AI and deep learning models to help the agricultural industry improve its productivity, minimize and optimize resource usage, boost the economy, and reduce the impact on the environment, thus contributing to the growth of sustainable agricultural practices and smart farming.
3. System Overview
The suggested system presents an agentic AI-based smart farming system that includes monitoring, analyzing, and responding to real-time agricultural conditions automatically. The system consists of three main elements: (1) sensing agents that are distributed on the farmland, (2) a supervisory agent that performs reasoning and decision coordination, and (3) an intelligent agricultural robot, the Mali Robot, which was developed as a physical representation of autonomous field action. All of these elements form a closed-loop ecosystem in which the flow of data, decision-making, and physical actions take place in mutual relation and continuously. The sensing layer is composed of three expert agents, namely Agent A (soil sensing), Agent B (weather sensing), and Agent C (vision-based crop monitoring). The individual agents gather real-time sensor data on low-cost, but reliable, sensors and send the information to the central supervisory agent. The supervisory agent takes in diverse data streams, makes inferences with the help of a large language model (LLM), and issues advisory or operational instructions. The core of the execution layer is the so-called Mali Robot, which is a mobile platform that is designed specifically to handle autonomous operations in rice fields. The robot was constructed using local hardware, with the addition of soil moisture sensors, a pesticide-spraying unit, a water pump integration unit, a motorized chassis, and an embedded microcontroller to support local decision-making. The supervisory agent controls the robot, and it is physically autonomous, as it irrigates crops, identifies and controls rice diseases, and alerts when the environment is unfavorable.
The system is based on a multi-agent chatbot, which is driven by the latest state-of-the-art LLM technology. It allows farmers to obtain recommendations tailored to them, real-time notifications, and actionable insights in local languages. The chatbot interacts directly with all the sensory agents as well as the Mali Robot, thus facilitating transparent and user-friendly decision-making.
3.1. Proposed Framework
This section contains the dataset overview and multi-agent framework for each agent.
Figure 2 shows the proposed methodology. The workflow steps in
Figure 2 are defined below:
Soil and weather inputs are sensed, including a rice crop plant image.
Data input from Step 1 are uploaded to the cloud.
Data from the cloud in Step 2 are sent to user smart devices.
From Step 3, the data are sent to the supervisor agent to handle user queries.
From Step 4, the supervisor agent’s response is sent back to user.
From Step 5, the response is stored in a database containing agent behaviors.
The proposed agentic AI system was aimed at changing traditional farming processes into coordinated, autonomous, and data-driven ones. The architecture shown in
Figure 2 has four critical layer: sensing, decision-making, action, and interaction that combine to make up a system of unified agentic AI where sensing, reasoning, and acting work together to establish fully autonomous farming. The efficiency of any of the elements is, however, strongly dependent on the quality and the variety of data utilized throughout the system. Specifically, proper soil measurements, weather forecasts, and crop imagery are required to instruct the supervisory agent, allow the Mali Robot to complete specific field tasks, and ensure that the multi-agent chatbot offers context-sensitive advice. Thus, the datasets used in the process of operationalizing the proposed framework must be described to perform soil sensing, climatic analyses, and a method of detecting rice diseases with the help of vision. The section below gives a more in-depth account of the datasets that were used in this research, as well as data acquisition, pre-processing, and integration within the agentic AI pipeline.
3.2. Mali Robot Manufacturing Overview
The Mali Robot was designed as a low-cost, modular agricultural platform capable of operating in rural farming environments. The manufacturing process consists of three major stages: mechanical fabrication, electrical integration, and system-level assembly.
The robot’s frame was constructed using a combination of lightweight wooden and metal components to ensure structural stability while keeping the manufacturing cost low. Based on the design shown in
Figure 3, the chassis included the following:
A vertical humanoid-style frame for mounting sensors at different heights.
A reinforced base plate to house onboard electronics and batteries.
High-traction, large-diameter wheels to support movement on uneven agricultural terrain.
All frame components were manually cut, drilled, and assembled using bolts and metal brackets. The modular layout allows for the easy replacement of sensors and mechanical upgrades. The robot integrates multiple sensing modules connected to a microcontroller platform (e.g., Arduino or ESP32). Each sensor was independently wired to the control board through shielded cables. A rechargeable lithium battery powered the entire system, including the motors, sensors, and communication modules. Cable routing was performed beneath the robot’s body to prevent physical obstruction during field operation.
During the final assembly stage, all sensing modules were mounted in their optimal positions on the robot frame, with the NPK and soil moisture sensors placed near the lower section, the distance sensor positioned at the front for obstacle detection, and the humidity–temperature module installed on the upper portion of the robot. An onboard enclosure was added to securely house the microcontroller and wireless communication units, ensuring protection from environmental exposure during field operation. After hardware installation, calibration procedures were performed for the NPK sensor, soil moisture probe, and environmental sensing modules to ensure accurate data acquisition before deployment. This modular manufacturing approach enhances the Mali Robot’s affordability, ease of maintenance, and adaptability, enabling it to perform multiple agricultural sensing tasks efficiently.
Table 2 presents a detailed overview of the sensors incorporated into the Mali Robot, including their measurement ranges and operational significance, thereby illustrating how each component contributes to the robot’s agricultural data acquisition framework.
3.3. Real-Time Data Acquisition for Predictions
The Mali Robot constantly gathers information in real time that is related to the environment and soil conditions via the sensing modules located throughout the body of the robot. All the sensors transmit their live data to the onboard microcontroller, which functions as the processor for the data acquisition. The NPK sensor and soil moisture probe, placed at the bottom of the frame, are used to detect the nutrient concentration and the water content in the soil at the surface of the field. At the same time, atmospheric data are measured by the temperature and humidity module on the upper part, and the distance sensor on the front detects obstacles and the spatial layout during navigation. All of the obtained signals are processed and digitized via the analog-to-digital conversion pipeline of the microcontroller. The information is subsequently sent in real time via a wireless communication interface through WiFi, and can be easily incorporated into the Arduino cloud-based server. The data from the cloud are transmitted to the dashboard, where they are pre-processed by normalizing, managing missing values, and filtering noise. These processed inputs are then sent to the AI-based prediction models, which consist of crop health assessments, soil condition assessments, and climate forecasting.
Dataset Overview
Two types of datasets were collected. One dataset was collected from the agriculture field of Memon Goth (Karachi), Gharo (Thatta), and Chilliya (Thatta) using the Mali Robot. The Mali Robot used sensors to sense data, through which the real-time values were uploaded onto the Arduino cloud. The cloud values were fetched to the dashboard through the Arduino API (Application Programming Interface).
Figure 3 shows the sensors used on the Mali Robot. The second dataset was the rice image dataset, which is well known and was obtained from Kaggle.
Soil Properties: This dataset was collected using the Mali Robot; it collected nitrogen, phosphorus, potassium, and soil moisture data from the soil using NPK (nitrogen, phosphorus and potassium) and soil moisture sensors. The dataset contained 12,000 samples, of which 80% belonged to the training set and 20% to the validation set.
Table 3 shows the data samples for the soil properties.
Figure 4 shows the Mali Robot deployment in an agricultural field, including soil and weather dataset collection and a farmer survey.
Weather Forecasting: This dataset was collected using the Mali Robot; it collected humidity and temperature data from the environment using a humidity and temperature sensor. The dataset contained 12,000 samples, of which 90% belonged to the training set and 10% to the validation set.
Table 3 shows the data samples for the weather variables.
Figure 4 shows the Mali Robot deployment in an agricultural field, including soil and weather dataset collection and a farmer survey.
Rice Crop Images: The rice crop image dataset comprised a well-known dataset from Kaggle (
https://www.kaggle.com/datasets/loki4514/rice-leaf-diseases-detection (accessed on 1 November 2025)). It consisted of 10 classes (bacterial leaf blight, brown spot, healthy, leaf blast, leaf scald, narrow brown spot, neck blast, rice hispa, sheath blight, and tungro). The image samples were split into 15,000 for the training set and 3422 for the validation set.
Figure 5 and
Figure 6 show the rice image dataset samples.
4. Workflow of the Multi-Agent Framework
In this section, we describe the workflow of the proposed multi-agent framework, outlining how the soil, weather, vision, and supervisory agents collaborate to sense the environment, analyze information, and trigger appropriate farming actions.
Figure 7 illustrates this workflow, showing how data flow begins at the sensing agents, is fused and interpreted by the supervisory agent, and ultimately results in autonomous decisions executed through the Mali Robot and the advisory chatbot. The following mathematical formulation further clarifies these interactions, the information flow, and the decision processes that enable the system to function autonomously under real-world agricultural conditions.
All the experiments were conducted using Python 3.10 with deep learning frameworks, including PyTorch 2.4.1 and TensorFlow 2.18. The architectures for the GRU, LSTM, and 1D-CNN models were implemented using PyTorch, while the ViT and MobileViT models were based on the timm and mobilevit libraries. The diffusion-based model was implemented using the HuggingFace Diffusers framework (version 1.5). Training was performed on a workstation equipped with an NVIDIA RTX 4060 GPU (8 GB VRAM), an Intel Core i9-13900HX CPU, and 16 GB RAM.
4.1. Biases and Challenges in Data Collection and Labeling
Sensor-based data acquisition is subject to several potential sources of bias. Soil and weather sensors may experience calibration drift, noise from environmental fluctuations, temporary signal loss, or incomplete readings due to hardware limitations. To mitigate these issues, the data were pre-processed using smoothing filters, missing-value interpolation, and periodic sensor calibration checks during field deployment. For the vision dataset, a Kaggle dataset was used, which was already labeled into 10 different classes, leading us to conclude that there were no biases or challenges with the vision dataset.
4.1.1. Soil Agent
The soil agent uses three different models to classify the soil health conditions into a binary classification (good and poor). It identifies the prediction based on the best confidence score from each model. The models used were the GRU, LSTM, and 1D-CNN models. Later, the soil agent provides the classification to the supervisor agent, which processes the results. Algorithm 1 shows the implementation of soil agent.
GRU (Gated Recurrrent Unit)
The GRU, introduced by Cho et al. [
30], is a computationally efficient substitute for the LSTM that streamlines the memory control mechanisms without losing the capacity to learn long-term dependencies. The GRU combines the forget gate and input gate into an update gate, and adds a reset gate to handle information flow, which decreases the model complexity and computational expense without compromising much in performance. The GRU cell updates as per Equation (
1) following the formulation introduced by Cho et al. [
30]. The hidden state in the GRU is the memory unit; it allows the model to remember previous inputs and apply that knowledge to make better predictions at each time step [
30].
where
LSTM (Long Short-Term Memory)
The LSTM network, proposed by Hochreiter and Schmidhuber [
31], is a particular flavor of a recurrent neural network (RNN) that has been specifically developed to solve the disadvantages of ordinary RNNs in dealing with long-range dependencies as a result of vanishing or exploding gradients. LSTM has a memory cell and three gates: the input gate, the forget gate, and the output gate that together control information flow, thus allowing the network to retain or discard information over long sequences. The LSTM network updates its hidden state as per Equation (
2) based on the research conducted in [
31,
32,
33].
where
LSTM’s gating system in a well-structured way counters gradient decay over long sequences and is well suited for the analysis of sequential data tasks.
1D-CNN
The 1D-CNN is a deep learning architecture that carries out convolution on one-dimensional data, and hence, it is well suited for time-series classification. Unlike RNNs, 1D-CNNs do not require sequence processing and are capable of effectively learning local spatial patterns through the use of filters [
34].
Table 4 shows the 1D-CNN architecture.
| Algorithm 1: Soil Algorithm: Soil health classification. |
Input: Soil readings X (nitrogen, phosphorus, potassium, moisture) Output: Soil health status ![Agriengineering 08 00008 i001 Agriengineering 08 00008 i001]() |
4.1.2. Weather Agent
The weather agent works by predicting the weather for the next 5 h. It uses two features: humidity and air temperature, along with timestamps from the sensors. It was trained on three different time-series models: the LSTM, GRU and 1D-CNN models. These models predict the weather for the next 5 min, and with recursive prediction, the agent predicts the weather for the next 5 h. It identifies the prediction based on the best confidence score from each model. Later, it provides the results to the supervisor agent, which processes the results. Algorithm 2 shows the implementation of weather agent.
| Algorithm 2: Weather Algorithm: Environmental humidity and temperature prediction. |
Input: Time-series readings X (humidity, temperature, timestamp) Output: Predicted humidity and temperature 1 2 3 ; // Prediction from LSTM model 4 ; // Prediction from GRU model 5 ; // Prediction from 1D-CNN model 6 ; // Ensemble averaging 7 return output ← Supervisor Agent(WeatherAgent) |
4.1.3. Vision Agent
The rice image dataset was trained on three models, ViT [
35], MobileViT [
36], and a diffusion model [
37,
38] as a feature extractor integrated with RiceNet [
24]. The model works on multi-class disease detection. The agent identifies the disease based on the best confidence score from each model and provides the results to the supervisor agent, which processes the results. Algorithm 3 shows the implementation of Vision agent.
MobileViT
MobileViT is a lightweight deep learning model that integrates the strengths of convolutional neural networks (CNNs) and ViT. Unlike standard ViTs, which directly split an image into patches and process them with self-attention, MobileViT first applies convolutions to capture local spatial features and then unfolds the resulting feature maps into non-overlapping patches. These patches are flattened and passed through a transformer encoder, enabling the model to learn global dependencies using self-attention mechanisms [
36]. The key advantage of MobileViT lies in its hybrid architecture: CNNs provide strong inductive biases such as locality and translation invariance, while transformers capture long-range contextual relationships across the image. This design achieves a high accuracy while maintaining computational efficiency and a low latency, making MobileViT suitable for deployment on mobile and edge devices [
38,
39].
4.1.4. Supervisor Agent
A supervisor agent or a master agent works like a communicator between two agents; it is integrated on Gemini API. It works as follows: For instance, a user could enter a query asking the supervisor agent about the current soil properties and what action they should take. The supervisor agent will analyze to which agent (soil agent, weather agent, or vision agent) this query should be sent. It will detect that this query is for the soil agent and will send the query to the soil agent. The soil agent will accept the query and provide the results with real-time soil values and a prediction, such as “Your soil properties include nitrogen = 350, potassium = 500, and phosphorus = 450; these values show that your soil condition is good”. Algorithm 4 shows the implementation of Supervisor agent.
In order to store the agents’ behavior over a span of time, we used simple, yet effective, memory storage criteria for each agent. To begin this, we used a vector database approach in which we stored the sensing and actions of Agents A, B, and C. We set the following criteria for sensing and action processes: sensing data storage for 3 months four times a day. Accordingly, we had 368 timestamps in our database. The following equations show the timestamp and agent sensing data.
| Algorithm 4: Supervisor Agent: Query-routing system. |
Input: User query Q Output: Response from respective agent ![Agriengineering 08 00008 i002 Agriengineering 08 00008 i002]() |
where
5. Experiments and Results
We implemented and tested three agents, each with different functionalities: a soil agent and weather agent, which work on tabular data, and a vision agent, which works on image data. These agents are integrated and connected with the supervisor agent to create multi-agent communication.
5.1. Soil Agent
5.1.1. GRU
GRU-based architecture was used to process the soil nutrient time-series data for classification. The results of the GRU are shown in
Figure 8, including the accuracy and loss graphs. The accuracy graph shows a training accuracy of 95.5% and a validation accuracy of 94%.
Table 6 shows a comparison of each model.
5.1.2. LSTM
The LSTM model was applied using time-series soil nutrient inputs to learn intricate temporal dependencies and conduct a binary classification of the soil quality classes. The results of the LSTM model are shown in
Figure 9, including the accuracy and loss graphs. The accuracy graph shows a training accuracy of 95.5% and a validation accuracy of 94%.
Table 6 shows a comparison of each model.
5.1.3. 1D-CNN
In the current research, a 1D-CNN was utilized in order to classify soil nutrient data by identifying important temporal features through the use of convolution and pooling layers. The results of the 1D-CNN are shown in
Figure 10, including the accuracy and loss graphs. The accuracy graph shows a training accuracy of 97% and a validation accuracy of 96%. Meanwhile,
Figure 11 shows the confusion matrix of each model.
Table 6 shows a comparison of each model.
5.2. Weather Agent
5.2.1. Temperature
The temperature variable was trained alongside its respective timestamps. The time-series prediction can be seen in
Figure 12, which shows the actual data vs. the prediction of the applied models. To evaluate the models, the MAE score was used. LSTM reached an MAE score of 0.36, the 1D-CNN reached a score of 0.28, and the GRU had the lowest score of 0.27. The lower the MAE, the better the model was at predicting the next outcome.
Figure 13 shows the MAE comparisons of each model implemented.
Table 7 shows a brief comparison of three weather models.
5.2.2. Humidity
The humidity variable was trained alongside its respective timestamps. The time-series prediction can be seen in
Figure 14, which shows the actual data vs. the prediction of the applied models. To evaluate the models, the MAE score was used. LSTM reached an MAE score of 5.7, 1D-CNN had an MAE score of 3.6, and GRU had the lowest score of 2.9. The lower the MAE, the better the model was at predicting the next outcome.
Figure 15 shows the MAE comparisons of each model implemented.
Table 7 shows a brief comparison of three weather models.
5.3. Vision Agent
5.3.1. Vision Transformer (ViT)
The ViT was trained on 10 classes of rice diseases. The transformer was trained on 10 epochs with a batch size = 32 and early stopping at patience = 4, meaning if the validation loss did not decrease for four straight epochs, then the training stopped, as this shows that the model did not improve further. Thus, the training was completed after nine epochs due to early stopping. We achieved a validation accuracy of 95%.
Figure 16 shows the accuracy and loss graphs for the ViT, while
Figure 17 shows the confusion matrix. We later applied cross-validation to the ViT for model stability for five k-folds and achieved an average accuracy of 92.54% with an average F1-score of 92.45%.
Figure 18 shows the accuracy and F1-score of each k-fold.
Table 8 shows a comparison of each deep learning model used by the vision agent.
5.3.2. MobileViT
The MobileViT was also trained on 10 classes of rice diseases. The transformer was trained with the same parameters as the simple ViT. With early stopping and patience = 4, the training was completed after 10 complete epochs. We achieved a validation accuracy of 98.51%.
Figure 19 shows the accuracy and loss graphs for MobileViT, while
Figure 20 shows the confusion matrix. To validate the accuracy, we applied cross-validation on MobileViT for five k-folds and achieved an average accuracy of 93.48% with an average F1-score of 93.48%.
Figure 21 shows the accuracy and F1-score of each k-fold.
Table 8 shows a comparison of each deep learning model used by the vision agent.
5.3.3. Diffusion Model (As a Feature Extractor) + RiceNet
The diffusion model was used as a feature extractor that was fed into the RiceNet architecture. We first trained 10 epochs; however, due to a low accuracy and a potential for achieving a better accuracy at more epochs, the model was later trained on 20 epochs with the same model-fitting parameters (patience = 4). The model achieved a validation accuracy of 85.39%.
Figure 22 shows the accuracy and loss graph, whereas
Figure 23 shows the confusion matrix.
Table 8 explains the details of the comparison of each deep learning model used by the vision agent.
5.4. Supervisor Agent
The supervisor agent serves as an integration layer that establishes a connection between the individual agents, ensuring that their outputs are not isolated, but rather combined into a unified response. The supervisor agent uses the open-source AI model LLM to generate intelligent and context-aware responses based on user queries, thereby acting as a connector between the system’s agents and the end user. By doing so, it not only retrieves relevant insights from the soil, climate, and vision agents, but it also synthesizes these insights into meaningful recommendations that can assist farmers in making informed decisions.
Table 9 illustrates the database output generated through this process, where the soil and climate agent values are combined and accompanied by suggested actions (if required). Meanwhile,
Figure 24 presents the multi-agent interface running on a mobile application, showcasing how the supervisor agent integrates the soil agent, weather agent, and vision agent into a single interactive system that delivers real-time, user-friendly results.
6. Discussion and Future Work
These results confirm that the agentic AI framework is efficient in supporting autonomous agricultural monitoring by combining sensing, predictions, and user interaction. The system being modular in character provides an opportunity to extend it by adding more sophisticated agents able to complete complex farming tasks, such as early stress detection, automated irrigation control, or yield forecasting. Moreover, multi-modal inputs such as soil nutrients, environmental properties, and images of rice crop plants show great promise for increasing the accuracy of decision-making when treated by specific agents. Nevertheless, some challenges remain. The current system relies on a small number of sensors; its predictive performance could be further enhanced with larger amounts of data from wider geographical areas and crop varieties. Apart from that, various environmental factors may affect the sensor performances and prediction models, such as extreme weather conditions, shifting soil conditions, and seasonal cycles. Future work could focus on the following directions:
The integration of additional sensors such as multispectral cameras, soil pH and EC sensors, wind-speed detectors, and real-time rainfall gauges for richer environmental understanding.
The implementation of ensemble learning and state-of-the-art models to enhance the predictions for better decision-making.
Adaptive on-device learning, enabling agents to fine-tune models using local field data without requiring cloud retraining.
Improved user interaction, such as adding multilingual support for low-literate farmers and users.
Scalability and generalization, including testing across multiple crops, regions, and soil types to make the framework robust for global deployment.
7. Conclusions
In this work, we propose an agent-based AI framework for the autonomous monitoring of agricultural land by fusing data from a variety of soil and environmental sensors with AI-driven analytics. The agents fetch the parameters of temperature, humidity, nitrogen, phosphorus, potassium, and rice crop plant imagery, then process these inputs into actionable insights for farmers and landowners. This framework demonstrates how agent-based systems can reduce manual labor, improve situational awareness, and foster data-driven farming practices. Our results prove that it is possible for agentic AI to efficiently streamline farming operations and enable the early detection of diseases, hence contributing to improved crop productivity. While this is promising, the addition of more diverse sensors, the enabling of autonomous control mechanisms, and the deployment of the framework at larger scales could lead to further improvement in its robustness. In general, the present work contributes to the growth of smart agriculture through a flexible and expandable agent-based solution that may evolve into a completely autonomous farming assistant in the future.
Author Contributions
Conceptualization, M.A., M.M., N.u.d., and M.F.S.; formal analysis, M.M. and M.F.S.; investigation, M.F.S., S.S., D.B., R.C.V., and M.H.T.; methodology, M.A., M.M., N.u.d., and M.F.S.; software, M.M.; supervision, M.F.S. and S.S.; validation, D.B., R.C.V., M.H.T., M.F.S., and S.S.; visualization, M.A., M.M., N.u.d., and S.S.; writing—original draft, M.A., M.M., and N.u.d.; writing—review and editing, M.A., M.M., and S.S. All authors have read and agreed to the published version of the manuscript.
Funding
This research received no external funding.
Institutional Review Board Statement
Not applicable.
Informed Consent Statement
Not applicable.
Data Availability Statement
Conflicts of Interest
All authors declare no conflicts of interest.
Abbreviations
The following abbreviations are used in this manuscript:
| 1D-CNN | One-Dimensional Convolutional Neural Network |
| AI | Artificial Intelligence |
| API | Application Programming Interface |
| ChatGPT | Chat-Generative Pre-Trained Transformer |
| CNN | Convolutional Neural Network |
| EU | European Union |
| FC | Fully Connected |
| GHG | Greenhouse Gases |
| GRU | Gated Recurrent Unit |
| IoT | Internet of Things |
| IRRI | International Rice Research Institute |
| LLM | Large Language Model |
| LSTM | Long Short-Term Memory |
| MAE | Mean Absolute Error |
| ML | Machine Learning |
| NLP | Natural Language Processing |
| NPK | Nitrogen, Phosphorus, and Potassium |
| ReLU | Rectified Linear Unit |
| RNN | Recurrent Neural Network |
| SDG | Sustainable Development Goal |
| SVM | Support Vector Machine |
| UN | United Nations |
| VAE | Variational Autoencoder |
| ViT | Vision Transformer |
References
- Aijaz, N.; Lan, H.; Raza, T.; Yaqub, M.; Iqbal, R.; Pathan, M.S. Artificial intelligence in agriculture: Advancing crop productivity and sustainability. J. Agric. Food Res. 2025, 20, 101762. [Google Scholar] [CrossRef]
- Hemathilake, D.; Gunathilake, D. Agricultural productivity and food supply to meet increased demands. In Future Foods; Bhat, R., Ed.; Academic Press: Cambridge, MA, USA, 2022; pp. 539–553. [Google Scholar]
- Ilyas, I.; Sangi, U.A.; Nusrat, S.; Tariq, I. Exploring Potential of Rice Exports from Pakistan; Report No. 02/2022; Research Wing, Agro & Food Division, Trade Development Authority of Pakistan (TDAP): Islamabad, Pakistan, 2022. Available online: https://tdap.gov.pk/wp-content/uploads/2025/01/Exploring-Potential-of-Rice-Exports-from-Pakistan.pdf (accessed on 1 November 2025).
- Loaiza, S.; Verchot, L.; Valencia, D.; Costa, C.; Trujillo, C.; Garcés, G.; Puentes, O.; Ardila, J.; Chirinda, N.; Pittelkow, C. Identifying Rice Varieties for Mitigating Methane and Nitrous Oxide Emissions under Intermittent Irrigation. J. Environ. Manag. 2024, 372, 123376. [Google Scholar] [CrossRef] [PubMed]
- Land Preparation—Step by Step Production. Available online: http://www.knowledgebank.irri.org/step-by-step-production/pre-planting/land-preparation (accessed on 1 November 2025).
- Kisliuk, B.; Krause, J.C.; Meemken, H.; Saborío Morales, J.C.; Müller, H.; Hertzberg, J. AI in current and future agriculture: An introductory overview. KI—KüNstliche Intell. 2023, 37, 117–132. [Google Scholar] [CrossRef]
- United Nations, Department of Economic and Social Affairs. Sustainable Development Goals—The 17 Goals. Available online: https://sdgs.un.org/goals (accessed on 1 November 2025).
- Talaviya, T.; Shah, D.; Patel, N.; Yagnik, H.; Shah, M. Implementation of artificial intelligence in agriculture for optimisation of irrigation and application of pesticides and herbicides. Artif. Intell. Agric. 2020, 4, 58–73. [Google Scholar] [CrossRef]
- Sapkota, R.; Roumeliotis, K.I.; Karkee, M. AI agents vs. agentic AI: A conceptual taxonomy, applications and challenges. arXiv 2025, arXiv:2505.10468. [Google Scholar] [CrossRef]
- Gridach, M.; Nanavati, J.; Abidine, K.Z.E.; Mendes, L.; Mack, C. Agentic AI for scientific discovery: A survey of progress, challenges, and future directions. arXiv 2025, arXiv:2503.08979. [Google Scholar] [CrossRef]
- Acharya, D.; Kuppan, K.; Ashwin, D.B. Agentic AI: Autonomous intelligence for complex goals—A comprehensive survey. IEEE Access 2025, 13, 18912–18936. [Google Scholar] [CrossRef]
- Deng, Z.; Guo, Y.; Han, C.; Ma, W.; Xiong, J.; Wen, S.; Xiang, Y. AI agents under threat: A survey of key security challenges and future pathways. ACM Comput. Surv. 2025, 57, 1–36. [Google Scholar] [CrossRef]
- Bornet, P.; Wirtz, J.; Davenport, T.; Cremer, D.; Evergreen, B.; Fersht, P.; Gohel, R.; Khiyara, S. Agentic Artificial Intelligence: Harnessing AI Agents to Reinvent Business, Work, and Life; John Wiley & Sons, Inc.: Hoboken, NJ, USA, 2025. [Google Scholar]
- Kumar, R.; Singh, A. Applications of Artificial Intelligence in Soil Analysis and Soil Health Monitoring: A Comprehensive Review. Comput. Electron. Agric. 2023, 210, 107999. [Google Scholar]
- Fernandez, L.; Gupta, M. AI-driven Climate Prediction Models for Precision Agriculture: Current Advances and Future Directions. Agric. Syst. 2023, 212, 103629. [Google Scholar]
- Zhang, Y.; Rahman, H. Deep Learning for Plant Disease Detection: A Review of Recent Advances. Plant Methods 2023, 19, 1–18. [Google Scholar]
- Lopez, D.; Ahmed, S. Agricultural Robotics: A Review of Field Robots, Autonomous Systems, and Intelligent Farm Mechanization. J. Field Robot. 2024, 40, 45–68. [Google Scholar]
- Patel, K.; Oliveira, T. Limitations and Opportunities of Multi-Agent Systems in Smart Agriculture. Expert Syst. Appl. 2024, 236, 121234. [Google Scholar]
- Li, H.; Wu, H.; Li, Q.; Zhao, C. A review on enhancing agricultural intelligence with large language models. Artif. Intell. Agric. 2025, 15, 671–685. [Google Scholar] [CrossRef]
- Gemini Team. Gemini: A family of highly capable multimodal models. arXiv 2023, arXiv:2312.11805. [Google Scholar] [CrossRef]
- Akhter, R.; Sofi, S.A. Precision agriculture using IoT data analytics and machine learning. J. King Saud Univ.-Comput. Inf. Sci. 2022, 34, 5602–5618. [Google Scholar] [CrossRef]
- Oliveira, R.C.d.; Silva, R.D.d.S.e. Artificial intelligence in agriculture: Benefits, challenges, and trends. Appl. Sci. 2023, 13, 7405. [Google Scholar] [CrossRef]
- Hamed, M.A.; El-Habib, M.F.; Sababa, R.Z.; Al-Hanjor, M.M.; Abunasser, B.S.; Abu-Naser, S.S. Artificial intelligence in agriculture: Enhancing productivity and sustainability. Int. J. Eng. Inf. Syst. 2024, 8, 1–8. [Google Scholar]
- Din, N.M.U.; Assad, A.; Dar, R.A.; Rasool, M.; Sabha, S.U.; Majeed, T.; Islam, Z.U.; Gulzar, W.; Yaseen, A. RiceNet: A deep convolutional neural network approach for classification of rice varieties. Expert Syst. Appl. 2023, 235, 121214. [Google Scholar] [CrossRef]
- Ghazal, S.; Munir, A. Computer vision in smart agriculture and precision farming: Techniques and applications. Artif. Intell. Agric. 2024, 13, 64–83. [Google Scholar] [CrossRef]
- Cinar, I.; Koklu, M. Classification of rice varieties using artificial intelligence methods. Int. J. Intell. Syst. Appl. Eng. 2019, 7, 188–194. [Google Scholar] [CrossRef]
- Kuska, M.T.; Wahabzada, M.; Paulus, S. AI for crop production—Where can large language models (LLMs) provide substantial value? Comput. Electron. Agric. 2024, 221, 108924. [Google Scholar] [CrossRef]
- Arcila, B.B. Is it a platform? Is it a search engine? It’s ChatGPT! The European liability regime for large language models. J. Free Speech L. 2023, 3, 455. [Google Scholar]
- Soil NPK Sensor Probe for Agricultural Nitrogen Phosphorus Potassium Kit. Available online: https://instock.pk/soil-npk-sensor-probe-for-agricultural-nitrogen-phosphorus-potassium-kit.html (accessed on 1 November 2025).
- Cho, K.; Van Merriënboer, B.; Gulcehre, Ç.; Bahdanau, D.; Bougares, F.; Schwenk, H.; Bengio, Y. Learning phrase representations using RNN encoder–decoder for statistical machine translation. arXiv 2014, arXiv:1406.1078. [Google Scholar]
- Hochreiter, S.; Schmidhuber, J. Long short-term memory. Neural Comput. 1997, 9, 1735–1780. [Google Scholar] [CrossRef] [PubMed]
- Graves, A. Generating Sequences With Recurrent Neural Networks. arXiv 2013, arXiv:1308.0850. [Google Scholar]
- Chung, J.; Gulcehre, C.; Cho, K.; Bengio, Y. Empirical Evaluation of Gated Recurrent Neural Networks on Sequence Modeling. arXiv 2014, arXiv:1412.3555. [Google Scholar] [CrossRef]
- Kiranyaz, S.; Avci, O.; Abdeljaber, O.; Ince, T.; Gabbouj, M.; Inman, D.J. 1D convolutional neural networks and applications: A survey. Mech. Syst. Signal Process. 2021, 151, 107398. [Google Scholar] [CrossRef]
- Dosovitskiy, A.; Beyer, L.; Kolesnikov, A.; Weissenborn, D.; Zhai, X.; Unterthiner, T.; Dehghani, M.; Minderer, M.; Heigold, G.; Gelly, S.; et al. An image is worth 16x16 words: Transformers for image recognition at scale. arXiv 2021, arXiv:2010.11929. [Google Scholar] [CrossRef]
- Mehta, S.; Rastegari, M. MobileViT: Light-weight, general-purpose, and mobile-friendly vision transformer. arXiv 2022, arXiv:2110.02178. [Google Scholar]
- Rombach, R.; Blattmann, A.; Lorenz, D.; Esser, P.; Ommer, B. High-resolution image synthesis with latent diffusion models. arXiv 2022, arXiv:2112.10752. [Google Scholar] [CrossRef]
- Howard, A.; Sandler, M.; Chu, G.; Chen, L.-C.; Chen, B.; Tan, M.; Wang, W.; Zhu, Y.; Pang, R.; Vasudevan, V.; et al. Searching for MobileNetV3. arXiv 2019, arXiv:1905.02244. [Google Scholar] [CrossRef]
- Howard, A.G.; Zhu, M.; Chen, B.; Kalenichenko, D.; Wang, W.; Weyand, T.; Andreetto, M.; Adam, H. MobileNets: Efficient convolutional neural networks for mobile vision applications. arXiv 2017, arXiv:1704.04861. [Google Scholar] [CrossRef]
Figure 1.
Conceptual figure illustrating a coordinated agricultural multi-agent system deployed across a crop field. Field agents (A, B, and C) perform localized sensing and operational tasks while transmitting data to Agent D, the supervisory controller. Agent D interfaces with a cloud-enabled agriculture field analysis platform to support decision-making and farm management. The diagram emphasizes hierarchical communication, field coverage, and agent collaboration.
Figure 1.
Conceptual figure illustrating a coordinated agricultural multi-agent system deployed across a crop field. Field agents (A, B, and C) perform localized sensing and operational tasks while transmitting data to Agent D, the supervisory controller. Agent D interfaces with a cloud-enabled agriculture field analysis platform to support decision-making and farm management. The diagram emphasizes hierarchical communication, field coverage, and agent collaboration.
Figure 2.
Proposed methodology of the agentic AI framework for smart agriculture.
Figure 2.
Proposed methodology of the agentic AI framework for smart agriculture.
Figure 3.
Sensors on Mali Robot for soil and weather agents, showing NPK, soil moisture, humidity, temperature, and distance sensors.
Figure 3.
Sensors on Mali Robot for soil and weather agents, showing NPK, soil moisture, humidity, temperature, and distance sensors.
Figure 4.
Mali Robot deployment in an agricultural field with soil and weather dataset collection and a farmer survey in the Sindh region, Pakistan.
Figure 4.
Mali Robot deployment in an agricultural field with soil and weather dataset collection and a farmer survey in the Sindh region, Pakistan.
Figure 5.
Rice image dataset: 1 (bacterial leaf blight), 2 (brown spot), 3 (healthy), 4 (leaf blast), and 5 (leaf scald).
Figure 5.
Rice image dataset: 1 (bacterial leaf blight), 2 (brown spot), 3 (healthy), 4 (leaf blast), and 5 (leaf scald).
Figure 6.
Rice image dataset: 6 (narrow brown spot), 7 (neck blast), 8 (rice hispa), 9 (sheath blight), and 10 (tungro).
Figure 6.
Rice image dataset: 6 (narrow brown spot), 7 (neck blast), 8 (rice hispa), 9 (sheath blight), and 10 (tungro).
Figure 7.
Workflow of the multi-agent framework.
Figure 7.
Workflow of the multi-agent framework.
Figure 8.
Soil agent: GRU accuracy and loss.
Figure 8.
Soil agent: GRU accuracy and loss.
Figure 9.
Soil agent: LSTM accuracy and loss.
Figure 9.
Soil agent: LSTM accuracy and loss.
Figure 10.
Soil agent: 1D-CNN accuracy and loss.
Figure 10.
Soil agent: 1D-CNN accuracy and loss.
Figure 11.
Soil agent: GRU confusion matrix (left), 1D-CNN confusion matrix (center), and LSTM confusion matrix (right).
Figure 11.
Soil agent: GRU confusion matrix (left), 1D-CNN confusion matrix (center), and LSTM confusion matrix (right).
Figure 12.
Weather agent: actual temperature vs. predicted temperature.
Figure 12.
Weather agent: actual temperature vs. predicted temperature.
Figure 13.
Weather agent: MAE comparison of temperature predictive models.
Figure 13.
Weather agent: MAE comparison of temperature predictive models.
Figure 14.
Weather agent: actual humidity vs. predicted humidity.
Figure 14.
Weather agent: actual humidity vs. predicted humidity.
Figure 15.
Weather agent: MAE comparison of humidity predictive models.
Figure 15.
Weather agent: MAE comparison of humidity predictive models.
Figure 16.
Vision agent: ViT accuracy and loss graph.
Figure 16.
Vision agent: ViT accuracy and loss graph.
Figure 17.
Vision agent: ViT confusion matrix.
Figure 17.
Vision agent: ViT confusion matrix.
Figure 18.
Vision agent: accuracy and F1-score at each k-fold.
Figure 18.
Vision agent: accuracy and F1-score at each k-fold.
Figure 19.
Vision agent: MobileViT accuracy and loss graphs.
Figure 19.
Vision agent: MobileViT accuracy and loss graphs.
Figure 20.
Vision agent: MobileViT confusion matrix.
Figure 20.
Vision agent: MobileViT confusion matrix.
Figure 21.
Vision agent: MobileViT k-folds.
Figure 21.
Vision agent: MobileViT k-folds.
Figure 22.
Vision agent: diffusion model + RiceNet accuracy and loss graphs.
Figure 22.
Vision agent: diffusion model + RiceNet accuracy and loss graphs.
Figure 23.
Vision agent: diffusion model + RiceNet confusion matrix.
Figure 23.
Vision agent: diffusion model + RiceNet confusion matrix.
Figure 24.
Supervisor agent: weather and soil conditions (left) and vision agent (right).
Figure 24.
Supervisor agent: weather and soil conditions (left) and vision agent (right).
Table 1.
Mapping of literature to research questions in agentic AI-based smart farming.
Table 1.
Mapping of literature to research questions in agentic AI-based smart farming.
| Research Question | Key Findings from Literature | Reference |
|---|
| RQ1: Data-driven decision-making using soil, crop, and weather data | AI and IoT enable real-time sensing for improved yield, reduced waste, and predictive analytics for disease and yield forecasting. Climate change and supply disruptions increase the need for data-driven agricultural decisions. | Aijaz et al. [1];
Hamed et al. [23]; Oliveira et al. [22];
Talaviya et al. [8] |
RQ2: Agentic AI for multi-agent communication and workflow automation | Existing agricultural AI systems lack autonomous coordination. Multi-agent frameworks with LLMs improve decision-making, enable farmer consultation, and support workflow delegation. | Kuska et al. [27];
Arcila [28]; Patel and Oliveira [18] |
RQ3: Vision models for rice disease detection | Deep learning models such as CNNs, GoogleNet, and AlexNet outperform traditional ML methods for rice disease and grain classification. Deployment remains challenging in unstable real-world environments. | Din et al. [24];
Ghazal and Munir [25];
Cinar and Koklu [26] |
| RQ4: Role of weather forecasting in proactive decision-making | AI-driven climate and weather forecasting reduces risk and improves planning, supporting proactive decision-making and early interventions. | Fernandez and Gupta [15]; Oliveira et al. [22] |
Table 2.
Detailed specifications of the sensors used in the Mali Robot [
29].
Table 2.
Detailed specifications of the sensors used in the Mali Robot [
29].
| Sensor | Specifications/Measured Values | Meaning and Purpose |
|---|
| NPK Sensor (Nitrogen, Phosphorus, Potassium) | N: 0–1999 mg/kg P: 0–1999 mg/kg K: 0–1999 mg/kg Output: Analog/Digital
| Measures the soil content of nutrients essential for rice growth. Higher nitrogen improves leaf development, phosphorus strengthens roots, and potassium enhances plant immunity. |
| Soil Moisture Sensor | | Determines the water percentage present in soil. Values < 20% indicate dry soil, while values > 70% indicate water saturation. Used for irrigation control and water management. |
| Humidity and Temperature Sensor (DHT22/AM2302) | | Monitors environmental conditions to interpret microclimate behavior, disease probability, and evapotranspiration rate. |
| Distance Sensor (Ultrasonic HC-SR04) | Range: 2–400 cm Accuracy: ±3 mm Frequency: 40 kHz
| Measures the distance to obstacles in front of the robot. Used for navigation, obstacle avoidance, and safe movement across fields. |
Table 3.
Data samples for soil and weather properties.
Table 3.
Data samples for soil and weather properties.
| Timestamp | Potassium (pot) | Phosphorus (phos) | Nitrogen (nit) | Soil Moisture | Humidity | Temperature | Distance |
|---|
| 6 August 2025 19:24 | 138.5 | 45.2 | 35.4 | 72.1 | 48 | 30 | 0 |
| 6 August 2025 19:23 | 121.2 | 25.9 | 24.7 | 66.9 | 52 | 32 | 0 |
| 6 August 2025 19:22 | 88.9 | 14.0 | 81.4 | 77.3 | 49 | 30 | 0 |
| 6 August 2025 19:21 | 108.3 | 40.5 | 40.0 | 47.9 | 40 | 31 | 0 |
| 6 August 2025 19:20 | 179.3 | 33.6 | 67.3 | 53.8 | 54 | 32 | 0 |
| 6 August 2025 19:19 | 178.2 | 30.0 | 44.7 | 46.1 | 56 | 30 | 0 |
| 6 August 2025 19:18 | 152.7 | 47.2 | 74.1 | 51.8 | 68 | 31 | 0 |
| 6 August 2025 19:17 | 88.5 | 11.5 | 45.5 | 64.0 | 63 | 31 | 0 |
| 6 August 2025 19:16 | 185.1 | 40.4 | 71.9 | 56.9 | 65 | 31 | 0 |
| 6 August 2025 19:15 | 65.9 | 17.5 | 72.6 | 48.0 | 56 | 32 | 0 |
Table 4.
1D-CNN architecture overview.
Table 4.
1D-CNN architecture overview.
| Layer No. | Layer Type | Details |
|---|
| 1 | Convolutional (Conv1D) | 64 filters, kernel size = 2, activation = ReLU |
| 2 | MaxPooling1D | Pool size (default or defined), reduces spatial dimensions |
| 3 | Dropout | Dropout rate (e.g., 0.5) to prevent overfitting |
| 4 | Flatten | Converts the feature map into a 1D vector |
| 5 | Dense (Hidden) | Fully connected layer, activation = ReLU |
| 6 | Dense (Output) | 1 unit, activation = sigmoid (for binary classification) |
Table 5.
Vision transformer (ViT) architecture description.
Table 5.
Vision transformer (ViT) architecture description.
| Component | Description |
|---|
| Input Image | 224 × 224 RGB image |
| Patch Embedding | Splits image into 16 × 16 patches, resulting in 14 × 14 = 196 patches |
| Patch + Position Embedding | Each patch (3 × 16 × 16) is flattened to a 768-d vector; positional embeddings are added |
| CLS Token | A learnable token prepended to the patch sequence is used for classification |
| Transformer Encoder | 12 identical blocks consisting of the following:
Multi-head self-attention (12 heads) MLP (feedforward) with hidden dimension = 3072 LayerNorm and residual connections
|
| Final LayerNorm | Applied after the last transformer block |
| Classification Head | Linear layer mapping 768 → 10 |
Table 6.
Model comparison for soil predictions.
Table 6.
Model comparison for soil predictions.
| Model | Epochs | Training Accuracy | Validation Accuracy |
|---|
| GRU | 25 | 95.8% | 94% |
| LSTM | 25 | 95.5% | 93.4% |
| 1D-CNN | 25 | 97% | 96% |
Table 7.
MAE comparison of models for weather predictions.
Table 7.
MAE comparison of models for weather predictions.
| Model | Humidity MAE | Temperature MAE |
|---|
| LSTM | 5.7 | 0.36 |
| GRU | 2.9 | 0.27 |
| 1D-CNN | 3.6 | 0.28 |
Table 8.
Training and cross-validation results of deep learning models.
Table 8.
Training and cross-validation results of deep learning models.
| Deep Learning Model | Epochs | Patience | Training Accuracy | K-Folds | Cross-Validation Accuracy | Cross-Validation F1-Score |
|---|
| ViT | 10 | 4 | 95% | 5 | 92.5% | 92.5% |
| MobileViT | 10 | 4 | 98.5% | 5 | 93.5% | 93.5% |
| Diffusion + RiceNet | 20 | 4 | 85.4% | - | - | - |
Table 9.
Agent database showing soil and weather actions for the agriculture fields of Karachi and Thatta.
Table 9.
Agent database showing soil and weather actions for the agriculture fields of Karachi and Thatta.
| Timestamp | Climate Action | Soil Action | Climate Values | Soil Values | Climate Priority | Soil Priority |
|---|
| 23 May 2025 20:52 | Recommend cooling | Urgent nitrogen fertilizer req | temp: 36, humd: 84 | nit: 304, phos: 159, pot: 461 | high | critical |
| 23 May 2025 20:51 | Recommend cooling | Reduce nitrogen application | temp: 36, humd: 80 | nit: 706, phos: 168, pot: 97 | high | medium |
| 23 May 2025 20:50 | Recommend decreasing | Reduce nitrogen application | temp: 25.9, humd: 82 | nit: 990, phos: 63, pot: 392 | high | medium |
| 23 May 2025 20:49 | Recommend cooling | Reduce phosphorus application | temp: 35.8, humd: 76 | nit: 666, phos: 165, pot: 133 | high | medium |
| 23 May 2025 20:48 | Recommend cooling | Reduce nitrogen application | temp: 35.5, humd: 72 | nit: 790, phos: 253, pot: 145 | high | medium |
| Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |