ModelRefs / DAG (Directed Acyclic Graph) — AI Glossary

DAG (Directed Acyclic Graph) — AI Glossary

A graph structure for representing agent task plans where nodes are tasks, edges are dependencies, and the absence of cycles ensures forward progress.

Overview

DAG-based agent orchestration (LangGraph, Prefect, Airflow for ML) represents workflows as nodes (LLM calls, tool executions) connected by directed edges (data flow). Acyclicity ensures tasks complete without deadlock. DAGs enable parallel execution of independent branches and conditional routing. The foundational abstraction for production agent pipelines.

Reference details

Topicagents
Last reviewed2026-06-24

Example: The critical path, not the sum

Four steps: A takes 2s, then B (3s) and C (5s) both depend on A and on nothing else, and D (1s) waits for both. Run serially and you wait 2 + 3 + 5 + 1 = 11 seconds. Because B and C are independent, the graph can run them at once, and the wall clock becomes the longest path through it: A + C + D = 2 + 5 + 1 = 8 seconds. Speeding up B buys nothing at all — it is not on the critical path. Writing the workflow as a graph is what makes that visible; a sequential script hides it.

Commonly confused with

A DAG is a fixed structure decided before execution, which is exactly what distinguishes it from an agent loop that chooses its next step at runtime. Acyclicity is the guarantee of termination, and it is also the limitation: a task genuinely needing to retry or revisit a step is not a DAG, which is why agent frameworks add explicit cycle support and then need step budgets to stay safe.

When to use it

Reach for it when:

  • Pipelines whose steps are known in advance, where parallelism and retries should be explicit
  • Where you want the execution plan to be inspectable and testable before it runs
  • Fan-out/fan-in work — independent retrievals or tool calls merged at the end

Reach for something else when:

  • Tasks whose next step depends on what the last one returned — that is a loop, not a graph
  • Small linear pipelines, where the orchestration outweighs the work
  • Assuming a DAG bounds cost: a node can still be an unbounded agent

Continue your research

Use these connected ModelRefs sections to compare alternatives, inspect implementation paths, and review the evidence and governance boundaries relevant to DAG (Directed Acyclic Graph) — AI Glossary.

Frequently asked questions

What is DAG (Directed Acyclic Graph)?

A graph structure for representing agent task plans where nodes are tasks, edges are dependencies, and the absence of cycles ensures forward progress.

What concepts are related to DAG (Directed Acyclic Graph)?

Closely related concepts include task decomposition, parallel execution, state machine.