Skip to main content
agentgraph validate parses your DAG YAML and checks it without executing anything. It resolves the dependency graph into topological waves, reports the declared inputs and outputs, and inspects every Jinja template for variables that are not accounted for. Run it before agentgraph run whenever you edit a DAG file.
agentgraph validate <dag_path> [OPTIONS]

Arguments and flags

dag_path
string
required
Path to the DAG YAML file to validate.
--input / -i
string
Declare an input key so the template-variable checker treats it as known. Accepts key=value or just key. Repeat the flag for multiple inputs. Without this flag, any template variable not covered by depends_on or the DAG’s own inputs: block is flagged as a warning.

Expected output

A valid DAG prints a summary of waves, declared inputs, declared outputs, and any warnings:
✓ research: 4 nodes, 2 wave(s)
  wave 1: ['research_a', 'research_b', 'research_c']
  wave 2: ['synthesizer']

Declared inputs:
  topic : string (required) — Topic to research

Declared outputs:
  report ← node synthesizer

Examples

agentgraph validate examples/research.yaml

Declared inputs table

When the DAG declares an inputs: block, validate prints each key with its type, required/optional status, default value, and description. This is the same information agentgraph run uses to validate --input values at execution time.
ColumnMeaning
keyInput name, usable as {{ key }} in node prompts
typeDeclared type (string, number, etc.)
required / defaultWhether a value must be supplied, and the fallback if not
descriptionHuman-readable description from the DAG file

Declared outputs table

When the DAG declares an outputs: block, validate prints each output path and the node whose artifact it maps to. dagraph writes these files after a successful run completes.

Template variable warnings

If a node prompt references a Jinja variable that is neither in depends_on, a known reserved loop variable (iteration, previous_output, evaluator_feedback, candidate, index), nor a declared --input, validate prints a warning:
1 template-variable warning(s):
  ⚠ synthesizer.prompt: uses {{ author }} but it is not in depends_on, reserved, or --input
These warnings do not prevent agentgraph run from executing the DAG, but the template will render an empty string for the unknown variable at runtime.
Run agentgraph validate in CI as a pre-flight check to catch YAML syntax errors and missing inputs before they reach production.