We present a mathematical model for agri-food industry residual streams flow management, which serves as a decision support tool for optimizing their valorization. The aim is to determine, under a cost-benefit analysis approach, the best strategy at a global level. The proposed mathematical model provides the optimal valorization scenario, namely the set of routes followed by agri-food industry residual streams that maximizes the total profit obtained. The model takes into account the complete stoichiometry of the residual stream at each step of the valorization route. Furthermore, the model allows for the calculations of different scenarios to support decision-making. The proposed approach is illustrated through a case study using a real-case network of a region. The case study bears evidence that the use of the model can lead to significant profit increases compared to those obtained with current practices. Moreover, notable profit improvements are obtained in the case study if the selling price of all the value-added products considered increases or if the processing cost of the animal feed producer decreases. Therefore, our model enables the detection of key factors that influence the optimal strategy, making it a powerful decision-support tool for optimizing the valorization of agri-food industry residual streams.