A Study of Library Usage in Agent-Authored Pull Requests
Lukas Twist, Jie M. Zhang

TL;DR
This study analyzes how AI coding agents use libraries in pull requests, revealing frequent library imports, cautious dependency additions with versioning, and diverse library choices, providing insights into their interaction with software ecosystems.
Contribution
It provides the first large-scale empirical analysis of library usage patterns in agent-generated pull requests, highlighting differences from traditional LLM behaviors.
Findings
Agents import libraries in 29.5% of PRs
Only 1.3% of PRs add new dependencies
75% of dependency additions specify a version
Abstract
Coding agents are becoming increasingly capable of completing end-to-end software engineering workflows that previously required a human developer, including raising pull requests (PRs) to propose their changes. However, we still know little about how these agents use libraries when generating code, a core part of real-world software development. To fill this gap, we study 26,760 agent-authored PRs from the AIDev dataset to examine three questions: how often do agents import libraries, how often do they introduce new dependencies (and with what versioning), and which specific libraries do they choose? We find that agents often import libraries (29.5% of PRs) but rarely add new dependencies (1.3% of PRs); and when they do, they follow strong versioning practices (75.0% specify a version), an improvement on direct LLM usage where versions are rarely mentioned. Generally, agents draw from…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSoftware Engineering Research · Advanced Software Engineering Methodologies · Scientific Computing and Data Management
