map node.
How waves work
dagraph uses a topological sort (Kahn’s algorithm) to group your nodes into waves. Every node whosedepends_on list is empty fires in wave 1. Once wave 1 is complete, any node whose dependencies are now all satisfied fires in wave 2, and so on. Nodes within the same wave run simultaneously.
You can preview the wave plan without spending any tokens:
Fan-out/fan-in with depends_on
The research.yaml example spins up three independent agents in parallel, each researching a different angle of the same topic, then passes all three outputs to a single synthesizer.
Each node’s output is stored as an artifact and referenced by its
id in downstream prompts — {{ research_a }}, {{ research_b }}, {{ research_c }}. You never pass raw text between nodes directly; dagraph resolves references from the artifact store.Creating sequential dependencies
Adddepends_on to any node to make it wait for one or more predecessors. Dependencies are additive — a node won’t start until every ID in its list has completed successfully.
Capping concurrent LLM calls
By default dagraph allows up to 10 simultaneous in-flight LLM calls. Use--max-concurrent to lower that ceiling, for example to stay within provider rate limits or control costs during development:
--rpm when using the --backend api option to add a requests-per-minute cap:
Dynamic fan-out with the map node
When you don’t know your list of items at design time, use a map node to fan out over a runtime list. Each item in the list gets its own agent call, and the results are collected into a JSON array available to downstream nodes.
Visualizing your DAG
Render the full graph structure as a Mermaid diagram to verify your dependency layout before running:Human approval gates
Pause a workflow mid-run for human review before continuing downstream nodes.
Evaluator loops
Automatically iterate on generated content until a separate evaluator approves it.