Skip to content
arXiv· arXiv:2607.01640· Shenao Wang, Xinyi Hou, Yanjie Zhao, Xiao Cheng, Haoyu Wang·Indexed by this site · Originally published

AgentFlow: Building Agent Dependency Graphs for Static Analysis of Agent Programs

AgentFlow: Building Agent Dependency Graphs for Static Analysis of Agent Programs

AI summary

The researchers propose AgentFlow, which they describe as the first static analysis framework that recovers and analyzes agent dependencies from agent programs. Such dependencies are often expressed through framework-introduced semantics, such as agent constructors, tool decorators and handoff declarations, which existing static analysis or dependency tracking tools struggle to recover. AgentFlow builds a framework-agnostic Agent Dependency Graph (ADG), representing agents, prompts, models, capabilities, memory states and control policies as typed nodes, and using typed edges to characterize component dependencies, control flow and data flow relationships, and supports governance and security analysis such as Agent Bill of Materials (BOM) generation and prompt-to-tool risk detection. The authors implement the framework on five representative agent frameworks and evaluate it on the AgentZoo corpus containing 5399 real agent programs; evaluation results show that it recovers richer entities and dependencies than existing AST-based agent static analysis tools, generates Agent BOMs with greater dependency awareness, and discovers 238 prompt-to-tool taint-style risks in real programs.

Read originalarxiv.org