cs.MAMay 27, 2026

Long Live the Librarian! A Persistent Search Sub-Agent for Energy-Efficient Multi-Agent Software Engineering Systems

Authors: Seunghyuk Cho, Sunghyun Choi, Jaeseung Heo, Youngbin Choi, Saemi Moon, MoonJeong Park, Dongwoo Kim

Organizations: 1Graduate School of Artificial Intelligence, POSTECH · Department of Computer Science and Engineering, POSTECH · 1Graduate School of Artificial Intelligence, POSTECH, 2Department of Computer Science and Engineering, POSTECH

Abstract

Multi-agent systems (MAS) have substantially advanced autonomous software engineering (SWE), but their growing inference energy demands raise sustainability concerns. In this paper, we demonstrate that this cost is concentrated in an overlooked source: redundant output tokens generated across agents. Two empirical findings ground this claim. First, our per-token energy attribution for MAS reveals a sharp asymmetry: an output token consumes 30 to 1,000 times more energy than an input or cached token. Second, MAS inflate per-episode output because agents repeatedly re-explore overlapping repository regions. To address this inefficiency, we propose Librarian, a persistent search sub-agent that tracks repository-search history and suppresses redundant exploration actions across agents. By returning short references to file regions instead of full file excerpts, Librarian further reduces output-token volume. On SWE-Bench Verified and SWE-Bench-Live, Librarian reduces per-episode GPU energy consumption of existing multi-agent SWE systems by 11 to 30% while preserving task performance. Our code is available at https://github.com/ml-postech/Librarian.

Explore similar work

CardsList
  1. MASPRM: Multi-Agent System Process Reward Model

    Oct 28, 2025Milad Yazdani, Mahdi Mostajabdaveh, Zirui Zhou +1Monte Carlo Tree SearchBeam Search