Live layout

This page uses an executable layout algorithm matching the backend graph_layout (lane / tier / depth and column-allocation rules). Supply node data → the algorithm computes every node position → render the result. Switch scenarios below to inspect layouts from different datasets. Communication edges are hidden until you hover over the graph.

Nodes: ◇ ROOT  ○ user  △ llm  □ code  ◉ merge
Color = branch identity (one color per lane)
Line style = edge type:
 ━ Same branch  - - retry  -·- spawn  ··· communication (hover)  ═ merge  ┄ attach
Column rule: each fork uses two columns (vertical axis + nodes)

Design principles (all DAG rendering rules)

1. Edges: connect each node to its parent, down first and then right

One edge-routing rule: connect each node to its parent, routing from the parent down to the child’s row, then right to the child. Every edge follows this rule.

2. Node shape = role

◇ ROOT (white-filled diamond) · ○ user (human message, circle) · △ llm (AI/agent message, triangle) · □ code (tool/function call, square) · ◉ merge (filled circle with a hole).
Messages from another agent use △, not ○; circles are reserved for human users.

3. Color = branch identity, not edge type

Each lane (branch) has one color. Every edge uses the color of the branch it belongs to or targets.Never distinguish edge types by color, which would conflict with branch identity.

4. Line style = edge type, independent of color

5. Columns (lane / tier)

6. Rows (depth) follow time

Order by global created_at (seq), earlier events above. An existing branch (such as communication target B) appears before the send operation referencing it, rather than appearing newly created at send time. Retry siblings share a row as parallel alternatives.

7. Cross-branch communication (agent ↔ agent) is asynchronous

Synchronous blocking would make A wait for B, serializing parallel branches or causing deadlock. Asynchronous execution allows a background agent to work while conversation continues:

8. Branch merges / child-branch work

9. Cross-branch reference edges: hidden until endpoint hover, then animated

Call edges (same branch / retry / spawn, defining graph structure) remain visible.
Reference edges (send → received, response → replied, merge inputs, and attach returns: cross-branch references) are hidden by default: reveal an edge only while hovering either endpoint node, with a directional animation (moving dashes). Hide it again when the pointer leaves.
Rationale: many such edges would obscure the graph if always visible. Hover reveals a node’s connections without persistent clutter.

10. What this diagram does

This page uses an executable layout algorithm matching the backend graph_layout layout algorithm is implemented here with matching lane/tier/depth and column-allocation rules. Input node data → compute positions → render. Switch scenarios above to see actual computed layouts for different datasets.