{
  "id": "rv5qmUxJX2d0TEFN",
  "name": "Robot swarm coordination with ai agent and real-time slack alerts",
  "tags": [],
  "nodes": [
    {
      "id": "c3805d78-da66-4b82-89f6-6b388f3d4d94",
      "name": "Parse Sensor Data",
      "type": "n8n-nodes-base.set",
      "position": [
        464,
        496
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "1",
              "name": "robotId",
              "type": "string",
              "value": "={{ $json.body.robotId }}"
            },
            {
              "id": "2",
              "name": "robotType",
              "type": "string",
              "value": "={{ $json.body.type }}"
            },
            {
              "id": "3",
              "name": "timestamp",
              "type": "string",
              "value": "={{ $json.body.timestamp }}"
            },
            {
              "id": "4",
              "name": "position",
              "type": "object",
              "value": "={{ $json.body.position }}"
            },
            {
              "id": "5",
              "name": "sensors",
              "type": "object",
              "value": "={{ $json.body.sensors }}"
            },
            {
              "id": "6",
              "name": "status",
              "type": "string",
              "value": "={{ $json.body.status }}"
            },
            {
              "id": "7",
              "name": "currentTask",
              "type": "string",
              "value": "={{ $json.body.currentTask }}"
            },
            {
              "id": "8",
              "name": "batteryLevel",
              "type": "number",
              "value": "={{ $json.body.sensors.battery }}"
            },
            {
              "id": "9",
              "name": "obstacles",
              "type": "array",
              "value": "={{ $json.body.sensors.lidar?.obstacles || [] }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "cd0500bc-3da5-4fa1-8358-de26db8d1cd7",
      "name": "Store Robot State",
      "type": "n8n-nodes-base.dataTable",
      "position": [
        688,
        304
      ],
      "parameters": {
        "columns": {
          "value": {
            "status": "={{ $json.status }}",
            "robotId": "={{ $json.robotId }}",
            "lastSeen": "={{ $json.timestamp }}",
            "positionX": "={{ $json.position.x }}",
            "positionY": "={{ $json.position.y }}",
            "positionZ": "={{ $json.position.z }}",
            "robotType": "={{ $json.robotType }}",
            "sensorData": "={{ JSON.stringify($json.sensors) }}",
            "currentTask": "={{ $json.currentTask }}",
            "batteryLevel": "={{ $json.batteryLevel }}"
          },
          "mappingMode": "defineBelow"
        },
        "filters": {
          "conditions": [
            {
              "keyName": "robotId",
              "keyValue": "={{ $json.robotId }}"
            }
          ]
        },
        "options": {},
        "matchType": "allConditions",
        "operation": "upsert",
        "dataTableId": {
          "__rl": true,
          "mode": "list",
          "value": ""
        }
      },
      "typeVersion": 1.1
    },
    {
      "id": "ddf14e08-182e-40ce-a954-4b9aa7e6d368",
      "name": "Check Critical Conditions",
      "type": "n8n-nodes-base.if",
      "position": [
        688,
        592
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 1,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "or",
          "conditions": [
            {
              "operator": {
                "type": "number",
                "operation": "lt"
              },
              "leftValue": "={{ $json.batteryLevel }}",
              "rightValue": 20
            },
            {
              "operator": {
                "type": "number",
                "operation": "gt"
              },
              "leftValue": "={{ $json.obstacles.length }}",
              "rightValue": 0
            },
            {
              "operator": {
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.status }}",
              "rightValue": "error"
            }
          ]
        }
      },
      "typeVersion": 2.3
    },
    {
      "id": "4557b7ec-f9cf-4484-8146-e9cb2fc2cf55",
      "name": "Prepare AI Context",
      "type": "n8n-nodes-base.set",
      "position": [
        1040,
        512
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "1",
              "name": "alertType",
              "type": "string",
              "value": "={{ $json.batteryLevel < 20 ? \"low_battery\" : ($json.obstacles.length > 0 ? \"obstacle_detected\" : \"error_state\") }}"
            },
            {
              "id": "2",
              "name": "robotId",
              "type": "string",
              "value": "={{ $json.robotId }}"
            },
            {
              "id": "3",
              "name": "severity",
              "type": "string",
              "value": "={{ $json.status === \"error\" ? \"critical\" : \"warning\" }}"
            },
            {
              "id": "4",
              "name": "contextData",
              "type": "object",
              "value": "={{ $json }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "919b95d4-5875-497d-9f87-a3c16f8030ee",
      "name": "Log Normal Operation",
      "type": "n8n-nodes-base.set",
      "position": [
        1136,
        688
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "1",
              "name": "status",
              "type": "string",
              "value": "normal"
            },
            {
              "id": "2",
              "name": "robotId",
              "type": "string",
              "value": "={{ $json.robotId }}"
            },
            {
              "id": "3",
              "name": "message",
              "type": "string",
              "value": "={{ \"Robot \" + $json.robotId + \" operating normally\" }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "3ae3a3c0-f0dd-49b6-b067-9f7d691bb998",
      "name": "Mission Command API",
      "type": "n8n-nodes-base.webhook",
      "position": [
        240,
        1008
      ],
      "parameters": {
        "path": "swarm/command",
        "options": {},
        "httpMethod": "POST",
        "responseMode": "lastNode"
      },
      "typeVersion": 2.1
    },
    {
      "id": "278c1202-c898-4e3f-bdf3-fac92ac2e672",
      "name": "Parse Command Input",
      "type": "n8n-nodes-base.set",
      "position": [
        464,
        1008
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "1",
              "name": "command",
              "type": "string",
              "value": "={{ $json.body.command }}"
            },
            {
              "id": "2",
              "name": "missionId",
              "type": "string",
              "value": "={{ $json.body.missionId }}"
            },
            {
              "id": "3",
              "name": "targetZone",
              "type": "object",
              "value": "={{ $json.body.targetZone }}"
            },
            {
              "id": "4",
              "name": "formation",
              "type": "string",
              "value": "={{ $json.body.formation }}"
            },
            {
              "id": "5",
              "name": "robots",
              "type": "array",
              "value": "={{ $json.body.robots }}"
            },
            {
              "id": "6",
              "name": "priority",
              "type": "string",
              "value": "={{ $json.body.priority }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "3b7747dd-3def-4810-bd14-66e6e07566ee",
      "name": "Execute Mission Command",
      "type": "n8n-nodes-base.set",
      "position": [
        688,
        1008
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "1",
              "name": "missionId",
              "type": "string",
              "value": "={{ $json.missionId }}"
            },
            {
              "id": "2",
              "name": "status",
              "type": "string",
              "value": "executing"
            },
            {
              "id": "3",
              "name": "assignedRobots",
              "type": "array",
              "value": "={{ $json.robots }}"
            },
            {
              "id": "4",
              "name": "formationType",
              "type": "string",
              "value": "={{ $json.formation }}"
            },
            {
              "id": "5",
              "name": "targetLocation",
              "type": "object",
              "value": "={{ $json.targetZone }}"
            },
            {
              "id": "6",
              "name": "timestamp",
              "type": "string",
              "value": "={{ $now.toISO() }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "292f862c-836b-434d-bc4c-f15e93b2ef5e",
      "name": "Store Mission Log",
      "type": "n8n-nodes-base.dataTable",
      "position": [
        912,
        1104
      ],
      "parameters": {
        "columns": {
          "value": {
            "status": "={{ $json.status }}",
            "missionId": "={{ $json.missionId }}",
            "timestamp": "={{ $json.timestamp }}",
            "formationType": "={{ $json.formationType }}",
            "assignedRobots": "={{ JSON.stringify($json.assignedRobots) }}",
            "targetLocation": "={{ JSON.stringify($json.targetLocation) }}"
          },
          "mappingMode": "defineBelow"
        },
        "filters": {
          "conditions": [
            {
              "keyName": "missionId",
              "keyValue": "={{ $json.missionId }}"
            }
          ]
        },
        "options": {},
        "matchType": "allConditions",
        "operation": "upsert",
        "dataTableId": {
          "__rl": true,
          "mode": "list",
          "value": ""
        }
      },
      "typeVersion": 1.1
    },
    {
      "id": "eba2364a-4ad8-4e91-8874-5c7ad3c60ef7",
      "name": "Periodic Swarm Optimization",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        240,
        1432
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "seconds"
            }
          ]
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "656f2984-d6b6-41bc-81c2-424cbfcd6134",
      "name": "Get All Robot States",
      "type": "n8n-nodes-base.dataTable",
      "position": [
        464,
        1432
      ],
      "parameters": {
        "orderBy": true,
        "operation": "get",
        "returnAll": true,
        "dataTableId": {
          "__rl": true,
          "mode": "list",
          "value": ""
        },
        "orderByColumn": "lastSeen"
      },
      "typeVersion": 1.1,
      "alwaysOutputData": true
    },
    {
      "id": "c8995f72-d6b6-4587-a6bb-cec349be3139",
      "name": "Swarm AI Coordinator",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        872,
        1432
      ],
      "parameters": {
        "text": "={{ \"You are an advanced swarm robotics coordinator managing a fleet of autonomous robots. Current swarm state: \" + JSON.stringify($json) + \". Analyze the robot states, optimize task allocation, coordinate navigation paths, maintain formation control, and ensure mission efficiency. Consider battery levels, obstacle avoidance, robot capabilities (aerial, ground, mobile), and real-time environmental conditions. Provide actionable coordination commands.\" }}",
        "options": {
          "maxIterations": 15,
          "systemMessage": "You are a distributed multi-modal embodied AI system coordinating autonomous robot swarms. Your responsibilities:\n\n1. TASK ALLOCATION: Assign tasks based on robot type, battery, position, and workload using the Task Allocation Tool\n2. PATH PLANNING: Calculate collision-free paths considering obstacles and other robots using the Path Planning Tool\n3. FORMATION CONTROL: Maintain swarm formations (grid, line, adaptive) using the Formation Control Tool\n4. RESOURCE OPTIMIZATION: Balance battery usage, minimize travel distance, maximize mission coverage\n5. FAULT RECOVERY: Detect failures, reassign tasks, coordinate rescue operations\n6. SAFETY: Ensure human safety, infrastructure protection, collision avoidance\n\nAlways use the connected tools to analyze swarm state and generate coordination commands. Respond with specific, executable instructions.",
          "returnIntermediateSteps": true
        },
        "promptType": "define"
      },
      "typeVersion": 3.1
    },
    {
      "id": "4797299f-c14f-4fd4-9f19-c9adf6851de7",
      "name": "OpenAI GPT-5",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        560,
        1664
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-5-mini"
        },
        "options": {
          "maxTokens": 2000,
          "temperature": 0.3
        },
        "builtInTools": {}
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "a5ac6f48-0778-477b-b85c-6b2881b07baf",
      "name": "Swarm Coordination Memory",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        768,
        1664
      ],
      "parameters": {
        "sessionKey": "swarm_coordination",
        "sessionIdType": "customKey",
        "contextWindowLength": 10
      },
      "typeVersion": 1.3
    },
    {
      "id": "8ab5d29e-4669-42a3-857f-ed132c94d8a2",
      "name": "Task Allocation Tool",
      "type": "@n8n/n8n-nodes-langchain.toolCode",
      "position": [
        976,
        1664
      ],
      "parameters": {
        "jsCode": "\nconst robots = $input.all();\nconst query = $input.item.json.query;\n\nconst allocation = robots.map(robot => ({\n  robotId: robot.json.robotId,\n  robotType: robot.json.robotType,\n  batteryLevel: robot.json.batteryLevel,\n  status: robot.json.status,\n  recommendedTask: robot.json.batteryLevel > 30 ? 'patrol' : 'return_to_base',\n  priority: robot.json.batteryLevel < 20 ? 'critical' : 'normal'\n}));\n\nreturn JSON.stringify({ allocation, totalRobots: robots.length });\n",
        "description": "Allocates tasks to robots based on their capabilities, position, battery level, and current workload. Returns optimal task assignments."
      },
      "typeVersion": 1.3
    },
    {
      "id": "9d8c196f-ae24-4b8b-9f22-c23a1ffd4f98",
      "name": "Path Planning Tool",
      "type": "@n8n/n8n-nodes-langchain.toolCode",
      "position": [
        1136,
        1664
      ],
      "parameters": {
        "jsCode": "\nconst robots = $input.all();\nconst query = $input.item.json.query;\n\nconst paths = robots.map(robot => {\n  const obstacles = JSON.parse(robot.json.sensorData || '{}').lidar?.obstacles || [];\n  return {\n    robotId: robot.json.robotId,\n    currentPosition: { x: robot.json.positionX, y: robot.json.positionY, z: robot.json.positionZ },\n    obstacleCount: obstacles.length,\n    pathStatus: obstacles.length > 0 ? 'reroute_required' : 'clear',\n    suggestedWaypoints: obstacles.length > 0 ? [{ x: robot.json.positionX + 5, y: robot.json.positionY + 5 }] : []\n  };\n});\n\nreturn JSON.stringify({ paths, timestamp: new Date().toISOString() });\n",
        "description": "Calculates optimal collision-free paths for robots considering obstacles, other robot positions, and mission objectives. Returns navigation waypoints."
      },
      "typeVersion": 1.3
    },
    {
      "id": "d2344e5b-6832-4aa9-893a-9ae8d8108861",
      "name": "Formation Control Tool",
      "type": "@n8n/n8n-nodes-langchain.toolCode",
      "position": [
        1296,
        1664
      ],
      "parameters": {
        "jsCode": "\nconst robots = $input.all();\nconst query = $input.item.json.query;\n\nconst activeRobots = robots.filter(r => r.json.status === 'active');\nconst formationType = query.includes('grid') ? 'grid' : 'adaptive';\n\nconst formation = activeRobots.map((robot, index) => ({\n  robotId: robot.json.robotId,\n  formationPosition: index,\n  targetOffset: { x: (index % 3) * 10, y: Math.floor(index / 3) * 10 },\n  formationType: formationType\n}));\n\nreturn JSON.stringify({ formation, activeCount: activeRobots.length, pattern: formationType });\n",
        "description": "Manages swarm formation patterns (grid, line, circle, adaptive) and maintains relative positioning between robots. Returns formation commands."
      },
      "typeVersion": 1.3
    },
    {
      "id": "6e780b00-4a3c-4b21-8584-445a78331aa1",
      "name": "Format Coordination Output",
      "type": "n8n-nodes-base.set",
      "position": [
        1584,
        1440
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "1",
              "name": "coordinationResult",
              "type": "string",
              "value": "={{ $json.output }}"
            },
            {
              "id": "2",
              "name": "timestamp",
              "type": "string",
              "value": "={{ $now.toISO() }}"
            },
            {
              "id": "3",
              "name": "swarmStatus",
              "type": "string",
              "value": "optimized"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "b2760cea-76c0-4a20-b0b6-81c1e8190c64",
      "name": "Robot Sensor Data Stream",
      "type": "n8n-nodes-base.webhook",
      "position": [
        240,
        496
      ],
      "parameters": {
        "path": "swarm/sensor-data",
        "options": {},
        "httpMethod": "POST"
      },
      "typeVersion": 2.1
    },
    {
      "id": "a444a148-278e-42a3-bd17-78b3b2b4f7c0",
      "name": "Publish Mission to Swarm",
      "type": "n8n-nodes-base.slack",
      "position": [
        1136,
        912
      ],
      "parameters": {
        "text": "={{ \"\ud83c\udfaf New Mission Command\\nMission ID: \" + $json.missionId + \"\\nStatus: \" + $json.status + \"\\nFormation: \" + $json.formationType + \"\\nRobots: \" + JSON.stringify($json.assignedRobots) + \"\\nTarget: \" + JSON.stringify($json.targetLocation) + \"\\nTimestamp: \" + $json.timestamp }}",
        "select": "channel",
        "channelId": {
          "__rl": true,
          "mode": "list",
          "value": ""
        },
        "otherOptions": {},
        "authentication": "oAuth2"
      },
      "credentials": {
        "slackOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.4
    },
    {
      "id": "244626a6-a49f-4bd4-866d-c70e03676f54",
      "name": "Publish Coordination Updates",
      "type": "n8n-nodes-base.slack",
      "position": [
        1904,
        1440
      ],
      "parameters": {
        "text": "={{ \"\ud83e\udde0 AI Coordination Update\\n\" + $json.coordinationResult + \"\\n\\nTimestamp: \" + $json.timestamp + \"\\nSwarm Status: \" + $json.swarmStatus }}",
        "select": "channel",
        "channelId": {
          "__rl": true,
          "mode": "list",
          "value": ""
        },
        "otherOptions": {},
        "authentication": "oAuth2"
      },
      "credentials": {
        "slackOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.4
    },
    {
      "id": "99782cf8-69c2-485b-8967-dca76ee9dac0",
      "name": "Publish to Swarm Channel",
      "type": "n8n-nodes-base.slack",
      "position": [
        1168,
        304
      ],
      "parameters": {
        "text": "={{ \"\ud83e\udd16 Sensor Update - Robot \" + $json.robotId + \"\\nType: \" + $json.robotType + \"\\nStatus: \" + $json.status + \"\\nBattery: \" + $json.batteryLevel + \"%\\nPosition: (\" + $json.position.x + \", \" + $json.position.y + \", \" + $json.position.z + \")\\nTask: \" + $json.currentTask }}",
        "select": "channel",
        "channelId": {
          "__rl": true,
          "mode": "list",
          "value": ""
        },
        "otherOptions": {},
        "authentication": "oAuth2"
      },
      "credentials": {
        "slackOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.4
    },
    {
      "id": "cd782889-ea7b-44d8-b9a6-a875243a308c",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2400,
        240
      ],
      "parameters": {
        "color": 6,
        "width": 560,
        "height": 496,
        "content": "## Prerequisites\n- Slack workspace with bot token\n- Database for robot state and mission logs\n- Robot sensor and command API endpoints\n## Use Cases\n- Warehouse AMR fleet coordination and anomaly alerting\n- Autonomous drone swarm path and formation management\n## Customization\n- Replace Slack with Teams or Discord for coordination broadcasts\n- Swap OpenAI for a local LLM in the Coordinator agent\n- Add more tools (e.g., Collision Avoidance, Battery Management)\n- Extend mission log to Google Sheets for reporting\n## Benefits\n- Three concurrent pipelines eliminate monitoring blind spots\n- AI agent autonomously optimizes swarm without human intervention\n- Slack integration provides instant cross-team situational awareness"
      },
      "typeVersion": 1
    },
    {
      "id": "04edb4ca-f4a6-4075-bcc7-1c72db947bb1",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1952,
        240
      ],
      "parameters": {
        "width": 432,
        "height": 336,
        "content": "## Setup Steps\n1. Add OpenAI credentials to the Swarm AI Coordinator and OpenAI GPT-5 model nodes.\n2. Configure Slack credentials; set the target channel in all three Slack publish nodes.\n3. Connect a database (e.g., Postgres or Airtable) to Store Robot State and Store Mission Log nodes.\n4. Set the Periodic Swarm Optimization schedule interval to match your fleet's update frequency.\n5. Configure webhook URLs for Robot Sensor Data Stream and Mission Command API triggers.\n6. Wire Swarm Coordination Memory to your preferred memory backend (e.g., Redis or n8n memory)."
      },
      "typeVersion": 1
    },
    {
      "id": "7d73b2f6-2a2a-4d24-82f7-442430ef0088",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1408,
        240
      ],
      "parameters": {
        "width": 512,
        "height": 336,
        "content": "## How It Works\nThis workflow automates multi-robot swarm coordination for robotics engineers, autonomous systems researchers, and industrial automation teams managing fleets of robots in real time. It solves the problem of decentralized robot supervision, eliminating manual monitoring by continuously ingesting sensor streams, detecting critical conditions, executing mission commands, and running periodic AI-driven optimization across the entire swarm. Three parallel pipelines operate concurrently: a sensor ingestion pipeline that stores robot states and triggers Slack alerts on critical conditions; a mission command pipeline that parses and executes commands while logging outcomes; and a periodic optimization pipeline where a Swarm AI Coordinator agent, backed by OpenAI GPT, Swarm Coordination Memory, Task Allocation, Path Planning, and Formation Control tools, computes and publishes coordination updates to Slack."
      },
      "typeVersion": 1
    },
    {
      "id": "430fb982-da3a-4cd3-a823-f66a34c0314d",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        112,
        1328
      ],
      "parameters": {
        "color": 7,
        "width": 1328,
        "height": 512,
        "content": "## Periodic Swarm Optimization\n**What** \u2014 A scheduled trigger fetches all robot states and passes them to the Swarm AI Coordinator agent.\n**Why** \u2014 Enables autonomous, data-driven reallocation of tasks, paths, and formations."
      },
      "typeVersion": 1
    },
    {
      "id": "68c45a0c-76bb-4df3-ad6f-982a9328bab7",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        128,
        864
      ],
      "parameters": {
        "color": 7,
        "width": 1232,
        "height": 432,
        "content": "\n## Mission Command Execution\n**What** \u2014 Mission Command API input is parsed, executed, and logged to a mission log store.\n**Why** \u2014 Maintains auditable command history and confirms execution."
      },
      "typeVersion": 1
    },
    {
      "id": "6344997b-ec6a-438e-9907-d69e4a3023cb",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        112,
        224
      ],
      "parameters": {
        "color": 7,
        "width": 1280,
        "height": 624,
        "content": "## Sensor Ingestion & Alerting\n**What** \u2014 Robot Sensor Data Stream feeds Parse Sensor Data, stores robot state, checks critical conditions, and publishes alerts to Slack.\n**Why** \u2014 Ensures real-time visibility and immediate escalation on anomalies."
      },
      "typeVersion": 1
    },
    {
      "id": "e2f17025-379c-4f61-b05d-3c79df07ef70",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1472,
        1328
      ],
      "parameters": {
        "color": 7,
        "width": 768,
        "height": 352,
        "content": "## Coordination Output & Broadcast\n**What** \u2014 Agent output is formatted and published to Slack's swarm channel.\n**Why** \u2014 Keeps all stakeholders synchronized with the latest swarm decisions."
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "binaryMode": "separate",
    "executionOrder": "v1"
  },
  "versionId": "3db37883-d432-4dc0-9c97-d93e4f7806ea",
  "connections": {
    "OpenAI GPT-5": {
      "ai_languageModel": [
        [
          {
            "node": "Swarm AI Coordinator",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Parse Sensor Data": {
      "main": [
        [
          {
            "node": "Store Robot State",
            "type": "main",
            "index": 0
          },
          {
            "node": "Check Critical Conditions",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Store Robot State": {
      "main": [
        [
          {
            "node": "Publish to Swarm Channel",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Path Planning Tool": {
      "ai_tool": [
        [
          {
            "node": "Swarm AI Coordinator",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Mission Command API": {
      "main": [
        [
          {
            "node": "Parse Command Input",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parse Command Input": {
      "main": [
        [
          {
            "node": "Execute Mission Command",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get All Robot States": {
      "main": [
        [
          {
            "node": "Swarm AI Coordinator",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Swarm AI Coordinator": {
      "main": [
        [
          {
            "node": "Format Coordination Output",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Task Allocation Tool": {
      "ai_tool": [
        [
          {
            "node": "Swarm AI Coordinator",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Formation Control Tool": {
      "ai_tool": [
        [
          {
            "node": "Swarm AI Coordinator",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Execute Mission Command": {
      "main": [
        [
          {
            "node": "Store Mission Log",
            "type": "main",
            "index": 0
          },
          {
            "node": "Publish Mission to Swarm",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Robot Sensor Data Stream": {
      "main": [
        [
          {
            "node": "Parse Sensor Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Critical Conditions": {
      "main": [
        [
          {
            "node": "Prepare AI Context",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Log Normal Operation",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Swarm Coordination Memory": {
      "ai_memory": [
        [
          {
            "node": "Swarm AI Coordinator",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Format Coordination Output": {
      "main": [
        [
          {
            "node": "Publish Coordination Updates",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Periodic Swarm Optimization": {
      "main": [
        [
          {
            "node": "Get All Robot States",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}