{
  "schema_version": 2,
  "diagram_type": "workflow",
  "meta": {
    "title": "Token là bộ phân loại tí hon",
    "quality_profile": "showcase",
    "legend": { "mode": "hidden" },
    "views": [
      { "id": "tool", "label": "Gọi tool", "focus": ["start", "first", "name", "args", "end"], "note": "Sau im_start assistant: token đầu chọn chữ hay tool, rồi chọn tool, tham số, và im_end báo đã xong." }
    ]
  },
  "lanes": [
    { "id": "tok", "label": "Token model sinh ra" },
    { "id": "alt", "label": "Nhánh khác" }
  ],
  "phases": [
    { "id": "p1", "label": "Có gọi tool?", "fromCol": 0, "toCol": 1, "variant": "emphasis" },
    { "id": "p2", "label": "Gọi tool nào, thế nào", "fromCol": 2, "toCol": 3 },
    { "id": "p3", "label": "Xong chưa?", "fromCol": 4, "toCol": 4, "variant": "dashed" }
  ],
  "mainPath": ["start", "first", "name", "args", "end"],
  "nodes": [
    { "id": "start", "lane": "tok", "col": 0, "type": "frontend", "label": "im_start assistant", "sublabel": "bắt đầu lượt trả lời", "width": 190 },
    { "id": "first", "lane": "tok", "col": 1, "type": "security", "label": "to=function.", "sublabel": "phân loại: gọi tool", "width": 170 },
    { "id": "text", "lane": "alt", "col": 1, "type": "external", "label": "xuống dòng", "sublabel": "trả lời bằng chữ", "width": 170 },
    { "id": "name", "lane": "tok", "col": 2, "type": "backend", "label": "Tên tool", "sublabel": "chọn trong danh sách", "width": 170 },
    { "id": "args", "lane": "tok", "col": 3, "type": "backend", "label": "Tham số", "sublabel": "tên và giá trị", "width": 150 },
    { "id": "end", "lane": "tok", "col": 4, "type": "security", "label": "im_end", "sublabel": "phân loại: đã xong", "width": 160 }
  ],
  "edges": [
    { "id": "e1", "from": "start", "to": "first", "variant": "emphasis" },
    { "id": "e2", "from": "start", "to": "text", "variant": "dashed" },
    { "id": "e3", "from": "first", "to": "name", "variant": "emphasis" },
    { "id": "e4", "from": "name", "to": "args", "variant": "emphasis" },
    { "id": "e5", "from": "args", "to": "end", "variant": "emphasis" }
  ]
}
