Agentic Loop Dependence Graph (ALDG)
- Agentic Loop Dependence Graph (ALDG) is a graph-based formalization that converts implicit agent execution dependencies into explicit static DAGs with annotated nodes and edges.
- It employs deterministic dependency extraction rules—such as dataflow, tool-call, and control-guard—to ensure bounded recovery and verifiable execution sequencing.
- ALDG frameworks support applications including iterative planning, infinite loop detection, and execution lineage, improving control and reproducibility in agent systems.
Searching arXiv for papers on Agentic Loop Dependence Graph and closely related graph-based agent execution frameworks. Agentic Loop Dependence Graph (ALDG) is a graph-based formalization of agent execution in which dependencies that would otherwise remain implicit in an agent loop are made explicit as nodes, edges, joins, and annotations. In the scheduler-theoretic formulation introduced in "From Agent Loops to Structured Graphs: A Scheduler-Theoretic Framework for LLM Agent Execution," ALDG is the explicit dependence structure obtained by lifting the implicit, context-window control flow of an Agent Loop into an immutable, static directed acyclic graph (DAG) under the Structured Graph Harness (SGH) (Wei, 13 Apr 2026). Closely related papers use the same term, or near-equivalent graph formalisms, to model iterative planning, loop-aware static analysis, infinite loop detection, execution lineage, and runtime call-graph unrolling (Zhang et al., 2 Jul 2026, Wang et al., 2 Jul 2026, Hou et al., 2 Jul 2026, Qi et al., 14 Jun 2026, Rosen et al., 7 May 2026). Taken together, these formulations suggest that ALDG is best understood not as a single universally fixed object, but as a family of graph representations for explicit agentic dependence, feedback, and recovery.
1. Definitions and conceptual scope
In the SGH framework, ALDG is identified with the SGH-validated static DAG for a given plan version, augmented with dependency types, escalation metadata, node state traces, contracts, and validation methods (Wei, 13 Apr 2026). The core claim is that the classic Agent Loop can be re-expressed as an execution plan in which hidden sequencing assumptions such as “read files, then analyze” become explicit structural edges rather than transient context-window content.
Other works define adjacent objects with different emphases. Atomic Task Graph (ATG) represents planning and execution as an explicit dependency DAG of atomic tool-use units, then connects ATG to an ALDG that generalizes ATG to capture iterative behaviors and loop semantics while preserving verifiability (Zhang et al., 2 Jul 2026). AgentFlow defines an Agent Dependency Graph (ADG) as a triple of typed graphs over shared nodes, and then proposes ALDG as an extension with explicit loop nodes, loop-carried edges, and SCC-based loop abstractions (Wang et al., 2 Jul 2026). IAL-Scan defines ALDG as a directed, attributed graph over agent execution elements, typed edges, and annotations, specialized for detecting feedback paths that can repeatedly reach costly or state-growing operations without an effective bound (Hou et al., 2 Jul 2026). "LLM-as-Code Agentic Programming for Agent Harness" uses ALDG for the runtime, acyclic, unrolled dependence graph produced when deterministic code owns control flow and LLM calls are localized call sites (Qi et al., 14 Jun 2026). "From Agent Loops to Deterministic Graphs: Execution Lineage for Reproducible AI-Native Work" does not use the term natively, but the paper’s execution-lineage DAG is explicitly aligned to ALDG for agentic loops (Rosen et al., 7 May 2026).
| Formulation | Graph form | Primary purpose |
|---|---|---|
| SGH ALDG (Wei, 13 Apr 2026) | Immutable static DAG per plan version | Controllability, bounded recovery, auditability |
| ATG→ALDG (Zhang et al., 2 Jul 2026) | Per-phase DAGs plus loop-aware meta-graph | Planning, reuse, localized repair |
| ADG→ALDG (Wang et al., 2 Jul 2026) | Typed dependency graphs plus loop nodes/SCCs | Static analysis, governance, security |
| IAL-Scan ALDG (Hou et al., 2 Jul 2026) | Directed attributed graph with feedback edges | Infinite loop detection and bound analysis |
| LLM-as-Code ALDG (Qi et al., 14 Jun 2026) | Runtime acyclic unrolled DAG | Deterministic control and depth-bounded context |
| Execution-lineage DAG (Rosen et al., 7 May 2026) | Artifact-producing DAG with identity-based replay | Reproducibility and selective recomputation |
A common misconception is that ALDG necessarily denotes a cyclic graph because it refers to an “agentic loop.” The cited literature does not support a single answer. In SGH, the executable object is strictly acyclic and immutable within a plan version (Wei, 13 Apr 2026). In ATG, cycles are disallowed inside each single-phase graph and iterative behavior is represented by graph evolution over time (Zhang et al., 2 Jul 2026). In AgentFlow and IAL-Scan, loops are first-class analytic objects discovered through SCCs, back-edges, or feedback edges in control/data-flow representations (Wang et al., 2 Jul 2026, Hou et al., 2 Jul 2026).
2. Scheduler-theoretic foundation
The scheduler-theoretic formulation begins with an execution system
where is the set of node states, computes the ready set, is the scheduling policy, is the observation space, and is the state transition function (Wei, 13 Apr 2026). Readiness is defined by
Within this framework, the Agent Loop is characterized as a non-deterministic, single-ready-unit scheduler: at every reachable state , , and the choice of what to activate comes from opaque LLM inference rather than an inspectable deterministic policy (Wei, 13 Apr 2026). The paper identifies three structural weaknesses: implicit dependencies, unbounded recovery loops, and mutable execution history. Dependencies live only in the LLM’s context and memory; retry, skip, or replan decisions are ad hoc LLM outputs with no bound on attempts; and plans are silently rewritten in context, so one cannot reconstruct which plan governed which actions.
SGH addresses these weaknesses by lifting control flow into an explicit static DAG, separating planning, execution, and recovery into three layers, and imposing a strict escalation protocol with bounded budgets and monotonic recovery levels (Wei, 13 Apr 2026). This places classic Agent Loops and graph executors on a continuum parameterized by ready-set cardinality and policy explicitness: the Agent Loop sits at with an implicit, non-deterministic policy, whereas SGH sits at 0 with a deterministic, inspectable policy.
The SGH execution plan is
1
with nodes 2, dependencies 3, per-node configuration 4, and output contracts 5 (Wei, 13 Apr 2026). Its graph is
6
subject to the acyclicity constraint
7
Because 8 is acyclic, it induces a strict partial order 9 whenever there exists a directed path 0, and admits a topological ordering 1 such that 2 (Wei, 13 Apr 2026). In SGH, the scheduler dispatches all ready nodes respecting 3, allowing parallel execution waves when dependencies permit.
3. Construction and dependence semantics
The SGH paper gives an explicit lifting procedure from an Agent Loop transcript 4, where each turn produces an action 5, inputs 6, and outputs 7, into an ALDG (Wei, 13 Apr 2026). The construction relies on deterministic dependency-extraction rules.
The dataflow rule adds an edge 8 whenever turn 9 consumes an artifact produced at 0. The tool-call rule adds 1 when tool or toolchain 2 requires outputs from tool 3. The control-guard rule adds 4 with an all_of join when a postcondition at 5 is required by 6’s precondition. The alternative-path rule groups alternative fixes as candidates feeding a successor through an any_of join. The recovery lifting rule is especially important: retries do not create edges, local patches are represented as recovery-state changes, and full replans create a new plan version 7 with a new graph 8, never backward edges in 9 (Wei, 13 Apr 2026).
The resulting ALDG is not merely a bare DAG. It is the derived 0 annotated with join types (all_of/any_of), per-node contracts 1, side-effect levels, and recovery metadata (Wei, 13 Apr 2026). Plan validation checks acyclicity with Kahn’s algorithm, reachability, join consistency, contract well-formedness, and side-effect consistency before execution; plans failing these checks are rejected.
The paper’s illustrative example is a bug-fix task in a Python project. search_auth and search_utils are independent; read_auth depends on search_auth, read_utils depends on search_utils, analyze depends on both reads through all_of, fix_A and fix_B are alternative candidates from analyze, run_tests depends on either patch through any_of, update_docs depends on analyze, and report depends on both run_tests and update_docs through all_of (Wei, 13 Apr 2026). The ready-set waves are
2,
3,
4,
5,
then run_tests, then report.
This example makes the semantics of joins explicit. For report,
6
while for run_tests,
7
The paper states that all_of readiness is monotone in the executed set, whereas any_of is non-monotone because siblings can transition to skipped once one candidate succeeds (Wei, 13 Apr 2026).
The construction problem also appears in other graph-centric systems. ATG recursively decomposes a high-level task into a sequence of DAGs 8 with interface-preserving graph rewrites, typed edges, and per-node attributes such as status, cost estimate, provenance, cache key, iteration index, and invariants (Zhang et al., 2 Jul 2026). AgentFlow instead extracts typed nodes and edges from source code and framework semantics, building an ADG
9
over agents, prompts, models, capabilities, states, and policies (Wang et al., 2 Jul 2026). These alternative constructions shift ALDG from transcript lifting toward static extraction or graph evolution, but they preserve the central idea that agentic dependencies should be explicit and inspectable rather than buried in unstructured trajectories.
4. State, recovery, and correctness properties
SGH specifies a node state machine
0
with terminal states
1
(Wei, 13 Apr 2026). Selected transitions include pending → ready when dependencies are met, ready → running on dispatch, running → executed on success when 2 is satisfied, running → failed_retryable on transient error with remaining budget, running → failed on structural error, ready → skipped when a sibling in an any_of group executes, and waiting_human → cancelled on timeout or cancellation.
Bounded execution is central to the termination guarantee. Each node 3 has timeout 4 and retry budget 5, while waiting_human has finite timeout 6. A running node transitions to failed if time exceeds 7 or retries exceed 8 (Wei, 13 Apr 2026). Under a valid finite acyclic DAG with all nodes reachable and bounded execution, the paper states the theorem of Bounded Termination: SGH’s main loop terminates with probability 9, and every node reaches a terminal state within bounded time. The stated time bound is
0
Soundness is explicitly conditional rather than absolute. Let 1 be the probability that node 2’s validation correctly accepts true outputs, with false-positive probability 3. If all nodes reach executed and validation errors are independent, then
4
This makes the validation gap explicit and motivates deterministic or code-based validation for high-impact nodes (Wei, 13 Apr 2026). A common misconception is that graphization alone guarantees correctness. The cited theorem does not claim that; it claims conditional soundness under validation reliability assumptions.
Recovery is formalized as a separate layer with a strict escalation protocol. SGH distinguishes a Planner Layer, Runtime Layer, and Recovery Layer, and enforces a context partition in which execution context 5 and diagnostic context 6 are disjoint during node execution (Wei, 13 Apr 2026). Diagnostic information may enter execution only through a new plan version. Recovery levels are 7, 8, and 9. The escalation invariant requires strict monotonicity,
0
requires that level 1 be exhausted before level 2 is invoked, and prohibits skipping levels (Wei, 13 Apr 2026). Mechanical enforcement uses recovery_state[v] ∈ {pristine, retried, patched}.
This bound-oriented perspective is sharpened by IAL-Scan, which argues that visible exits are insufficient if they do not semantically constrain the controlling mechanism. Its ALDG analysis flags cycles when costly or state-growing nodes remain repeatedly reachable without an effective bound, and classifies bounds as Covered or UncoveredOrWeak, including missing_bound, weak_bound, disabled_bound, ineffective_bound, and bypassed_bound (Hou et al., 2 Jul 2026). That work identifies Infinite Agentic Loops as structural failures arising from the interaction between agent logic, framework semantics, runtime observations, and termination mechanisms rather than from ordinary programming loops alone.
5. Variants and related graph frameworks
Several adjacent frameworks situate ALDG within broader graph-based agent research. ATG is a unified, training-free control framework in which planning recursively refines a task into DAGs and execution schedules antichains subject to resource constraints (Zhang et al., 2 Jul 2026). Single-phase graphs remain acyclic, but iterative behavior is represented by graph evolution
3
with termination when 4 holds. The paper also gives an explicit ALDG definition with back-edges 5, loop invariants 6, and termination conditions 7, but restricts executable instances to acyclic 8 so that verifiability is preserved (Zhang et al., 2 Jul 2026).
AgentFlow approaches the problem from static analysis of agent programs. Its ADG uses typed nodes from the abstract domain 9, covering agent units, prompt contexts, model units, capabilities, memory/state objects, and control policies (Wang et al., 2 Jul 2026). ALDG is then proposed as an extension
0
that adds loop nodes for SCCs, loop_intra edges, loop_carried edges, and optional loop_exit edges. This formulation is explicitly designed for SCC decomposition, back-edge detection, loop-carried dependence extraction, and taint-style fixpoint analysis.
IAL-Scan adopts a different abstraction. Its ALDG is
1
a directed attributed graph whose node kinds include scopes, controllers, invocations, and state updates, and whose edge kinds include control flow, calls, workflow transitions, tool dispatch, handoff/reentry, message passing, and feedback edges such as LOOP_BACK, RETRY_EDGE, ASYNC_CALLBACK, and AUTO_RETRY (Hou et al., 2 Jul 2026). The objective is not scheduling or replay but identification of feedback regions in which model calls, tool invocations, or state growth can repeat without effective coverage by counters, budgets, recursion limits, or timeouts.
The LLM-as-Code line of work reinterprets ALDG as the runtime dependence graph produced when loops and branches are owned by deterministic code rather than by the model (Qi et al., 14 Jun 2026). In that setting, the execution history “becomes the call graph itself, a directed acyclic graph (DAG) of function and reasoning nodes,” and the crucial bound is on context assembly rather than on recovery. For an AgentCall node 2 with call depth 3,
4
whereas naïve orchestrator-style accumulation scales with total steps (Qi et al., 14 Jun 2026). This formulation treats loop-carried dependence through forward-only iteration layers 5, preserving acyclicity by unrolling runtime loops.
Execution lineage provides a further variant. There, the graph is 6 of artifact-producing computations, node identity is
7
and replay is determined by identity equality (Rosen et al., 7 May 2026). The paper aligns this DAG to ALDG for agentic loops and argues that explicit dependencies and stable boundaries make change propagation, upstream preservation, and unrelated-branch isolation structural rather than heuristic properties.
6. Applications, empirical signals, and open issues
Although the SGH paper is explicit that it is “a position paper and design proposal” providing “a theoretical framework, design analysis, and experimental protocol, not a production implementation or empirical results,” the broader graph-centric literature supplies empirical signals about what ALDG-like representations enable (Wei, 13 Apr 2026).
ATG reports that explicit DAG-based planning and execution outperform strong baselines across ALFWorld, WebShop, and ScienceWorld using 7B–8B backbones. For example, with Mistral-7B, ATG obtains 55.73 on ALFWorld, 62.75 on WebShop, and 49.81 on ScienceWorld, compared with ReAct at 6.57, 14.63, and 19.12, and PoG at 23.72, 24.18, and 28.63; it also reduces average steps and lowers ALFWorld hallucinatory action rate to 12.14% versus 42.86% for ReAct (Zhang et al., 2 Jul 2026). These results are attributed to explicit dependencies, localized context per node, parallel scheduling, and minimal subgraph repair with reuse.
AgentFlow shows that dependency recovery is practical at scale. Implemented for five representative agent frameworks and evaluated on AgentZoo, a corpus of 5,399 real-world agent programs, it uncovers 238 taint-style prompt-to-tool risks. On 60 sampled projects, it recovers a median of 17 nodes and 28 edges per project, compared to 4 nodes/0 edges for Agent-Wiz and 2.5 nodes/2 edges for Agentic Radar; on 100 projects, it generates 2,295 components and 1,008 binding relationships for Agent BOM evaluation (Wang et al., 2 Jul 2026). This indicates that typed dependence graphs are useful not only for execution but also for governance and security.
IAL-Scan evaluates its ALDG-based infinite-loop detector on 6,549 LLM agent repositories spanning 246,748 files and 33.41M LOC across eight frameworks. It reports 74 potential findings, with manual review confirming 68 Infinite Agentic Loops across 47 projects, for 91.9% precision (Hou et al., 2 Jul 2026). The dominant impacts are API cost exhaustion and model denial of service, each at 95.6%, while dominant failure patterns include retry feedback without bound, tool-call iteration without bound, and multi-agent chat without turn bound. This underscores a central ALDG insight: feedback paths matter, but bound coverage over those paths matters more.
Other adjacent results emphasize maintainability and runtime control. Execution lineage preserves the final memo exactly in all runs, with zero churn and zero unrelated-branch contamination, in its unrelated-branch update task, while loop baselines regenerate and contaminate outputs; in an intermediate-artifact edit, only DAG replay achieves perfect upstream preservation, downstream propagation, unaffected-artifact preservation, and cross-artifact consistency (Rosen et al., 7 May 2026). In computer-use agents, deterministic program-owned control with an ALDG-like runtime DAG achieves 86.8% success within 15 steps on OSWorld, outperforming prior systems allowed 100 steps, with the paper attributing the gain to deterministic control and DAG-structured context (Qi et al., 14 Jun 2026).
Broader graphified agent loops extend the idea beyond text-first tool use. UniManip formalizes a bi-level Agentic Operational Graph over an Agentic Layer and Scene Layer and reports a 22.5% higher success rate than the strongest VLA baseline and a 25.0% higher task success rate than hierarchical baselines, while SAGE models long-term memory as a self-evolving graph memory substrate and reports 82.5/91.6 Recall@2/5 on NQ in zero-shot open-domain transfer after reader-writer feedback (Liu et al., 13 Feb 2026, Wang et al., 12 May 2026). These systems are not identical to SGH’s ALDG, but they reinforce the same research direction: graph-structured dependencies, explicit feedback channels, and bounded or analyzable iteration.
The main open issue is semantic plurality. One line of work restricts ALDG to immutable static DAGs per plan version (Wei, 13 Apr 2026). Another treats loops as meta-graph relations over per-iteration DAGs (Zhang et al., 2 Jul 2026). Another elevates SCCs and loop-carried dependence to first-class objects in static analysis (Wang et al., 2 Jul 2026). Another centers feedback paths, costs, state growth, and bound verification (Hou et al., 2 Jul 2026). This suggests that future convergence, if it occurs, will likely be around a common objective—making agentic dependence explicit—rather than around a single canonical graph signature.