This paper proposes a PV and wind output power generation forecasting agent for a multi-agent-based energy management system (EMS) in a smart microgrid. The microgrid EMS requires both generation forecast and load forecast to provide effective dispatch strategies. The efficiency of the EMS significantly relies on its forecasting accuracy. Firstly, this paper develops an adaptive neuro-fuzzy inference system (ANFIS)-based forecasting model and then utilise it for the development of wind and PV generation forecasting agent for microgrid energy management. ANFIS adopt the self-learning capability from the neural network and linguistic expression function from fuzzy logic inference and stands at the top of both the technologies in performance. The proposed model has been tested using two data sets, i.e., PV historical data and historical wind data. The fuzzy c means clustering (FCM) with hybrid optimisation algorithm-based ANFIS model shows better forecasting accuracy with both PV and wind forecast, therefore, implemented as PV and wind forecasting agent for microgrid EMS.