# MegaAgent

A research framework for large-scale, autonomous multi-agent LLM systems that generates agents dynamically and splits tasks automatically, coordinating them in parallel without relying on predefined operating procedures written by a human.

MegaAgent is designed to manage autonomous, parallel cooperation among large numbers of LLM-powered agents, with logarithmic coordination overhead as the population grows, rather than requiring hand-written prompts describing how each agent should behave, which the authors argue becomes impossible at scale. The repository accompanies an ACL 2025 Findings paper and includes the latest version of the framework plus example experiments run with an earlier version.

Running it means adding a model API key and a prompt to a configuration file and running the main script, with output written to a files directory; the default example prompt automatically generates a Gobang game. The main framework and its TravelPlanner example talk to the model through the modern OpenAI tool-use interface, with the shared transport isolated in one file, while the other bundled examples still use the older function-calling interface. Reported benchmark results show it outperforming several other multi-agent frameworks on coding and math tasks using GPT-4o as the backbone.

Website: https://github.com/Xtra-Computing/MegaAgent
