Purpose This study aims to solve the problem of repair path planning between multiple small-size defects in the field of additive manufacturing (AM) repair by using Python-based ant colony algorithm (ACO). The optimal parameter combination scheme is obtained by discussing the influencing factors of parameters in the ACO. Design/methodology/approach The effects of the information heuristic factor α, the expected heuristic factor ß and the pheromone volatile factor ρ on the simulation results were investigated by designing a three-factor and three-level orthogonal experiment. The fast convergence of ACO in finding the optimal solution of multiple small-size defect repair path problem is proved by comparing the simulation results with those of genetic algorithm (GA) on the same data set. Findings The ACO can effectively solve the repair path planning problem between multiple small-size defects by optimizing the parameters. In the case of 50 defect locations, the simulation results of the ACO with optimized parameters are 159.8 iterations and 3,688 average path lengths, while the GA has 4,027.2 average path lengths under the same data set and the same number of iterations, and by comparison, it is proved that the ACO can find the optimal solution quickly in the small-size defects repair path planning problem, which greatly improves the efficiency of defect repair. Originality/value The parameter-optimized ACO can be quickly applied to the planning problem of repair paths between multiple small-size defects in the field of AM repair, which can better improve the defect repair efficiency and reduce the waste of resources.