RESUMO
1. Understanding the environmental factors that structure biodiversity and food webs among communities is central to assess and mitigate the impact of landscape changes. 2. Wildflower strips are ecological compensation areas established in farmland to increase pollination services and biological control of crop pests and to conserve insect diversity. They are arranged in networks in order to favour high species richness and abundance of the fauna. 3. We describe results from experimental wildflower strips in a fragmented agricultural landscape, comparing the importance of landscape, of spatial arrangement and of vegetation on the diversity and abundance of trap-nesting bees, wasps and their enemies, and the structure of their food webs. 4. The proportion of forest cover close to the wildflower strips and the landscape heterogeneity stood out as the most influential landscape elements, resulting in a more complex trap-nest community with higher abundance and richness of hosts, and with more links between species in the food webs and a higher diversity of interactions. We disentangled the underlying mechanisms for variation in these quantitative food web metrics. 5. We conclude that in order to increase the diversity and abundance of pollinators and biological control agents and to favour a potentially stable community of cavity-nesting hymenoptera in wildflower strips, more investment is needed in the conservation and establishment of forest habitats within agro-ecosystems, as a reservoir of beneficial insect populations.