Sustainable agriculture and its development have become an efficient instrument for sustainable economic progress and poverty alleviation among the world's deprived individuals during this forward-thinking era. However, along with several other factors, drastic rise in pollution and climate changes are causes to deteriorate agricultural production, and have reached an irrevocable threshold. The climate change and pollution affecting agriculture lead to food insecurity and threaten livelihood opportunities; a significant chunk of the population relies upon and thrives. Sustainable agriculture and its economic contribution are intertwined dimensions of sustainable development that have been overlooked in the past. Therefore, the research proposes a novel analytical framework to link factors affecting agriculture trade intensity. The study used a dataset of 137 countries worldwide from 2002 to 2018 to empirically evaluate the objectives. Initially, along with other several diagnostic check, the novel technique of machine learning Least Absolute Shrinkage and Selection Operator (Lasso) algorithms utilizes for choosing a suitable variable and model. The findings of the Kao cointegration test reveal that all selected determinants, including moderators, exhibit long-term cointegration linkages with economic contribution of agricultural export. The research found that imports value, urbanization, population size, unemployment, and inflation rate negatively and significantly affect agricultural export economic performance, whereas economic growth, agriculture liberalization, globalization, financial openness, institution quality, and agriculture production have a positive and significant influence on the intensity of agriculture exports. Furthermore, human capital reinforces the positive effects of agricultural production on agricultural export intensity in the long run. In contrast, climate change and air pollution diminish the positive impact of agriculture production on agricultural export intensity in the long run. Based on these findings, several policy pathways have been suggested to achiever SDGs, particularly SDG-2, 5, and 8 in order to accomplish target 2030.