MASOpt: Online Prompt Optimization for Multi-Agent Systems with Closed-Loop Control Theory
Abstract
Large language model (LLM)-based multi-agent systems (MAS) have emerged as a powerful paradigm for solving complex tasks through role specialization and inter-agent collaboration, while their performance remains highly sensitive to the prompts that govern individual agents and their interactions. Existing MAS prompt optimization methods mainly optimize prompts before deployment and then keep them fixed during execution, making them unable to adapt to errors and state changes revealed by the ongoing trajectory. In this work, we propose MASOpt, a framework for online prompt optimization in multi-agent systems, inspired by classical closed-loop feedback control. MASOpt treats each prompt modification as a control action whose effectiveness must be validated by the subsequent system response: a lightweight meta-MAS continuously diagnoses the current execution state, proposes local prompt repairs, and verifies their actual effects, allowing ineffective updates to be reverted and unresolved problems to trigger further optimization. To reduce online exploration, we further introduce Cross-Actuation Relative Advantage (CARA), which compares alternative repairs from matched execution states and learns state-conditioned repair preferences from historical trajectories without updating the underlying LLM parameters. Experiments across question answering, code generation, mathematical reasoning, and interactive decision-making benchmarks show that MASOpt achieves state-of-the-art performance in multi-agent prompt optimization.
est. 32% chance this paper gets accepted at ICLR 2027.
What do you think this paper will get?
All positions stay anonymous.