Hubs contain sources and storages that can transfer and store energy. It is predicted that the energy management of hubs enhances the network's economic and technical status. Therefore, the paper presents flexible energy management of energy hubs linked with electrical and thermal grids. In the energy hub, wind and photovoltaic systems generate electricity, and bio-waste units are utilized to concurrently produce electricity and heat power. Compressed air and thermal energy storage control the flexibility of the hubs. The objective function minimizes the expected cost of energy injected by the upstream grid. Constraints are network optimal power flow equations, operation model, and flexibility limit of the hub. The design has uncertain parameters caused by the load, energy price, and unpredictable renewable power. The point estimation technique helps model these uncertain variables to overcome the high volume of the problem and accurately evaluate the flexibility. Contributions include evaluating the performance of compressed-air storage and bio-waste units equipped with combined heat and power technology in the energy hub, considering the flexibility limit of hubs in both electrical and thermal sectors due to uncertain renewable power, using the point estimation method for modeling the uncertainties of hubs’ energy management to reduce computation time and provide accurate calculation of flexibility. The scheme is tested using a standard case, where the results show the ability of energy hubs to enhance and promote the economic and operation status of electricity and heating grids by about 36.5% and 36%− 43%, respectively, in comparison with the power flow method. Storages can extract 100% flexibility conditions for hubs. The scheme has succeeded in providing high flexibility conditions by proper energy management of compressed-air and thermal storage. Furthermore, the presence of the storage equipment beside wind, solar, and bio-waste renewable sources in the form of a hub, and energy management of the hubs have led to a more suitable economical and operational state of electrical and thermal networks compared to power flow studies.