The work is devoted to research on the optimal management of a UAV swarm when spraying energy crops with toxic chemicals. The relevance of the work lies in the fact that, at present, the solution of chemical plant protection tasks using UAVs is based on the individual experience of a human operator, who manages a swarm of UAVs, as a rule, in a non-optimal way with significant time and cost costs. The purpose of the article is to develop methodological principles for optimal management of a UAV swarm when spraying energy crops with agrochemicals. In order to achieve the goal, the following tasks must be solved: the formulation of the task of optimizing the management of a UAV swarm is substantiated, taking into account the time and cost constraints for the performance of chemical plant protection tasks, a method of optimal management of a UAV swarm when spraying energy crops with toxic chemicals and foliar feeding is developed, which provides a solution tasks to maximize the number of sprayed plants in each field section under time and cost constraints, a structural diagram of the solution to the task of optimizing the UAV swarm management was developed for the high-quality practice of chemical plant protection tasks. The scientific novelty of the work consists in the application of the dynamic programming method in the distribution and management of a swarm of UAVs on each site when spraying energy crops with agrochemicals. The practical value of the work lies in the development of a structural scheme for solving the problem of optimizing the control of a UAV swarm, with the help of which the optimal number of UAVs in a given time sequence is calculated in special software. automated operator's workplace for high-quality performance of chemical protection and plant nutrition tasks.