LLM agents are increasingly developed as source-code applications built on agent frameworks. These agent programs combine conventional host-language code with framework-defined semantics for models, prompts, tools, memory, and multi-agent orchestration logic. As a result, their behavior depends not only on traditional control and data flows, but also on a new class of agent dependencies. Such dependencies are often expressed as framework-induced semantics, such as agent constructors, tool decorators, and agent handoff declarations, making them difficult to recover with existing static analysis or dependency tracking tools. In this paper, we present AgentFlow, the first static analysis framework for recovering and analyzing agent dependencies from agent programs. AgentFlow constructs an Agent Dependency Graph (ADG), a framework-agnostic graph representation that represents agents, prompts, models, capabilities, memory states, and control policies as typed nodes, and captures their component-dependency, control-flow, and data-flow dependencies as typed edges. Built on ADGs, AgentFlow supports a range of analyses for agent governance and security, including Agent Bill of Materials (BOM) generation and prompt-to-tool risk detection. We implement AgentFlow for five representative agent frameworks and evaluate it on AgentZoo, a corpus of 5,399 real-world agent programs. Our evaluation shows that AgentFlow recovers richer agent entities and dependencies than existing AST-based agent static analysis tools, generates more dependency-aware Agent BOMs, and uncovers 238 taint-style prompt-to-tool risks in real-world agent programs. These results show that ADG provides a practical foundation for understanding, governing, and securing emerging agent software.
Embedding API Dependency Graph for Neural Code Generation
Shandong Normal University(山东师范大学);The University of Newcastle(纽卡斯尔大学);Big Data Center of Shandong Province(山东省大数据中心);Institute of Information Engineering, Chinese Academy of Sciences(中国科学院信息工程研究所);University of Chinese Academy of Sciences(中国科学院大学)
An Empirical Comparison of Dependency Network Evolution in Seven Software Packaging Ecosystems
几乎每一种流行的程序设计语言都带有一个或多个包管理器。由这样的包管理器分发的软件包形成大的软件生态系统。这些打包生态系统包含大量定期更新的包版本,并且与其他包版本有许多依赖关系。虽然打包生态系统对各自的开发人员社区非常有用,但它们面临着与规模、复杂性和进化速度相关的挑战。典型的问题是向后不兼容的软件包更新,以及依赖于已经过时或不活动的软件包的风险。本文使用libraries.io数据集对七个不同规模和年龄的包装生态系统的包依赖网络演变之间的相似性和差异性进行了定量实证分析:Cargo for Rust,CPAN for Perl,CRAN for R,npm for JavaScript,NuGet for.NET平台,Packagist for PHP和RubyGems for Ruby。我们提出了新的指标来捕捉这些依赖网络的增长,易变性,可恢复性和脆弱性,并使用这些指标来分析和比较它们的演变。我们观察到,依赖网络往往会随着时间的推移而增长,无论是在大小和软件包更新的数量,而少数软件包负责大部分的软件包更新。大多数软件包依赖于其他软件包,但只有一小部分软件包占大多数反向依赖。我们观察到一个高比例的脆弱的软件包,由于高和越来越多的传递依赖。这些发现有助于评估软件包依赖网络的质量,并通过依赖管理工具和强加的政策来改善它。
Static Program Slicing Using Language Models With Dataflow-Aware Pretraining and Constrained Decoding
Department of Computer Science, University of Manitoba(曼尼托巴大学计算机科学系);School of Engineering and Computer Science, Concordia University(Concordia大学工程与计算机科学学院);School of Computer Science, University of Windsor(温莎大学计算机科学学院)