Papers
Topics
Authors
Recent
Search
2000 character limit reached

Agentic Loop Dependence Graph (ALDG)

Updated 6 July 2026
  • 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

E=(S,U,P,O,Δ),E = (S, U, P, O, \Delta),

where S={(v,sv)vV,svΣ}S = \{ (v, s_v) \mid v \in V, s_v \in \Sigma \} is the set of node states, U:S2VU : S \to 2^V computes the ready set, P:2VVP : 2^V \to V is the scheduling policy, O={success,failure,retry,escalate}O = \{ success, failure, retry, escalate \} is the observation space, and Δ:S×V×OS\Delta : S \times V \times O \to S is the state transition function (Wei, 13 Apr 2026). Readiness is defined by

U(S)={vVsv=ready(u,v)E:su=executed}.U(S) = \{ v \in V \mid s_v = ready \wedge \forall (u, v) \in E: s_u = executed \}.

Within this framework, the Agent Loop is characterized as a non-deterministic, single-ready-unit scheduler: at every reachable state ss, U(s)1|U(s)| \le 1, 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 U=1|U| = 1 with an implicit, non-deterministic policy, whereas SGH sits at S={(v,sv)vV,svΣ}S = \{ (v, s_v) \mid v \in V, s_v \in \Sigma \}0 with a deterministic, inspectable policy.

The SGH execution plan is

S={(v,sv)vV,svΣ}S = \{ (v, s_v) \mid v \in V, s_v \in \Sigma \}1

with nodes S={(v,sv)vV,svΣ}S = \{ (v, s_v) \mid v \in V, s_v \in \Sigma \}2, dependencies S={(v,sv)vV,svΣ}S = \{ (v, s_v) \mid v \in V, s_v \in \Sigma \}3, per-node configuration S={(v,sv)vV,svΣ}S = \{ (v, s_v) \mid v \in V, s_v \in \Sigma \}4, and output contracts S={(v,sv)vV,svΣ}S = \{ (v, s_v) \mid v \in V, s_v \in \Sigma \}5 (Wei, 13 Apr 2026). Its graph is

S={(v,sv)vV,svΣ}S = \{ (v, s_v) \mid v \in V, s_v \in \Sigma \}6

subject to the acyclicity constraint

S={(v,sv)vV,svΣ}S = \{ (v, s_v) \mid v \in V, s_v \in \Sigma \}7

Because S={(v,sv)vV,svΣ}S = \{ (v, s_v) \mid v \in V, s_v \in \Sigma \}8 is acyclic, it induces a strict partial order S={(v,sv)vV,svΣ}S = \{ (v, s_v) \mid v \in V, s_v \in \Sigma \}9 whenever there exists a directed path U:S2VU : S \to 2^V0, and admits a topological ordering U:S2VU : S \to 2^V1 such that U:S2VU : S \to 2^V2 (Wei, 13 Apr 2026). In SGH, the scheduler dispatches all ready nodes respecting U:S2VU : S \to 2^V3, 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 U:S2VU : S \to 2^V4, where each turn produces an action U:S2VU : S \to 2^V5, inputs U:S2VU : S \to 2^V6, and outputs U:S2VU : S \to 2^V7, into an ALDG (Wei, 13 Apr 2026). The construction relies on deterministic dependency-extraction rules.

The dataflow rule adds an edge U:S2VU : S \to 2^V8 whenever turn U:S2VU : S \to 2^V9 consumes an artifact produced at P:2VVP : 2^V \to V0. The tool-call rule adds P:2VVP : 2^V \to V1 when tool or toolchain P:2VVP : 2^V \to V2 requires outputs from tool P:2VVP : 2^V \to V3. The control-guard rule adds P:2VVP : 2^V \to V4 with an all_of join when a postcondition at P:2VVP : 2^V \to V5 is required by P:2VVP : 2^V \to V6’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 P:2VVP : 2^V \to V7 with a new graph P:2VVP : 2^V \to V8, never backward edges in P:2VVP : 2^V \to V9 (Wei, 13 Apr 2026).

The resulting ALDG is not merely a bare DAG. It is the derived O={success,failure,retry,escalate}O = \{ success, failure, retry, escalate \}0 annotated with join types (all_of/any_of), per-node contracts O={success,failure,retry,escalate}O = \{ success, failure, retry, escalate \}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 O={success,failure,retry,escalate}O = \{ success, failure, retry, escalate \}2, O={success,failure,retry,escalate}O = \{ success, failure, retry, escalate \}3, O={success,failure,retry,escalate}O = \{ success, failure, retry, escalate \}4, O={success,failure,retry,escalate}O = \{ success, failure, retry, escalate \}5, then run_tests, then report.

