一句话:对十大主流开源 LLM 智能体框架开展大规模实证研究,提炼五项最佳实践并揭示下游项目中的系统性缺陷模式。
随着大语言模型的发展,基于 LLM 的智能体被广泛用于软件工程、数据分析与自动决策,众多开源框架通过规划、工具调用与记忆管理等模块化抽象降低了开发门槛。然而已有研究多关注能力建模与架构创新,缺乏对工程实践与实际使用情况的系统分析。本文从工程视角对主流开源智能体框架开展大规模实证研究:首先识别开源社区中最流行的十个框架,考察其流行度与语言支持;通过分析官方文档、API 接口与源码实现,提炼出共同设计原则与五项最佳实践,并形式化相应的缺陷模式;随后对 73,014 个下游项目进行分层比例抽样,评估这些实践的实际落地情况。结果揭示出反复出现的问题,包括智能体描述不完整、记忆策略使用不当、监控与错误处理不足以及工具设计欠佳,且这些问题跨框架普遍存在,说明推荐抽象与实际采用之间存在结构性鸿沟,为框架设计选择与工程风险之间的关联提供了实证依据。
The rapid development of Large Language Models (LLMs) accelerates the adoption of LLM-based agents in software engineering, data analysis, and automated decision-making. To support agent development, various open-source frameworks provide modular abstractions for planning, tool invocation, and memory management, lowering the engineering barrier. Although widely used, research mainly emphasizes capability modeling and architectural innovation, while systematic analysis of engineering practices and real-world usage remains limited. This paper presents a large-scale empirical study of mainstream open-source agent frameworks from an engineering perspective. We first identify the ten most popular frameworks in the open-source community and examine their popularity and language support. By analyzing official documentation, API interfaces, and source-level implementations, we extract common design principles and distill five best practices. We then formalize corresponding defect patterns and perform stratified proportional sampling on 73,014 downstream projects to evaluate how these practices are implemented. The results reveal recurring issues, including incomplete agent description, improper memory Strategy, insufficient monitoring and error handling, and suboptimal tool design. These defects appear across frameworks, indicating structural gaps between recommended abstractions and practical adoption. Overall, this study provides empirical evidence linking framework design choices to engineering risks and highlights the need for stronger guidance and support in agent framework development.