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.
agentgraph graph
Render the DAG as Mermaid flowchart or Graphviz DOT. Output goes to stdout so you can pipe it directly to a renderer.Arguments and flags
Path to the DAG YAML file.
Output format. Options: mermaid or graphviz.
Examples
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.Node type colours match the inspect status colour scheme: agent nodes are blue, approval gates are red, exec nodes are grey, and so on.agentgraph diff
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.Arguments and flags
Runs directory containing both runs.
Number of context lines to show around each change in the unified diff output.
Examples
For each node that appears in either run:
= node_id (identical digest) — node produced the same output in both runs
~ node_id (changed) — followed by a unified diff of the two artifacts
+ node_id — only in <run_b> — node exists only in the second run
- node_id — only in <run_a> — node exists only in the first run
Use cases
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.