SwarmAgentic: Towards Fully Automated Agentic System Generation via Swarm Intelligence

Yao Zhang, Chenyang Lin, Shijie Tang, Haokun Chen, Shijie Zhou, Yunpu Ma, Volker Tresp

Abstract

Building effective multi-agent systems (MAS) currently requires significant manual effort to define agent roles and collaboration workflows. This paper introduces SwarmAgentic, a framework that automates the design of agentic systems by framing the problem as a symbolic optimization task. By adapting Particle Swarm Optimization (PSO) into a language-driven process, SwarmAgentic evolves both agent functionality and interaction structures from scratch. Our evaluation across six diverse benchmarks demonstrates that SwarmAgentic significantly outperforms existing state-of-the-art methods, achieving a +261.8% relative improvement on complex planning tasks like TravelPlanner.

1. Introduction

The transition from single-prompt LLM interactions to "agentic systems"—where multiple AI agents collaborate to solve complex problems—has highlighted a significant bottleneck: the manual labor of system design. Developers must typically hand-craft agent personas (e.g., "You are a meticulous Travel Agent") and hard-code their interaction logic.

Existing automated tools often suffer from "design rigidity," relying on fixed templates or pre-defined libraries of agents. To achieve true autonomy, a framework must address three pillars: from-scratch generation, self-optimizing functionality, and self-optimizing collaboration. SwarmAgentic is the first framework to unify these pillars by treating multi-agent systems as evolving particles within a symbolic search space.

2. Methodology: Symbolic Particle Swarm Optimization

The core innovation of SwarmAgentic is the translation of Particle Swarm Optimization (PSO)—a numerical algorithm inspired by social behavior—into a symbolic, language-driven process. In this framework, an LLM acts as the optimizer, navigating the infinite space of possible Python-based workflows.

2.1 Mapping PSO to Agentic Systems

In the SwarmAgentic paradigm, the traditional components of PSO are redefined as follows:

  • Particles as Systems: Each particle represents a complete multi-agent system, defined by its Python code and structured role descriptions.
  • Symbolic Velocity: Instead of a numerical vector, "velocity" is a text-based plan for improvement. The LLM analyzes execution failures to generate specific critiques (e.g., "The system lacks a verification step for flight constraints").
  • Position Updates: The "position" is the current system implementation. Moving a particle involves the LLM rewriting the system's code and roles based on the velocity plan.

2.2 The Evolution Process

The framework balances three distinct signals to guide the evolution of the swarm:

  1. Failure-Driven Adjustments: Immediate feedback from the system's own errors.
  2. Personal Best (pbest): Guidance toward the most successful configuration that a specific particle has previously achieved.
  3. Global Best (gbest): The adoption of successful strategies discovered by the highest-performing system in the entire swarm.

3. Experimental Setup

SwarmAgentic was evaluated across six open-ended benchmarks designed to test reasoning, planning, and creativity:

  • TravelPlanner: Requires managing complex constraints like budgets and flight schedules.
  • Natural Plan: Includes Trip Planning, Meeting Planning, and Calendar Scheduling.
  • Creative Writing (CW): Generating coherent stories from unordered prompts.
  • MGSM: A multilingual math reasoning benchmark to test logical consistency.

4. Key Results and Insights

4.1 Performance Gains

SwarmAgentic consistently outperformed competitive baselines, including ADAS and SPP. The most notable breakthrough occurred in the TravelPlanner benchmark, where the framework achieved a +261.8% relative gain over ADAS. This success was largely attributed to the framework's ability to naturally evolve "Quality Assurance" agents that cross-referenced constraints—a behavior that emerged without human intervention.

4.2 Joint Optimization

A critical finding of this research is that agent roles and collaboration structures are deeply interdependent. SwarmAgentic’s ability to optimize both simultaneously allows it to find synergies that manual design or role-only optimization might miss.

4.3 Cross-Model Transferability

Systems evolved using smaller, more cost-effective models (such as GPT-4o-mini) demonstrated high robustness when transferred to more powerful models like Claude 3.5 Sonnet or Gemini 1.5 Pro. This suggests that the evolved structural logic is fundamentally sound and not merely an artifact of overfitting to a specific model's behavior.

5. Discussion and Limitations

While SwarmAgentic represents a leap forward in automated system design, several challenges remain. The framework's reliance on LLMs as optimizers means it is susceptible to hallucinations; if the optimizer misidentifies a flaw, it may lead the swarm toward suboptimal configurations. Furthermore, the current implementation is text-only, lacking the multimodal perception required for embodied or physical tasks. Finally, the iterative nature of swarm optimization introduces higher computational costs compared to static prompting.

6. Conclusion

SwarmAgentic demonstrates that symbolic PSO is a powerful tool for navigating the complex design space of multi-agent systems. By allowing systems to evolve their own roles and workflows through language-driven feedback, we move closer to a future where AI can autonomously build the tools it needs to solve increasingly sophisticated problems.

Summary updated

Abstract

The rapid progress of Large Language Models has advanced agentic systems in decisionmaking, coordination, and task execution.Yet, existing agentic system generation frameworks lack full autonomy, missing from-scratch agent generation, self-optimizing agent functionality, and collaboration, limiting adaptability and scalability.We propose SwarmAgentic, the first framework that fully automates agentic system generation, optimization, and collaboration, constructing agents from scratch and jointly refining functionality and coordination via language-driven exploration.To enable efficient search over system-level structures, SwarmAgentic maintains a population of candidate systems and evolves them via feedbackguided updates, drawing inspiration from Particle Swarm Optimization (PSO).We evaluate our method on six real-world, open-ended, and exploratory tasks involving high-level planning, system-level coordination, and creative reasoning.Given only a task description and an objective function, SwarmAgentic outperforms all baselines, achieving a +261.8%relative improvement over ADAS on the Trav-elPlanner benchmark, highlighting the effectiveness of full automation in structurally unconstrained tasks.This framework marks a significant step toward scalable and autonomous agentic system design, bridging swarm intelligence with fully automated system multi-agent generation.Our code is publicly released at github.com/SwarmAgentic.
BibTeX
@misc{zhang2025swarmagentic,
  author = {Yao Zhang and Chenyang Lin and Shijie Tang and Haokun Chen and Shijie Zhou and Yunpu Ma and Volker Tresp},
  title = {{SwarmAgentic: Towards Fully Automated Agentic System Generation via Swarm Intelligence}},
  year = {2025},
  eprint = {2506.15672},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2506.15672},
}
Figure