In the light of climate change, rising demands for agricultural products and the intensification and specialization of agricultural systems, ensuring an adequate and reliable supply of food is fundamental for food security. Maintaining diversity and redundancy has been postulated as one generic principle to increase the resilience of agricultural production and other ecosystem services. For example, if one crop fails due to climate instability and extreme events, others can compensate the losses. Crop diversity might be particularly important if different crops show asynchronous production trends. Furthermore, spatial heterogeneity has been suggested to increase stability at larger scales as production losses in some areas can be buffered by surpluses in undisturbed ones. Besides systematically investigating the mechanisms underlying stability, identifying transformative pathways that foster them is important. In my thesis, I aim at answering the following questions: (i) How does yield stability differ between nations, regions and farms, and what is the effect of crop diversity on yield stability in relation to agricultural inputs, climate heterogeneity, climate instability and time at the national, regional or farm level? (ii) Is asynchrony between crops a better predictor of production stability than crop diversity? (iii) What is the effect of asynchrony between and within crops on stability and how is it related to crop diversity and space, respectively? (iv) What is the state of the art and what are knowledge gaps in exploring resilience and its multidimensionality in ecological and social-ecological systems with agent-based models and what are potential ways forward? In the first chapter, I provide the theoretical background for the subsequent analyses. I stress the need to better understand the resilience of social-ecological systems and particularly the stability of agricultural production. Moreover, I introduce diversity and spatial heterogeneity as two prominently discussed resilience mechanisms and describe approaches to assess resilience. In the second chapter, I combined agriculture and climate data at three levels of organization and spatial extents to investigate yield stability patterns and their relation to crop diversity, fertilizer, irrigation, climate heterogeneity and instability and time of nations globally, regions in Europe and farms in Germany using statistical analyses. Yield stability decreased from the national to the farm level. Several nations and regions substantially contributed to larger-scale stability. Crop diversity was positively associated with yield stability across all three levels of organization. This effect was typically more profound at smaller scales and in variable climates. In addition to crop diversity, climate heterogeneity was an important stabilizing mechanism especially at larger scales. These results confirm the stabilizing effect of crop diversity and spatial heterogeneity, yet their importance depends on the scale and agricultural management. Building on the findings of the second chapter, I deepened in the third chapter my research on the effect of crop diversity at the national level. In particular, I tested if asynchrony between crops, i.e. between the temporal production patterns of different crops, better predicts agricultural production stability than crop diversity. The stabilizing effect of asynchrony was multiple times higher than the effect of crop diversity, i.e. asynchrony is one important property that can explain why a higher diversity supports the stability of national food production. Therefore, strategies to stabilize agricultural production through crop diversification also need to account for the asynchrony of the crops considered. The previous chapters suggest that both asynchrony between crops and spatial heterogeneity are important stabilizing mechanisms. In the fourth chapter, I therefore aimed at better understanding the relative importance of asynchrony between and within crops, i.e. between the temporal production patterns of different crops and between the temporal production patterns of different cultivation areas of the same crop. Better understanding their relative importance is important to inform agricultural management decisions, but so far this has been hardly assessed. To address this, I used crop production data to study the effect of asynchrony between and within crops on the stability of agricultural production in regions in Germany and nations in Europe. Both asynchrony between and within crops consistently stabilized agricultural production. Adding crops increased asynchrony between crops, yet this effect levelled off after eight crops in regions in Germany and after four crops in nations in Europe. Combining already ten farms within a region led to high asynchrony within crops, indicating distinct production patters, while this effect was weaker when combining multiple regions within a nation. The results suggest, that both mechanisms need to be considered in agricultural management strategies that strive for more resilient farming systems. The analyses in the foregoing chapters focused at different levels of organization, scales and factors potentially influencing agricultural stability. However, these statistical analyses are restricted by data availability and investigate correlative relationships, thus they cannot provide a mechanistic understanding of the actual processes underlying resilience. In this regard, agent-based models (ABM) are a promising tool. Besides their ability to measure different properties and to integrate multiple situations through extensive manipulation in a fully controlled system, they can capture the emergence of system resilience from individual interactions and feedbacks across different levels of organization. In the fifth chapter, I therefore reviewed the state of the art and potential knowledge gaps in exploring resilience and its multidimensionality in ecological and social-ecological systems with ABMs. Next, I derived recommendations for a more effective use of ABMs in resilience research. The review suggests that the potential of ABMs is not utilized in most models as they typically focus on a single dimension of resilience and are mostly limited to one reference state, disturbance type and scale. Moreover, only few studies explicitly test the ability of different mechanisms to support resilience. To solve real-world problems related to the resilience of complex systems, ABMs need to assess multiple stability properties for different situations and under consideration of the mechanisms that are hypothesized to render a system resilient. In the sixth chapter, I discuss the major conclusions that can be drawn from the previous chapters. Moreover, I showcase the use of simulation models to identify management strategies to enhance asynchrony and thus stability, and the potential of ABMs to identify pathways to implement such strategies. The results of my thesis confirm the stabilizing effect of crop diversity, yet its importance depends on the scale, agricultural management and climate. Moreover, strategies to stabilize agricultural production through crop diversification also need to account for the asynchrony of the crops considered. As spatial heterogeneity and particularly asynchrony within crops strongly enhances stability, integrated management approaches are needed that simultaneously address multiple resilience mechanisms at different levels of organization, scales and time horizons. For example, the simulation suggests that only increasing the number of crops at both the pixel and landscape level avoids trade-offs between asynchrony between and within crops. If their potential is better exploited, agent-based models have the capacity to systematically assess resilience and to identify comprehensive pathways towards resilient farming systems.