{
  "name": "Multi-AI agent router: compare OpenAI, Anthropic & Groq responses with webhooks",
  "nodes": [
    {
      "id": "21041871-2233-477d-b2d3-2c63919050b5",
      "name": "Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        -1008,
        -656
      ]
    },
    {
      "id": "80b943cb-94b6-45fa-8f97-a3fd2adb4c1c",
      "name": "Output Parser2",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        -992,
        -368
      ]
    },
    {
      "id": "b4ae807f-c736-4987-9cf9-32a75d90b3b1",
      "name": "Webhook",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -1808,
        -800
      ]
    },
    {
      "id": "4236a8f9-1acf-4031-a82b-502dd80831cd",
      "name": "Extract Input Parameters",
      "type": "n8n-nodes-base.set",
      "position": [
        -1648,
        -800
      ]
    },
    {
      "id": "5b6eeb1c-415c-462b-8d71-5c3b20989ed3",
      "name": "Dynamic LLM Router",
      "type": "n8n-nodes-base.code",
      "position": [
        -1456,
        -800
      ]
    },
    {
      "id": "c1042d78-0f4b-4dab-97f1-c080df3ab8bc",
      "name": "Route to Provider",
      "type": "n8n-nodes-base.switch",
      "position": [
        -1328,
        -688
      ]
    },
    {
      "id": "6c88c121-40c7-4313-8697-300dde7e5664",
      "name": "OpenAI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -1152,
        -1056
      ]
    },
    {
      "id": "278920ea-7712-4f58-9274-1b9869daa368",
      "name": "Anthropic Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -1152,
        -800
      ]
    },
    {
      "id": "09f9bc3c-184b-4865-ace9-b84518a15437",
      "name": "Groq Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -1136,
        -528
      ]
    },
    {
      "id": "5efa962a-2f6b-4834-8c0d-02452ff92233",
      "name": "Merge Results",
      "type": "n8n-nodes-base.merge",
      "position": [
        -784,
        -784
      ]
    },
    {
      "id": "340f1fbc-31e7-44af-9649-52ea7de91418",
      "name": "Calculate Performance Metrics",
      "type": "n8n-nodes-base.code",
      "position": [
        -624,
        -784
      ]
    },
    {
      "id": "9e130394-0a3c-42de-a702-1b010e15ff8c",
      "name": "Respond to Webhook",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        -448,
        -784
      ]
    },
    {
      "id": "092da29d-efe6-4408-be28-c4360e94c8d3",
      "name": "OpenAI Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -1168,
        -912
      ]
    },
    {
      "id": "9b471188-3126-4bd3-a61f-d0498f00ea3c",
      "name": "Output Parser1",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        -1008,
        -912
      ]
    },
    {
      "id": "58b782f0-871d-450a-92a5-a8e27163a652",
      "name": "Groq Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatGroq",
      "position": [
        -1136,
        -368
      ]
    },
    {
      "id": "202e4932-082a-4dd2-b3de-c6859d622055",
      "name": "Anthropic Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatAnthropic",
      "position": [
        -1152,
        -656
      ]
    },
    {
      "id": "16f3a535-b740-418c-8090-b5b9fcdde583",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2352,
        -1104
      ],
      "parameters": {
        "width": 512,
        "height": 576,
        "content": "## Introduction\nThis workflow connects to OpenAI, Anthropic, and Groq, processing requests in parallel with automatic performance \nmetrics. Ideal for testing speed, cost, and quality across models.\n##"
      }
    },
    {
      "id": "6bebceb0-7370-469d-8c94-9d54d0d33ceb",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1808,
        -640
      ],
      "parameters": {
        "width": 400,
        "height": 464,
        "content": "## Setup Instructions\n1. Activate Webhook with authentication.\n2. Add API keys for all providers.\n3. Define models, tokens, and temperature.\n4. Adjust Router logic for selection.\n5. Tune Metrics scori"
      }
    }
  ],
  "connections": {
    "Webhook": {
      "main": [
        [
          {
            "node": "Extract Input Parameters",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Groq Agent": {
      "main": [
        [
          {
            "node": "Merge Results",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Groq Model": {
      "ai_languageModel": [
        [
          {
            "node": "Groq Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Agent": {
      "main": [
        [
          {
            "node": "Merge Results",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "OpenAI Model": {
      "ai_languageModel": [
        [
          {
            "node": "OpenAI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Merge Results": {
      "main": [
        [
          {
            "node": "Calculate Performance Metrics",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Anthropic Agent",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Output Parser1": {
      "ai_outputParser": [
        [
          {
            "node": "OpenAI Agent",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Output Parser2": {
      "ai_outputParser": [
        [
          {
            "node": "Groq Agent",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Anthropic Agent": {
      "main": [
        [
          {
            "node": "Merge Results",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Anthropic Model": {
      "ai_languageModel": [
        [
          {
            "node": "Anthropic Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Route to Provider": {
      "main": [
        [
          {
            "node": "OpenAI Agent",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Anthropic Agent",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Groq Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Dynamic LLM Router": {
      "main": [
        [
          {
            "node": "Route to Provider",
            "type": "main",
            "index": 0
          },
          {
            "node": "Merge Results",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Input Parameters": {
      "main": [
        [
          {
            "node": "Dynamic LLM Router",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Calculate Performance Metrics": {
      "main": [
        [
          {
            "node": "Respond to Webhook",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}