2024 | Mingchen Zhuge, Wenyi Wang, Louis Kirsch, Francesco Faccio, Dmitrii Khizbullin, Jürgen Schmidhuber
GPTSwarm is a framework that represents language agents as computational graphs, enabling the automatic optimization of both node-level prompts and graph connectivity. The framework unifies various approaches to language agents by modeling them as graphs, where nodes represent functions and edges represent information flow. This allows for hierarchical collaboration among agents and the automatic improvement of agent orchestration through graph optimization techniques. The framework supports the development, integration, and automatic improvement of various LLM agents, with experiments showing significant improvements on benchmarks such as MMLU, Mini CrossWords, HumanEval, and GAIA. The framework allows for edge optimization using reinforcement learning, which improves the communication and orchestration patterns among agents. Node optimization is also supported, where prompts are refined based on previous input and task feedback. The framework is open-source and allows for the construction of arbitrary agent systems by recombining fundamental operations. The results demonstrate that the framework can significantly enhance the performance of language agents, outperforming existing methods in several tasks. The framework's graph-based design facilitates the reuse of modular components and the integration of such modules, making it easier to implement various language agent systems. The framework's ability to automatically optimize both nodes and edges makes it a powerful tool for improving the efficiency and effectiveness of LLM-based agents.GPTSwarm is a framework that represents language agents as computational graphs, enabling the automatic optimization of both node-level prompts and graph connectivity. The framework unifies various approaches to language agents by modeling them as graphs, where nodes represent functions and edges represent information flow. This allows for hierarchical collaboration among agents and the automatic improvement of agent orchestration through graph optimization techniques. The framework supports the development, integration, and automatic improvement of various LLM agents, with experiments showing significant improvements on benchmarks such as MMLU, Mini CrossWords, HumanEval, and GAIA. The framework allows for edge optimization using reinforcement learning, which improves the communication and orchestration patterns among agents. Node optimization is also supported, where prompts are refined based on previous input and task feedback. The framework is open-source and allows for the construction of arbitrary agent systems by recombining fundamental operations. The results demonstrate that the framework can significantly enhance the performance of language agents, outperforming existing methods in several tasks. The framework's graph-based design facilitates the reuse of modular components and the integration of such modules, making it easier to implement various language agent systems. The framework's ability to automatically optimize both nodes and edges makes it a powerful tool for improving the efficiency and effectiveness of LLM-based agents.