I will use dynamical food web modelling to improve our mechanistic understanding of the relationship between biodiversity and ecosystem functions and services. In agroecosystems, an important ecosystem service is the biological control of crop pest species, provided by natural enemies of the pest. More diverse species assemblages tend to provide a higher flow of biocontrol, and according to the portfolio hypothesis they should also provide a more temporally stable flow of the service. However, we lack a mechanistic understanding of the biodiversity-functioning relationship, which is why we cannot make quantitative predictions, nor explain when and why biodiversity leads to a higher functioning. As the service of biocontrol is the product of trophic interactions, a food web approach should prove very useful for elucidating the mechanisms governing the effect of biodversity on service provisioning. By developing dynamical food web models to include a variety of species traits, I can model crop system food webs and investigate how the flow and stability of biological control of crop pest species is affected by the community trait composition.