{
  "schemaVersion": "0.1",
  "diagramFamily": "workflow",
  "scene": { "id": "multi-agent-workflow", "title": "Multi-agent Order Triage", "units": "px", "canvas": { "width": 1300, "height": 420 } },
  "layoutStrategy": { "algorithm": "hierarchical", "direction": "LR", "nodeSpacing": 35, "rankSpacing": 80 },
  "elements": [
    { "id": "msgStart", "kind": "node", "nodeType": "workflow.messageStart", "shape": "ellipse", "label": "Order received" },
    { "id": "classifier", "kind": "node", "nodeType": "workflow.task", "shape": "roundedRect", "label": "Classifier agent" },
    { "id": "decRoute", "kind": "node", "nodeType": "workflow.gateway", "shape": "diamond", "label": "Route?" },
    { "id": "fast", "kind": "node", "nodeType": "workflow.task", "shape": "roundedRect", "label": "Fast-path agent" },
    { "id": "complex", "kind": "node", "nodeType": "workflow.task", "shape": "roundedRect", "label": "Complex-case agent" },
    { "id": "human", "kind": "node", "nodeType": "workflow.task", "shape": "roundedRect", "label": "Human reviewer" },
    { "id": "decReview", "kind": "node", "nodeType": "workflow.gateway", "shape": "diamond", "label": "Approved?" },
    { "id": "exec", "kind": "node", "nodeType": "workflow.subprocess", "shape": "roundedRect", "label": "Execute order" },
    { "id": "notify", "kind": "node", "nodeType": "workflow.task", "shape": "roundedRect", "label": "Notify customer" },
    { "id": "msgEnd", "kind": "node", "nodeType": "workflow.messageEnd", "shape": "ellipse", "label": "Order complete" },
    { "id": "rejected", "kind": "node", "nodeType": "workflow.terminate", "shape": "ellipse", "label": "Rejected" },
    { "id": "e1", "kind": "edge", "edgeType": "workflow.sequenceFlow", "from": { "elementId": "msgStart" }, "to": { "elementId": "classifier" }, "router": "orthogonal" },
    { "id": "e2", "kind": "edge", "edgeType": "workflow.sequenceFlow", "from": { "elementId": "classifier" }, "to": { "elementId": "decRoute" }, "router": "orthogonal" },
    { "id": "e3", "kind": "edge", "edgeType": "workflow.sequenceFlow", "from": { "elementId": "decRoute" }, "to": { "elementId": "fast" }, "router": "orthogonal", "label": "simple" },
    { "id": "e4", "kind": "edge", "edgeType": "workflow.sequenceFlow", "from": { "elementId": "decRoute" }, "to": { "elementId": "complex" }, "router": "orthogonal", "label": "complex" },
    { "id": "e5", "kind": "edge", "edgeType": "workflow.sequenceFlow", "from": { "elementId": "complex" }, "to": { "elementId": "human" }, "router": "orthogonal", "label": "needs review" },
    { "id": "e6", "kind": "edge", "edgeType": "workflow.sequenceFlow", "from": { "elementId": "human" }, "to": { "elementId": "decReview" }, "router": "orthogonal" },
    { "id": "e7", "kind": "edge", "edgeType": "workflow.sequenceFlow", "from": { "elementId": "decReview" }, "to": { "elementId": "rejected" }, "router": "orthogonal", "label": "no" },
    { "id": "e8", "kind": "edge", "edgeType": "workflow.sequenceFlow", "from": { "elementId": "decReview" }, "to": { "elementId": "exec" }, "router": "orthogonal", "label": "yes" },
    { "id": "e9", "kind": "edge", "edgeType": "workflow.sequenceFlow", "from": { "elementId": "fast" }, "to": { "elementId": "exec" }, "router": "orthogonal" },
    { "id": "e10", "kind": "edge", "edgeType": "workflow.sequenceFlow", "from": { "elementId": "exec" }, "to": { "elementId": "notify" }, "router": "orthogonal" },
    { "id": "e11", "kind": "edge", "edgeType": "workflow.sequenceFlow", "from": { "elementId": "notify" }, "to": { "elementId": "msgEnd" }, "router": "orthogonal" }
  ]
}
