AgentFlow: Building Agent Dependency Graphs for Static Analysis of Agent Programs
On the map: LLM agents and tool use → Software engineering coding agents
Abstract (arXiv)
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.
Key facts. No citing papers in the map yet (data through 7 Oct 2026). Placed in Software engineering coding agents, one of 16 directions in LLM agents and tool use. Builds on 27 of its 64 references that are in the map. First posted on arXiv 2 Jul 2026.
Builds on
27 of 64 references.
Closest ancestors · 3
Same direction, newest first
- 2026Demystifying and Detecting Agentic Workflow Injection Vulnerabilities in GitHub Actions8 May
- 2025An Empirical Study of Agent Developer Practices in AI Agent Frameworks1 Dec
- 2024Defining and Detecting the Defects of the Large Language Model-based Autonomous Agents24 Dec
Other references · 24
- 2025Model Context Protocol (MCP): Landscape, Security Threats, and Future Research Directionscited by 257
- 2023Demystifying RCE Vulnerabilities in LLM-Integrated Appscited by 35
- 2024Large Language Model Supply Chain: A Research Agendacited by 23
- 2026MalSkillBench: A Runtime-Verified Benchmark of Malicious Agent Skillscited by 14
- 2024LLM App Store Analysis: A Vision and Roadmapcited by 12
- 2024On the (In)Security of LLM App Storescited by 12
- 2026ChainCaps: Composition-Safe Tool-Using Agents via Monotonic Capability Attenuationcited by 11
- 2024Exploring ChatGPT App Ecosystem: Distribution, Deployment and Securitycited by 10
- 2024Large Language Model Supply Chain: Open Problems From the Security Perspectivecited by 9
- 2025Demystifying LLM Supply Chain Vulnerabilities in the Wild: Distribution, Root Cause, and Real-World Impactcited by 8
- 2026ChainFuzzer: Greybox Fuzzing for Workflow-Level Multi-Tool Vulnerabilities in LLM Agentscited by 8
- 2026Agentproof: Static Verification of Agent Workflow Graphscited by 8
12 more
- 2025Implementing AI Bill of Materials (AI BOM) with SPDX 3.0: A Comprehensive Guide to Creating AI and Dataset Bill of Materialscited by 7
- 2026AIBoMGen: Generating an AI Bill of Materials for Secure, Transparent, and Compliant Model Trainingcited by 6
- 2026MalSkills: Detecting Malicious Skills in the Agentic Supply Chain via Neuro-symbolic Reasoningcited by 5
- 2024Lifting the Veil on Composition, Risks, and Mitigations of the Large Language Model Supply Chaincited by 4
- 2026SkillScope: Toward Fine-Grained Least-Privilege Enforcement for Agent Skillscited by 4
- 2026Towards Security-Auditable LLM Agents: A Unified Graph Representationcited by 4
- 2026AgentRiskBOM: A Risk-Scoping Security Bill of Materials for Agentic AI Systemscited by 4
- 2026YASA: Scalable Multi-Language Taint Analysis on the Unified AST at Ant Groupcited by 3
- 2024MiniScope: Automated UI Exploration and Privacy Inconsistency Detection of MiniApps via Two-phase Iterative Hybrid Analysiscited by 2
- 2025TAIBOM: Bringing Trustworthiness to AI-Enabled Systemscited by 1
- 2026LLM-Enabled Open-Source Systems in the Wild: An Empirical Study of Vulnerabilities in GitHub Security Advisoriescited by 1
- 2026Unsafe by Flow: Uncovering Bidirectional Data-Flow Risks in MCP Ecosystemcited by 1
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2026MyAG: A Graph-Based Framework for Designing and Analyzing Composable LLM Agent Systems
- 2026Beyond Predefined Sinks: Security-Aware Dependency Analysis for LLM Agents
- 2025AgentArmor: Enforcing Program Analysis on Agent Runtime Trace to Defend Against Prompt Injection
- 2026From Static Templates to Dynamic Runtime Graphs: A Survey of Workflow Optimization for LLM Agents
- 2026GraphBit: A Graph-based Agentic Framework for Non-Linear Agent Orchestration
- 2025A Declarative Language for Building And Orchestrating LLM-Powered Agent Workflows
- 2026AgentSPEX: An Agent SPecification and EXecution Language
- 2025Agint: Agentic Graph Compilation for Software Engineering Agents