The global energy crisis that began in fall 2021 and the subsequent spike in energy prices constitute a significant challenge for the world economy that risks undermining the post-COVID-19 recovery. In this paper, we develop and calibrate a new Multi-Agent model for Transition Risks (MATRIX) to analyze the role of energy in the functioning of a complex adaptive system and the economic and distributional effects of energy shocks. The economic system is populated by heterogeneous agents, i.e., households, firms and banks, which take optimal decision rules and interact in decentralized markets characterized by limited information. After calibrating the model on US quarterly macroeconomic data, we assess the economic and distributional impacts of different types of energy shocks, namely: (i) an exogenous increase in the price of fossil fuels (e.g., oil or gas); (ii) a decrease in energy firms’ productivity; (iii) a reduction in the available quantity of fossil fuels. We find that the energy shocks entail similar effects at the aggregate level in terms of higher inflation and lower real GDP. Nevertheless, the distribution of gains and losses across sectors and agents varies significantly depending on the type of shock. Our findings suggest that policymakers should carefully consider the nature of energy shocks and the resulting distributional effects to design effective measures in response to energy crises.