Visualize DAG topology and diff artifacts across runs
Render a DAG as Mermaid or Graphviz to understand its structure, then compare per-node artifacts between two runs for prompt iteration or A/B testing.
agentgraph graph prints a text representation of your DAG’s node topology — useful for understanding wave structure before running a complex workflow. agentgraph diff compares the artifact produced by each node across two runs of the same DAG, making it straightforward to evaluate the effect of a prompt change or a backend switch.
The Mermaid output groups nodes by execution wave inside subgraph blocks, with node types shown as italicised labels. Edges reflect the depends_on declarations in your YAML.
Compare per-node artifacts between two runs of the same DAG as a unified diff. Lines added in run_b are green, lines removed from run_a are red, and unchanged nodes are shown with an = marker.
Prompt iteration — Run the same DAG twice with a modified prompt on one node, then diff to see exactly what changed in downstream outputs.Backend comparison — Run the same DAG with --backend claude_code and --backend api to compare output quality across providers.Regression testing — Record a fixture from a known-good run, replay it after a DAG change, and diff to confirm no outputs changed unintentionally.
Paste Mermaid output directly into a GitHub pull request comment — GitHub renders Mermaid natively inside code fences tagged ```mermaid.