Use graph for branching architectures, multi-agent routers, bidirectional syncs, and Mermaid flowcharts with subgraphs.
graph
Hover any node to trace its upstream and downstream paths, or click to inspect:
Set bidirectional: true to draw arrowheads and travelling pulses in both directions, or undirected: true for plain links with no arrowheads:
bidirectional: true
undirected: true
1. Choose direction: LR (left-to-right) or TB (top-to-bottom).
direction: LR
TB
2. Define nodes with unique id and title (plus optional note, group, highlight, description, code, href).
nodes
id
title
note
group
highlight
description
code
href
3. Connect them with edges ({ from, to, label, fallback, bidirectional, undirected }).
edges
{ from, to, label, fallback, bidirectional, undirected }
4. Optionally group nodes by adding groups: [{ id, title }] and setting group: <id> on member nodes.
groups: [{ id, title }]
group: <id>
| Field | Required | Description |
|---|---|---|
| type | Yes | Must be graph |
type
| label | Yes | Accessible 1-sentence summary |
label
| nodes | Yes | At least 2 nodes with { id, title, ... } |
{ id, title, ... }
| edges | No | Connections { from, to, label?, fallback?, bidirectional?, undirected? } |
{ from, to, label?, fallback?, bidirectional?, undirected? }
| direction | No | LR (default) or TB |
direction
LR
| groups | No | Optional frame boxes [{ id, title }] drawn behind member nodes |
groups
[{ id, title }]