Agility farming is necessary in enhancing the productivity of agriculture with minimal environmental consequences. This research paper is a proposal of a machine learning based framework to ensure optimality in fertiliser and irrigation plans to manage crops sustainably. The system combines XGBoost to estimate nutrient needs based on soil and crop traits with LSTM networks to predict irrigation schedules based on temporal environmental conditions and Particle Swarm Optimization (PSO) to produce multi-objective schedules that optimize the usage of fertilizers and water. Using the Crop and Soil Dataset from Kaggle, the XGBoost model achieved high accuracy in predicting nitrogen, phosphorus, and potassium requirements (R² ? 0.92-0.93), and the LSTM model effectively captured temporal irrigation patterns (R² ? 0.91). The hybrid system based on PSO was able to generate optimised schedules with high convergence as well as a normalised fitness value of 0.88. The given method proves that predictive modelling in conjunction with optimization methods can help to make farming operations more efficient, increase the productivity of crops, and facilitate the practise of sustainable agriculture. The framework provides a precision agriculture decision-support system but is scalable and uses facts to provide decisions, which forms the basis of smart farming in the future.