{
  "name": "Dynamic AI model router for query optimization with OpenRouter",
  "nodes": [
    {
      "id": "25903a04-24d2-41f9-bf34-5d6234e642e5",
      "name": "When chat message received",
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "position": [
        -180,
        -180
      ]
    },
    {
      "id": "fabffdee-3c1e-47db-a4e9-f6473a6e9257",
      "name": "OpenRouter Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
      "position": [
        0,
        40
      ]
    },
    {
      "id": "c53fe672-92cb-4d88-b4f6-f413fb00ad6a",
      "name": "Structured Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        340,
        280
      ]
    },
    {
      "id": "d60a9d61-c611-4813-bf85-e8f8faaa21b6",
      "name": "OpenRouter Chat Model1",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
      "position": [
        420,
        40
      ]
    },
    {
      "id": "ef9ceacb-55e4-4795-aa18-976997ec3717",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -180,
        -420
      ],
      "parameters": {
        "width": 840,
        "height": 180,
        "content": "## Dynamic Model Selector for Optimal AI Responses\n\nThe **Agent Decisioner** is a dynamic, AI-powered routing system that automatically selects the most appropriate large language model (LLM) to respo"
      }
    },
    {
      "id": "4d688ad7-b463-4e72-9b79-4b9142f022d2",
      "name": "Routing Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        40,
        -180
      ]
    },
    {
      "id": "94c49c22-9697-4230-ba35-5159041cfdc7",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        400,
        -180
      ]
    },
    {
      "id": "54c4278e-c185-4ab4-b21e-d8e837b14818",
      "name": "Auto-fixing Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserAutofixing",
      "position": [
        140,
        60
      ]
    },
    {
      "id": "2813da6b-423b-41d6-8eb4-664f616ca8d5",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        140,
        220
      ]
    }
  ],
  "connections": {
    "Routing Agent": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Auto-fixing Output Parser",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "OpenRouter Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Routing Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "OpenRouter Chat Model1": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Auto-fixing Output Parser",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Auto-fixing Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Routing Agent",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "When chat message received": {
      "main": [
        [
          {
            "node": "Routing Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}