This article develops a novel robust control methodology for nonlinear multiagent systems (MASs) to address the time-varying formation (TVF) problem. The methodology offers a concise yet efficacious technique based on the Lyapunov functional for more general one-sided Lipschitz (OSL) nonlinear MASs with external disturbances and time-varying delays. Note that most existing TVF controllers can only achieve formation targets under small delays, which significantly limits their performance. The proposed TVF control method in this article demonstrates remarkable robustness by effectively accommodating larger delays and additionally mitigating the impact of disturbances on MASs. On this basis, a robust TVF controller optimization scheme of MASs combined with the particle swarm optimization (PSO) algorithm is proposed. Comparing the optimized results with those under conventional control methods, it has been proved that optimized controller has obvious improvement on the formation performance of MASs. Finally, the feasibility and the superiority of the developed TVF control approach are validated by a simulation of an autonomous aerial vehicle swarm system (AAVSS) composed of six AAVs.