A microgrid energy management framework for the optimization of individual objectives of microgrid stakeholders is proposed. The framework is exemplified by way of a microgrid that is connected to an external grid via a transformer and includes the following players: a middle-size train station with integrated photovoltaic power production system, a small energy production plant composed of urban wind turbines, and a surrounding district including residences and small businesses. The system is described by Agent-Based Modelling (ABM), in which each player is modelled as an individual agent aiming at a particular goal, (i) decreasing its expenses for power purchase or (ii) increasing its revenues from power selling. The context in which the agents operate is uncertain due to the stochasticity of operational and environmental parameters, and the technical failures of the renewable power generators. The uncertain operational and environmental parameters of the microgrid are quantified in terms of Prediction Intervals (PIs) by a Non-dominated Sorting Genetic Algorithm (NSGA-II) – trained Neural Network (NN). Under these uncertainties, each agent is seeking for optimal goal-directed actions planning by Robust Optimization (RO). The developed framework is shown to lead to an increase in system performance, evaluated in terms of typical reliability (adequacy) indicators for energy systems, such as Loss of Load Expectation (LOLE) and Loss of Expected Energy (LOEE), in comparison with optimal planning based on expected values of the uncertain parameters.