The European Union’s priority of increasing the penetration of renewable generation in modern distribution networks has posed many challenges. The largest share consists of distributed and small-scale systems. The increased variability of supply from distributed renewable generations such as, wind and solar photovoltaics causes frequency and voltage stability issues in the system. Moreover, the power electronic interfaces reduces the system inertia which can lead to severe frequency deviations if a proper control mechanism is not implemented. However, an energy storage system and demand response with non-dispatchable generations will reduce the variability and thus, improve the system resilience by providing energy arbitrage, frequency and voltage regulation and fast reserves which are beneficial to distribution network management. Although the small-scale distributed sources are not capable to provide these flexibility services to the distribution and transmission network operators, the aggregator in the modern distribution network enables this process. Besides, they are able to provide slow services such as peak shaving, demand side management. GiFlex tackles this aspect by proposing an optimization framework in the smart grid scenario. The objectives are: 1) to assess and implement accurate estimation of flexibility services from GridEye measurements by employing machine learning algorithms, 2) to aggregate the flexibility services from distributed sources. The DEPsys product GridEye has a target of providing services in seconds. 3) GiFlex further will address the joint provision of fast response in seconds and slower response in minutes through a co-optimization framework. GiFlex is relevant to the Work Programme 2018-2020 and is expected to impact the European power sector by contributing to the effective and increased integration of renewable generation and to the realisation of a true smart grid with affordability, sustainability and security of energy.