Compared to monocultures, agroforestry systems (AFS) are expected to provide enhanced resource-use efficiency and larger ecosystem services. However, due to the complexity of the interactions occurring in AFS, it is challenging to quantify and decompose the effects of shade trees on the main crop net primary productivity (NPP). Few process-based models are able to analyze the interactions between crop and shade trees for carbon and water. Interactions for light, water and energy occurring between tree and crops might have counterintuitive effects on photosynthesis, light use efficiency (LUE), transpiration efficiency and microclimate. We showed that a 3D process-based model, MAESPA, was able to quantitatively describe the spatial variability of those processes from the plant to the plot, and from hourly to yearly timescales. MAESPA simulated satisfactorily light interception in a 2-layer heterogeneous coffee AFS. It was used to produce powerful explanatory variables in AFS experiments and to analyze the determinants of coffee plant NPP. LUE displayed a 2-fold increase for shaded coffee plants totally compensating the expected decrease of local irradiance interception, and coffee plant ANPP was the same below shade trees or in the open. MAESPA also simulated satisfactorily carbon exchange at whole plant and plot scales, when compared to gas exchange records in a whole-plant chamber, or with eddy-covariance records above the canopy. We used MAESPA to simulate the spatial variability of photosynthesis and LUE. Overall, MAESPA proved to be a relevant model to quantify spatial interactions. The next very relevant development would be to couple it to a model of carbon allocation among organs in the coffee plants.