NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Co-Saving: Resource Aware Multi-Agent Collaboration for Software Development

Rennai Qiu, Chen Qian, Ran Li, Yufan Dang, Weize Chen, Cheng Yang, Yingli Zhang, Ye Tian, Xuantang Xiong, Lei Han, Zhiyuan Liu, Maosong SunarXiv 2025 · OpenReview

Abstract

Recent advancements in Large Language Models (LLMs) and autonomous agents have demonstrated remarkable capabilities across various domains. However, standalone agents frequently encounter limitations when handling complex tasks that demand extensive interactions and substantial computational resources. Although Multi-Agent Systems (MAS) alleviate some of these limitations through collaborative mechanisms like task decomposition, iterative communication, and role specialization, they typically remain resource-unaware, incurring significant inefficiencies due to high token consumption and excessive execution time. To address these limitations, we propose a resource-aware multi-agent system — Co-Saving, which leverages experiential knowledge to enhance operational efficiency and solution quality. Our key innovation is the introduction of "shortcuts" — instructional transitions learned from historically successful trajectories — which allows the system to bypass redundant reasoning agents and expedite the collective problem-solving process. Experiments for software development tasks demonstrate significant advantages over existing methods. Specifically, compared to the state-of-the-art MAS ChatDev, our method achieves an average reduction of 50.85% in token usage and improves the overall code quality by 10.06%.

Introduction: The Resource Unawareness Problem

While Multi-Agent Systems (MAS) like ChatDev and MetaGPT have revolutionized automated software development through role-playing and task decomposition, they suffer from a significant "blind spot": resource unawareness. Current systems often engage in exhaustive, multi-turn dialogues that consume massive amounts of tokens and execution time, regardless of the task's complexity or the remaining budget. This leads to diminishing returns where the cost of computation outweighs the marginal improvement in code quality. Co-Saving addresses this by leveraging "experiential knowledge" to recognize when it can skip intermediate steps and how to dynamically balance solution quality against resource constraints.

Methodology: Shortcuts and Adaptive Reasoning

The core of Co-Saving is the transition from a linear "chat chain" to a graph-based reasoning process optimized by Shortcuts.

Shortcut Formalization and Filtering

The system models the development process as a directed graph where nodes represent code states and edges represent instructions. A "shortcut" is a directed edge that connects two non-adjacent nodes, effectively allowing agents to "jump" from an early draft to a near-final version based on successful transitions in similar past tasks.

The Co-Saving framework uses shortcuts to bypass redundant agents in the inference chain based on historical reference chains.

To ensure efficacy, shortcuts are filtered based on two primary metrics:

  1. Value: Calculated using cosine similarity between the current code, the target task, and the final goal, alongside a binary check for code compilation.
  2. Cost: A composite metric of time and token usage, normalized into percentile ranks.

The Emergency Factor (γ)

Co-Saving incorporates a dynamic weighting mechanism called the "Emergency Factor." When resources (time and tokens) are abundant, the system prioritizes Value to ensure high-quality code. As the budget nears depletion, the Emergency Factor shifts the priority toward Cost, incentivizing the system to finish the task quickly using more aggressive shortcuts.

Experimental Evaluation

The researchers utilized a subset of the Software Requirement Development Dataset (SRDD), covering 40 subcategories across domains like Education, Life, and Games. The system was evaluated against heavyweights like GPT-4, MetaGPT, and ChatDev using GPT-3.5-Turbo as the base model.

Key Results

Co-Saving demonstrated superior performance across all efficiency and quality metrics:

  • Efficiency: An average reduction of 50.85% in token usage compared to ChatDev.
  • Quality: A 10.06% improvement in overall code quality (a composite metric of completeness, executability, consistency, and granularity).
  • Budgeted Completion Rate (BCR): Co-Saving achieved a BCR of 0.7280, significantly higher than ChatDev’s 0.0160 under identical resource constraints.
Distribution of path length, time cost, and token usage comparing Co-Saving against baseline methods without resource-saving optimizations.

Discussion and Insights

The success of Co-Saving highlights that reasoning does not always have to be from first principles. By using experience as an accelerator, the system mimics human developer behavior—polishing code when deadlines are distant but focusing on functional pragmatism when the clock is ticking. Interestingly, reducing the number of reasoning steps (path length) did not just save money; it improved quality. This suggests that shorter reasoning chains may reduce the "hallucination" or error accumulation that often plagues long, iterative LLM dialogues.

Limitations and Future Work

While effective, the system currently relies on domain-specific historical data for shortcut mining. Additionally, current embedding models sometimes struggle to catch subtle semantic inconsistencies between code and natural language requirements. Future work will explore transferring these shortcuts across different domains and improving the robustness of the early termination logic in high-pressure "emergency" scenarios.

Summary updated

BibTeX
@misc{qiu2025co,
  author = {Rennai Qiu and Chen Qian and Ran Li and Yufan Dang and Weize Chen and Cheng Yang and Yingli Zhang and Ye Tian and Xuantang Xiong and Lei Han and Zhiyuan Liu and Maosong Sun},
  title = {{Co-Saving: Resource Aware Multi-Agent Collaboration for Software Development}},
  year = {2025},
  eprint = {2505.21898},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2505.21898},
}
Figure