Agent-based models (ABM) are ideal tools to deal with the complexity of pest invasion throughout agricultural socio-ecological systems, yet very few studies have applied them in such context. In this work we developed an ABM that simulates interactions between farmers and an invasive insect pest in an agricultural landscape of the tropical Andes. Our specific aims were to use the model 1) to assess the importance of farmers\' mobility and pest control knowledge on pest expansion and 2) to use it as an educational tool to train farmer communities facing pest risks. Our model combined an ecological sub-model, simulating pest population dynamics driven by a cellular automaton including environmental factors of the landscape, with a social model in which we incorporated agents (farmers) potentially transporting and spreading the pest through displacements among villages. Results of model simulation revealed that both agents\' movements and knowledge had a significant, non-linear, impact on invasion spread, confirming previous works on disease expansion by epidemiologists. However, heterogeneity in knowledge among agents had a low effect on invasion dynamics except at high levels of knowledge. Evaluations of the training sessions using ABM suggest that farmers would be able to better manage their crop after our implementation. Moreover, by providing farmers with evidence that pests propagated through their community not as the result of isolated decisions but rather as the result of repeated interactions between multiple individuals over time, our ABM allowed introducing them with social and psychological issues which are usually neglected in integrated pest management programs.