This example makes the semantics of joins explicit. For report,

O={success,failure,retry,escalate}O = \{ success, failure, retry, escalate \}6

while for run_tests,

O={success,failure,retry,escalate}O = \{ success, failure, retry, escalate \}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 O={success,failure,retry,escalate}O = \{ success, failure, retry, escalate \}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

O={success,failure,retry,escalate}O = \{ success, failure, retry, escalate \}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

Δ:S×V×OS\Delta : S \times V \times O \to S0

with terminal states

Δ:S×V×OS\Delta : S \times V \times O \to S1

(Wei, 13 Apr 2026). Selected transitions include pending → ready when dependencies are met, ready → running on dispatch, running → executed on success when Δ:S×V×OS\Delta : S \times V \times O \to S2 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 Δ:S×V×OS\Delta : S \times V \times O \to S3 has timeout Δ:S×V×OS\Delta : S \times V \times O \to S4 and retry budget Δ:S×V×OS\Delta : S \times V \times O \to S5, while waiting_human has finite timeout Δ:S×V×OS\Delta : S \times V \times O \to S6. A running node transitions to failed if time exceeds Δ:S×V×OS\Delta : S \times V \times O \to S7 or retries exceed Δ:S×V×OS\Delta : S \times V \times O \to S8 (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 Δ:S×V×OS\Delta : S \times V \times O \to S9, and every node reaches a terminal state within bounded time. The stated time bound is

U(S)={vVsv=ready(u,v)E:su=executed}.U(S) = \{ v \in V \mid s_v = ready \wedge \forall (u, v) \in E: s_u = executed \}.0

Soundness is explicitly conditional rather than absolute. Let U(S)={vVsv=ready(u,v)E:su=executed}.U(S) = \{ v \in V \mid s_v = ready \wedge \forall (u, v) \in E: s_u = executed \}.1 be the probability that node U(S)={vVsv=ready(u,v)E:su=executed}.U(S) = \{ v \in V \mid s_v = ready \wedge \forall (u, v) \in E: s_u = executed \}.2’s validation correctly accepts true outputs, with false-positive probability U(S)={vVsv=ready(u,v)E:su=executed}.U(S) = \{ v \in V \mid s_v = ready \wedge \forall (u, v) \in E: s_u = executed \}.3. If all nodes reach executed and validation errors are independent, then

U(S)={vVsv=ready(u,v)E:su=executed}.U(S) = \{ v \in V \mid s_v = ready \wedge \forall (u, v) \in E: s_u = executed \}.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 U(S)={vVsv=ready(u,v)E:su=executed}.U(S) = \{ v \in V \mid s_v = ready \wedge \forall (u, v) \in E: s_u = executed \}.5 and diagnostic context U(S)={vVsv=ready(u,v)E:su=executed}.U(S) = \{ v \in V \mid s_v = ready \wedge \forall (u, v) \in E: s_u = executed \}.6 are disjoint during node execution (Wei, 13 Apr 2026). Diagnostic information may enter execution only through a new plan version. Recovery levels are U(S)={vVsv=ready(u,v)E:su=executed}.U(S) = \{ v \in V \mid s_v = ready \wedge \forall (u, v) \in E: s_u = executed \}.7, U(S)={vVsv=ready(u,v)E:su=executed}.U(S) = \{ v \in V \mid s_v = ready \wedge \forall (u, v) \in E: s_u = executed \}.8, and U(S)={vVsv=ready(u,v)E:su=executed}.U(S) = \{ v \in V \mid s_v = ready \wedge \forall (u, v) \in E: s_u = executed \}.9. The escalation invariant requires strict monotonicity,

ss0

requires that level ss1 be exhausted before level ss2 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.

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

ss3

with termination when ss4 holds. The paper also gives an explicit ALDG definition with back-edges ss5, loop invariants ss6, and termination conditions ss7, but restricts executable instances to acyclic ss8 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 ss9, 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

U(s)1|U(s)| \le 10

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

U(s)1|U(s)| \le 11

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 U(s)1|U(s)| \le 12 with call depth U(s)1|U(s)| \le 13,

U(s)1|U(s)| \le 14

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 U(s)1|U(s)| \le 15, preserving acyclicity by unrolling runtime loops.

Execution lineage provides a further variant. There, the graph is U(s)1|U(s)| \le 16 of artifact-producing computations, node identity is

U(s)1|U(s)| \le 17

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.

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Agentic Loop Dependence Graph (ALDG).