页面简介
Can AI agents design libraries other agents can use? LibraryDesignBench scores 11 model and harness runs on 15 library-design tasks across four languages.
正文摘录
Back to benchmarksView all modelsSoftware EngineeringOpen Benchmarks GrantsLibraryDesignBenchA benchmark measuring whether AI agents can design software libraries that other agents can use. One agent designs a library from an open-ended spec; three implementer agents then solve problems with it. Libraries are judged only by how simple and correct the downstream code becomes.Built withWebsite(opens in a new tab)Paper(opens in a new tab)Docs(opens in a new tab)Blog(opens in a new tab)Github(opens in a new tab)At a glance15library-design tasks242downstream problems4languages: Rust, Python, TypeScript, Haskell11model/harness runs evaluatedLeaderboard Rank Model Harness Score Pass Rate Simplicity Library Cost Cost / Problem 1 Opus 5.5 mini-SWE 48.9 ±0.9 86.6% 64.5 $9.62 $0.174 2 Fable 5.1 mini-SWE 47.5 ±1.1 86.1% 62.7 $14.81 $0.198 3 GPT-6 Astra mini-SWE 45.1 ±0.7 85.7% 58.7 $3.63 $0.155 4 GPT-6 Astra Codex 44.1 ±0.8 85.5% 58.5 $4.51 $0.194 5 Kimi K3 mini-SWE 44 ±1 86% 58.6 $8.7 $0.176 6 Fable 5.1 Claude Code 42.6 ±2.5 85.8% 58.2 $14.39 $0.203 7 GLM 5.3 mini-SWE 41.9 ±1.1 84.1% 57.1 $21.06 $0.234 8 Grok 4.6 mini-SWE 39.7 ±1.1 84.5% 54.1 $2.63 $0.225 9 GPT-5.6 Sol Codex 39.5 ±1 84.1% 52.9 $2.14 $0.2 10 GPT-6 Sol mini-SWE 38.5 ±0.7 85.2% 51.6 $0.3 $0.15 11 DeepSeek V4 Pro mini-SWE 31.2 ±0.8 84.9% 42 $0.31 $0.175 Reference arms: the same implementers with no library, and with the task's production libraryPProduction library46.6±0.5-No library34.4±0.5Key takeawaysOpus 5.5 leads LibraryDesignBench at 48.9, ahead of Fable 5.1 at 47.5 and GPT-6 Astra at 45.1. Opus 5.5 and Fable 5.1 are the only models that beat the human-written production libraries (46.6). Ten of the eleven entries score above having no library (34.4); DeepSeek V4 Pro's libraries score below it (31.2). Why measure library design?Agents increasingly build on libraries other agents wrote. A good library makes the next agent's code shorter and simpler; a bad one makes it longer, or worse than writing without one. LibraryDesignBench tests the design step directly, without scoring the library's own code, size or tests.What the results showAgents mostly copy existing designsOn 11 of 15 tasks, designers reproduce the production library's design. In the CLI-parser task, they copy clap's builder style rather than its shorter derive macro.A library can make things worseDeepSeek V4 Pro's libraries score 9.2% below having no library at all. In Haskell, an agent-written library scores below no library on 70% of designer and task pairs.The harness mattersFable 5.1 scores 47.5 in mini-SWE-agent but 42.6 in Claude Code.No home-team advantageAll three implementers agree on the top three designers and the last one, and none ranks its own model family higher.All 15 tasks · 242 problemsarazuPhysics libraryRust22 problemsModeled on: rapier(opens in a new tab)clirsCLI building crateRust13 problemsModeled on: clap(opens in a new tab)nprNumerical libraryRust20 problemsModeled on: ndarray(opens in a new tab)rubberbandSearch-index libraryRust20 problemsModeled on: tantivy(opens in a new tab)weftParsing libraryRust14 problemsModeled on: chumsky(opens in a new tab)pydaData-analysis libraryPython21 problemsModeled on: pandas(opens in a new tab)canonValidation libraryPython14 problemsModeled on: pydantic(opens in a new tab)roadkillTraffic-simulation libraryPython16 problemsModeled on: uxsim(opens in a new tab)sapiHTTP service libraryPython11 problemsModeled on: fastapi(opens in a new tab)simuSimulation libraryPython13 problemsModeled on: simpy(opens in a new tab)uglypieMarkup libraryPython11 problemsModeled on: beautifulsoup4(opens in a new tab)hereticalMarkup-sanitization libraryTypeScript22 problemsModeled on: dompurify(opens in a new tab)plaidParsing libraryHaskell15 problemsModeled on: megaparsec(opens in a new tab)umamiConcurrent queue libraryHaskell20 problemsModeled on: unagi-chan(opens in a new tab)wapiHTTP libraryHaskell10 problemsModeled on: servant(opens in a new tab)MethodologyTaskEach task gives the model an open-ended spec: the capabilities the library should have and a few example uses. There are no interfaces, method signatures or tests.ImplementersThree fixed implementer agents solve each of the task's problems using the library, without seeing the tests.ScorePass rate² × simplicity, averaged over every problem and implementer, with tasks weighted equally. Simplicity compares each solution with a reference solution built on the real production library. Scores run 0–100 and ± is the 95% confidence interval.Reference arms"No library" and "Production library" use the same implementers and problems.LimitsNo internet access. Designers get 4 hours per library. Implementers get 1 hour and $2.50 per problem. Unfinished solutions are scored as they are, which affects 1.7% of runs.Not measuredThe library's own correctness, security, runtime speed or maintainability.ResourcesBlog(opens in a new tab)Paper(opens in a new tab)Website(opens in a new tab)Docs(opens in a new tab)Github(opens in a new tab)Behind the benchmarkEach task asks the model under test to design a reusable library from an open-ended spec: the capabilities it should have and a few example uses. It gets no interfaces, no method signatures and no tests. There are 15 tasks in Rust, Python, TypeScript and Haskell, from a CLI argument parser like clap to a dataframe library like pandas.The library itself is never scored: not its code, its size or its own tests. It only has to build. It is judged only by the code other agents write with it. Three fixed implementer agents solve each of the task's problems with the library, without ever seeing the tests. Each solution is scored on how simple it is compared with a reference solution built on the real production library, weighted by how many hidden tests it passes.So a library scores well only when it makes the code built on it short and simple. The docs cover every step, including exactly what is pre-installed for each agent.AcknowledgmentsLibraryDesignBench was led by Gabe Orlanski, a Snorkel AI research fellow, with Snorkel AI's Vincent Chen and Fred Sala among the paper's co-authors. It was co-developed with researchers at the University of Wisconsin–Madison, and supported by Snorkel AI's Open Benchmarks Grants program, DARPA, the National Science Foundation, and Prime Intellect.FAQsWhat is LibraryDesignBench?What are the "No library" and "Production library" rows?Can a library make things worse?Why is the harness listed separately?Do implementers favor libraries from their own model family?What limits do the agents run under?Do agents just copy existing libraries?Why do agents still write more code than the reference?What doesn't the score measure?Get notified when we launch a new benchmark Share this benchmarkMore benchmarksExplore allKnowledge WorkRevenueBenchMeasures how well frontier models do real revenue work, from forecast cleanup to deal reviewAll-pass rate1GPT-6 Astra2Opus 5.53GPT-6.2 AstraAgentic CodingTerminal-Bench 4.1Evaluates terminal agents on continuously updated software-engineering tasks.By Resolution Rate1Copilot Fusion71.2%2Opus 5.565.8%3Fable 5.265.8%Computer UseAgents’ Last Exam V1.1Evaluating AI agents on long-horizon, economically valuable professional workflows with verifiable outcomes.By Pass Rate1GPT-6.2 Astra47.5%2Fable 5.2‡46.9%3Qwen 4†46.7%Knowledge WorkMBABench 2.0Evaluates agents on building financial models in spreadsheets, across 101 expert-written tasks.By pass rate1Astra (Codex)15.8%2Fable 5.1 (Claude Code)7.9%3Astra (ChatGPT)7.9%Software EngineeringSWE-bench CLIEvaluates validated multi-file code changes in open-source repositories.By pass@11Opus 5.516.6%2Gemini 4 Argon16.3%3Fable 5.114.5%Enterprise EnvironmentsSnorkelRevOpsEvaluates revenue-operations workflows involving systems, controls, and business-state updates.By pass@11Gemini 4 Argon18.4%2Muse Wonder18.0%3Grok 4.615.8%Enterprise EnvironmentsSnorkelFinance 2.0Evaluates financial workflows requiring evidence gathering, analysis, and compliance.By pass@11Grok 4.625.1%2GLM 5.321.2%3Grok 4.720.2%Enterprise EnvironmentsSnorkelUnderwrite 2.0Evaluates auditable insurance underwriting decisions using incomplete, distributed evidence.By pass@11Grok 4.730.5%2GLM 5.330.4%3Nemotron 3 Ultra 550B30.0%Agentic CodingAgentic Coding 2.0Evaluating whether coding agents can plan, execute, verify, and recover across complex terminal-native engineering tasks.By pass@11GPT-6 Astra47.6%2Muse Wonder43.6%3GPT-6.1 Sol42.8%Enterprise EnvironmentsSnorkelManufacturingEvaluates manufacturing decisions using fragmented plant-floor, engineering, and supplier evidence.By pass@11Muse Wonder27.8%2GPT-6.1 Sol19.6%3Gemini 4 Argon19.5%Knowledge WorkWorkplaceAgentsEvaluates AI agents on economically valuable professional work and verifiable workplace deliverables.By pass@11Gemini 4 Argon21.2%2Muse Wonder17.4%3Grok 4.617.1%Enterprise EnvironmentsSnorkelLegalEvaluates legal workflows requiring evidence, procedure, authority, and action.By pass@11Gemini 4 Argon46.0%2Grok 4.640.7%3Muse Wonder38.3%Agentic CodingTerminal-Bench 4.0Evaluates terminal agents on continuously updated software-engineering tasks.By Resolution Rate1Opus 5.564.8%2Sonnet 5.561.8%3Kimi K3.1 Pro60.9%Science & ResearchTerminal-Bench-ScienceEvaluates agents on scientific workflows derived from researchers’ own work.By Resolution Rate1GPT-6 Astra68.1%2Opus 5.563.3%3Fable 5.140.0%Agentic CodingTerminal-Bench 3.0Evaluates terminal agents on containerized tasks across seven domains.By Resolution Rate1Opus 542.7%2GPT-5.6 Sol34.6%3Fable 534.1%Software EngineeringSenior SWE-benchEvaluates coding agents on senior-level software engineering tasks.Tasteful Solve Rate1Opus 5.539.3%2GPT-6 Astra36.8%3Fable 5.134.7%Computer UseOSWorld 2.0Evaluates computer-use agents on 108 long-horizon workflows.By Binary Accuracy (500 steps)1Opus 5 · max44.33%2Muse Spark 1.3 · max39.25%3Opus 5 · high36.89%Software EngineeringSlopCode BenchMeasures coding-agent performance acr