MAS-on-the-Fly: Dynamic Adaptation of LLM-based Multi-Agent Systems at Test Time

Guangyi Liu, Haojun Lin, Huan Zeng, Heng Wang, Quanming Yao
2/14/2026
cs.MAcs.AI

No confident code implementation found for this paper. 1 possible match can be shown below.

Abstract

Large Language Model (LLM)-based multi-agent systems (MAS) have emerged as a promising paradigm for solving complex tasks. However, existing works often rely on manual designs or "one-size-fits-all" automation, lacking dynamic adaptability after deployment. Inspired by how biological systems adapt, we introduce MASFly, a novel multi-agent framework enabling dynamic adaptation at test time. To adapt system generation, MASFly employs a retrieval-augmented SOP instantiation mechanism that leverages a self-constructed repository of successful collaboration patterns, enabling the LLM to assemble customized MASs for new queries. For adaptive execution, MASFly incorporates an experience-guided supervision mechanism, where a dedicated Watcher agent monitors system behaviors with reference to a personalized experience pool and provides real-time interventions. Extensive experiments demonstrate that MASFly achieves state-of-the-art performance, most notably a 61.7% success rate on the TravelPlanner benchmark, while exhibiting strong task adaptability and robustness.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 1 weaker match is hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{liu2026masonthefly,
  title  = {MAS-on-the-Fly: Dynamic Adaptation of LLM-based Multi-Agent Systems at Test Time},
  author = {Guangyi Liu and Haojun Lin and Huan Zeng and Heng Wang and Quanming Yao},
  year   = {2026},
  eprint = {2602.13671},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2602.13671v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2602.13671.svg)](https://codeofpaper.com/paper/2602.13671)

Discussion