Can Agents Design Libraries for Agents?
Gabriel Orlanski, Alex L. Zhang, Avi Trost, Vincent Sunn Chen, Frederic Sala, Aws Albarghouthi, Ludwig Schmidt
Abstract
Agents increasingly build on code written by other agents, and they reimplement rather than reuse, growing the codebases later agents must work in. To measure how well agents design libraries for other agents, we introduce LibraryDesignBench, a two-phase benchmark in which an agent implements a full-featured library from a specification that defines required capabilities and potential use cases without prescribing the design. We evaluate the library through the correctness and simplicity of programs written by three user agents from different model families. The benchmark spans 242 expert-validated programming problems across 15 library-design tasks in four languages. On eleven of the fifteen tasks, agent designers reproduce the abstractions of the human-written production library. Downstream agents adopt agent- and human-written libraries alike but underuse them, reimplementing capabilities the library already provides. Our failure analysis finds that downstream agents write extra code mainly because agent-written libraries are rigid or hard to use, not because capabilities are missing. We also experiment with giving designers more prescriptive, agent-first guidance and having them test their library with subagents; this improves downstream scores and yields simpler programs. LibraryDesignBench provides both a testbed for evaluating library-design practices for agent users and an initial design baseline that improves downstream reuse.
Create a lesson
Metadata
- Categories
- cs.AI, cs.CL, cs.SE
- Comments
- 26 pages, 6 figures, 11 tables. Code and data: https://github.com/SprocketLab/librarydesignbench
Related papers
HWRE-Bench: Can LLM Agents Understand Hardware They Did Not Design?
Shared title terminologycs.AIPeilong Zhou, Cangyuan Li, Kaiyan Chang et al.
A2Z GameSpec-Bench: How Faithfully Can Coding Agents Generate Games from Game Design Specifications?
Shared title terminologycs.AISeonho Lee, Wonryeol Jeong, Alberto Cereser et al.
Self-Evolving Algorithm-Design Agents: Escaping In-Context Evolutionary Stagnation via Population-Curated Policy Optimization
Shared title terminologycs.AIChen Lu, Ke Xue, Siyuan Xu et al.
SimpleEvol: An Agent-Loop Framework for LLM-Driven Automated Heuristic Design with Minimal Human Priors
Shared title terminologycs.AIJianghan Zhu, Cong Zhang, Rongjie Zhu et al.
Learning Meta-Skills for Agent Harness Design in Test-Time AI4AI
Shared title terminologycs.AICheng Qian, Kunlun Zhu, Beibin Li et al.
Modeling Event-Conditioned Emotional Expression Response with LLM Agents in a Synthetic Social Simulation
Shared title terminologycs.AIRebecca Marigliano, Peter Carragher, Kathleen M. Carley