AGENTS.md文件能显著提升AI编程助手的效率。
On the Impact of AGENTS.md Files on the Efficiency of AI Coding Agents
- 在代码仓库中添加AGENTS.md文件,可指导AI编写更高效代码。
- 有该文件时,运行时间中位数减少28.64%,输出令牌消耗降低16.58%。
- 适合关注AI编程工具优化与自动化流程的开发者参考。
AI编程助手如Codex和Claude Code正越来越多地用于自主贡献软件仓库。然而,代码仓库级别的配置文件如何影响这些助手的运行效率仍不明确。本文研究了AGENTS.md文件对GitHub合并请求中AI编程助手运行时间和令牌消耗的影响。我们分析了10个仓库中的124个合并请求,在有无AGENTS.md文件两种条件下执行代理,并测量了实际运行时间和令牌使用量。结果表明,存在AGENTS.md文件时,中位运行时间降低28.64%,输出令牌消耗减少16.58%,同时任务完成率保持相当。基于此,我们讨论了实际部署中配置策略的启示,并提出了关于仓库级指令在塑造AI编程助手行为、效率及集成方面的更广泛研究方向。
原文摘要 · Abstract (English)
AI coding agents such as Codex and Claude Code are increasingly used to autonomously contribute to software repositories. However, little is known about how repository-level configuration artifacts affect operational efficiency of the agents. In this paper, we study the impact of AGENTS$.$md files on the runtime and token consumption of AI coding agents operating on GitHub pull requests. We analyze 10 repositories and 124 pull requests, executing agents under two conditions: with and without an AGENTS$.$md file. We measure wall-clock execution time and token usage during agent execution. Our results show that the presence of AGENTS$.$md is associated with a lower median runtime ($Δ28.64$%) and reduced output token consumption ($Δ16.58$%), while maintaining a comparable task completion behavior. Based on these results, we discuss immediate implications for the configuration and deployment of AI coding agents in practice, and outline a broader research agenda on the role of repository-level instructions in shaping the behavior, efficiency, and integration of AI coding agents in software development workflows.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。