{
  "schema_version": 1,
  "mode": "agent",
  "template_type": "agent",
  "style": 2,
  "motion_scene": "tool-grounding",
  "quality_profile": "showcase",
  "width": 960,
  "height": 720,
  "title": "Tool Call Flow",
  "subtitle": "retrieval, terminal execution, source grounding, and answer synthesis",
  "window_controls": true,
  "meta_center": "AGENT TOOL LOOP / GROUNDED EXECUTION",
  "meta_right": "STYLE-2 · DARK TERMINAL",
  "containers": [
    { "id": "request-path", "x": 40, "y": 120, "width": 880, "height": 110, "label": "Request Path" },
    { "id": "tooling-fabric", "x": 40, "y": 290, "width": 880, "height": 150, "label": "Tooling Fabric" },
    { "id": "source-grounding", "x": 40, "y": 480, "width": 880, "height": 140, "label": "Source Grounding" }
  ],
  "nodes": [
    { "id": "query", "kind": "speech", "x": 60, "y": 156, "width": 140, "height": 54, "label": "User Query", "fill": "#0f172a", "stroke": "#38bdf8", "flat": true },
    { "id": "retrieve", "kind": "double_rect", "x": 280, "y": 156, "width": 180, "height": 54, "label": "Retrieve Chunks", "sublabel": "select evidence", "fill": "#111827", "stroke": "#a855f7", "glow": "purple" },
    { "id": "generate", "kind": "rect", "x": 540, "y": 156, "width": 180, "height": 54, "label": "Generate Answer", "sublabel": "compose + cite", "fill": "#111827", "stroke": "#f97316" },
    { "id": "grounded", "kind": "speech", "x": 790, "y": 156, "width": 110, "height": 54, "label": "Grounded", "sublabel": "final reply", "fill": "#0f172a", "stroke": "#34d399", "flat": true, "glow": "green" },
    { "id": "agent", "kind": "double_rect", "x": 100, "y": 360, "width": 180, "height": 60, "label": "Agent", "sublabel": "plan + tool policy", "fill": "#111827", "stroke": "#34d399", "glow": "green" },
    { "id": "terminal", "kind": "terminal", "x": 390, "y": 360, "width": 180, "height": 60, "label": "Terminal", "fill": "#111111", "stroke": "#475569", "header_fill": "#222222" },
    { "id": "knowledge", "kind": "cylinder", "x": 700, "y": 360, "width": 180, "height": 60, "label": "Knowledge Base", "sublabel": "embeddings", "fill": "#0f172a", "stroke": "#38bdf8", "glow": "blue" },
    { "id": "documents", "kind": "folder", "x": 390, "y": 520, "width": 180, "height": 50, "label": "Source Documents", "fill": "#3f2a00", "stroke": "#f59e0b", "line_stroke": "#fcd34d" }
  ],
  "arrows": [
    { "id": "request", "source": "query", "target": "retrieve", "source_port": "right", "target_port": "left", "flow": "control", "motion_role": "ingress", "motion_stage": 1, "motion_order": 0, "label": "request" },
    { "id": "draft", "source": "retrieve", "target": "generate", "source_port": "right", "target_port": "left", "flow": "data", "motion_role": "grounding", "motion_stage": 6, "motion_order": 1, "label": "context" },
    { "id": "answer", "source": "generate", "target": "grounded", "source_port": "right", "target_port": "left", "flow": "feedback", "motion_role": "answer", "motion_stage": 7, "motion_order": 0, "label": "answer" },
    { "id": "delegate", "source": "retrieve", "target": "agent", "source_port": "bottom", "target_port": "top", "flow": "control", "motion_role": "delegate", "motion_stage": 2, "motion_order": 0, "label": "delegate" },
    { "id": "tool-call", "source": "agent", "target": "terminal", "source_port": "right", "target_port": "left", "flow": "read", "motion_role": "tool-call", "motion_stage": 3, "motion_order": 0, "label": "tool call" },
    { "id": "inspect", "source": "terminal", "target": "documents", "source_port": "bottom", "target_port": "top", "flow": "read", "motion_role": "inspect", "motion_stage": 4, "motion_order": 0, "label": "inspect" },
    { "id": "index", "source": "documents", "target": "knowledge", "source_port": "right", "target_port": "bottom", "flow": "write", "motion_role": "index", "motion_stage": 5, "motion_order": 0, "label": "index" },
    { "id": "ground", "source": "knowledge", "target": "generate", "source_port": "top", "target_port": "bottom", "flow": "data", "motion_role": "grounding", "motion_stage": 6, "motion_order": 0, "label": "ground" }
  ],
  "legend_orientation": "horizontal",
  "legend_x": 48,
  "legend_y": 650,
  "legend_locked": true,
  "legend": [
    { "flow": "control", "label": "control" },
    { "flow": "read", "label": "tool read" },
    { "flow": "write", "label": "index write" },
    { "flow": "data", "label": "grounding data" }
  ],
  "footer": "Style 2 · Dark Terminal · grounded tool execution",
  "footer_x": 48,
  "footer_y": 700
}
