8
n8n 中文网amn8n.com

AI Arena - AI 代理辩论以优化答案并模拟场景

高级

这是一个Engineering, AI Chatbot领域的自动化工作流,包含 38 个节点。主要使用 If, Set, Wait, SplitOut, Aggregate 等节点。 使用 Mistral 模拟 AI 代理间辩论以优化答案

前置要求
  • 无特殊前置要求,导入即可使用
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "id": "8pG71svvcOTxFAYE",
  "meta": {
    "instanceId": "c8661626eeda758e004fa6cdc30e89de83810c1ff0923b0bb91a200abd0100f3"
  },
  "name": "AI Arena - AI 代理辩论以优化答案并模拟场景",
  "tags": [
    {
      "id": "JK3I68rY6cIlUP5Z",
      "name": "V1.0",
      "createdAt": "2025-06-20T18:01:10.400Z",
      "updatedAt": "2025-06-20T18:01:10.400Z"
    },
    {
      "id": "nEQ2nHALSQN4jgJ0",
      "name": "Free",
      "createdAt": "2025-06-25T21:55:38.353Z",
      "updatedAt": "2025-06-25T21:55:38.353Z"
    },
    {
      "id": "wiTbp7sIKjdAXKvb",
      "name": "Debate Arena",
      "createdAt": "2025-07-02T20:44:15.975Z",
      "updatedAt": "2025-07-02T20:44:15.975Z"
    }
  ],
  "nodes": [
    {
      "id": "f635cc89-01b3-4604-a408-69d10bb5991f",
      "name": "便签12",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -380,
        -440
      ],
      "parameters": {
        "color": 7,
        "width": 840,
        "height": 500,
        "content": "## AI Arena - AI 代理辩论以优化答案并模拟多样化场景"
      },
      "typeVersion": 1
    },
    {
      "id": "dc779b72-393c-4096-829c-44c19cdf2f4c",
      "name": "调度",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -280,
        220
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "weeks",
              "triggerAtDay": [
                1,
                2,
                5,
                3,
                4
              ],
              "triggerAtHour": 12
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "efd7bcee-56ea-451e-a382-30c22bf503f3",
      "name": "便签13",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -380,
        80
      ],
      "parameters": {
        "color": 4,
        "width": 840,
        "height": 1400,
        "content": "## 设置和启动"
      },
      "typeVersion": 1
    },
    {
      "id": "831cdbef-2e59-4845-9249-01c51fa46aa7",
      "name": "便签14",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -360,
        760
      ],
      "parameters": {
        "color": 7,
        "width": 800,
        "height": 260,
        "content": "**配置工作流参数**:"
      },
      "typeVersion": 1
    },
    {
      "id": "c1e7430e-0d6d-44cb-b969-59f6f2bbf450",
      "name": "配置工作流参数",
      "type": "n8n-nodes-globals.globalConstants",
      "notes": "This is useful to quickly setting variables for new workflow variants. Additionally:\n- It helps avoid leaving important information in a node when creating new templates to share.\n- Easier to add new variables.",
      "position": [
        0,
        340
      ],
      "parameters": {},
      "credentials": {
        "globalConstantsApi": {
          "id": "B5OoEPvPpE9Pyl7v",
          "name": "Debate Arena V1"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "80755a3e-6b2f-4443-8f68-6983aa5ac8ce",
      "name": "当点击\"执行工作流\"时",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -280,
        380
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "a533ff1e-540f-4fd8-82df-6b2a9813407d",
      "name": "电子邮件触发器 (IMAP)",
      "type": "n8n-nodes-base.emailReadImap",
      "disabled": true,
      "position": [
        -280,
        580
      ],
      "parameters": {
        "options": {
          "forceReconnect": 120,
          "customEmailConfig": "[\"UNSEEN\", [\"HEADER\", \"SUBJECT\", \"(Activate n8n Workflow)\"], [\"HEADER\", \"SUBJECT\", \"(Debate Arena)\"] , [\"HEADER\", \"SUBJECT\", \"(Password: FirstTest9999)\"]]"
        }
      },
      "credentials": {
        "imap": {
          "id": "CVKL2sXHLVi7NNZs",
          "name": "Blank IMAP account"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "c8442d57-0097-42e2-8489-6cc0b2dcfdb3",
      "name": "Mistral Cloud 聊天模型",
      "type": "@n8n/n8n-nodes-langchain.lmChatMistralCloud",
      "position": [
        1620,
        740
      ],
      "parameters": {
        "model": "mistral-small-latest",
        "options": {
          "safeMode": true,
          "maxRetries": 2
        }
      },
      "credentials": {
        "mistralCloudApi": {
          "id": "i9fED0hhcQnPZBi6",
          "name": "Blank Account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "a50548f4-e2f9-49dc-b22e-a22f16e22035",
      "name": "简单记忆",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "disabled": true,
      "position": [
        1820,
        580
      ],
      "parameters": {},
      "typeVersion": 1.3
    },
    {
      "id": "efa6b40b-babb-47db-8234-df435d161cf0",
      "name": "准备输入",
      "type": "n8n-nodes-base.set",
      "position": [
        300,
        340
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "0bebc801-88ee-48b6-9fdf-26124a3d2712",
              "name": "input",
              "type": "string",
              "value": "={{ $json.constants.input }}"
            },
            {
              "id": "97f5977a-6a32-4a19-a27a-c809d8b312b1",
              "name": "current_round",
              "type": "number",
              "value": 1
            },
            {
              "id": "6c928915-26b5-4429-91f3-371a35b19517",
              "name": "round_summary",
              "type": "string",
              "value": "The debate begins."
            },
            {
              "id": "493f044f-acf9-4e43-836e-6a3746356ff4",
              "name": "round_result",
              "type": "string",
              "value": "This is the first round. No last round result yet."
            }
          ]
        },
        "includeOtherFields": true
      },
      "typeVersion": 3.4
    },
    {
      "id": "9d6fc447-de96-46d3-9a23-51f8ec0b65a6",
      "name": "更新输入",
      "type": "n8n-nodes-base.set",
      "notes": "Update the input for the AI agents and the current round.",
      "position": [
        2900,
        740
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "607ac7e5-900e-4128-80f6-52d0ceb24164",
              "name": "input",
              "type": "string",
              "value": "={{ $json.output.data.rewritten_input }}"
            },
            {
              "id": "4cc6ddeb-44c3-4b41-8052-f5f65c584e11",
              "name": "current_round",
              "type": "number",
              "value": "={{ $('Guarantee Input').item.json.current_round + 1 }}"
            },
            {
              "id": "1c9d3a2b-6743-4bfd-a152-81fd22276dc4",
              "name": "round_summary",
              "type": "string",
              "value": "={{ $json.output.data.round_summary }}"
            },
            {
              "id": "095b4f5c-3ed0-446b-908e-ac4efde28af2",
              "name": "round_result",
              "type": "string",
              "value": "={{ $json.output.data.round_result }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "b0db51af-4858-4906-b706-0d76335d35f8",
      "name": "拆分出 AI 代理",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        1320,
        400
      ],
      "parameters": {
        "options": {},
        "fieldToSplitOut": "constants.ai_agents"
      },
      "typeVersion": 1
    },
    {
      "id": "9402704b-61db-4d16-9266-f42402953825",
      "name": "JSON输出解析器",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        1980,
        580
      ],
      "parameters": {
        "schemaType": "manual",
        "inputSchema": "{\n  \"type\": \"object\",\n  \"properties\": {\n    \"data\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"ai_name\": {\n          \"type\": \"string\",\n          \"description\": \"The name of the AI Agent.\"\n        },\n        \"ai_status\": {\n          \"type\": \"string\",\n          \"description\": \"The current state of the AI Agent. Can be their tone, their psyche, a hardware status, an emotional state or others related to the idea of status.\"\n        },\n        \"ai_targets\": {\n          \"type\": \"string\",\n          \"description\": \"Who are they debating. Can be just the input itself, other AI Agents in the debate, the current state of the inputs...can be one to more targets at once.\"\n        },\n        \"reply\": {\n          \"type\": \"string\",\n          \"description\": \"The AI agent reply to the text, considering their given attributes.\"\n        },\n        \"cause_for_reply\": {\n          \"type\": \"string\",\n          \"description\": \"The AI agent motivation for their reply to the text, considering their given attributes.\"\n        }\n      },\n      \"required\": [\"ai_name\", \"ai_status\", \"ai_targets\", \"reply\", \"cause_for_reply\"],\n      \"additionalProperties\": false\n  }\n  },\n  \"required\": [\"data\"],\n  \"additionalProperties\": false\n}"
      },
      "typeVersion": 1.2
    },
    {
      "id": "d8b9d045-1b2f-4fc4-9821-67c8a86b3a7b",
      "name": "如果没有更多轮次",
      "type": "n8n-nodes-base.if",
      "position": [
        3640,
        220
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "c6f6f0e2-51b3-4cda-b871-4d43984c1f1e",
              "operator": {
                "type": "number",
                "operation": "equals"
              },
              "leftValue": "={{ $('Guarantee Input').item.json.current_round }}",
              "rightValue": "={{ $('Configure Workflow Args').item.json.constants.rounds }}"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "dae712bb-b246-4a6c-8863-90784f7b38ef",
      "name": "辩论结束",
      "type": "n8n-nodes-base.noOp",
      "position": [
        4060,
        200
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "7724c844-5305-48fe-b819-855c707289e3",
      "name": "辩论循环",
      "type": "n8n-nodes-base.splitInBatches",
      "notes": "Will continue until all rounds are over.",
      "position": [
        2720,
        40
      ],
      "parameters": {
        "options": {
          "reset": true
        },
        "batchSize": "={{ $('Configure Workflow Args').item.json.constants.ai_quantity }}"
      },
      "typeVersion": 3
    },
    {
      "id": "328b1db7-5126-472f-b14b-49c6f4fda5d9",
      "name": "轮次循环",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        1100,
        220
      ],
      "parameters": {
        "options": {
          "reset": true
        },
        "batchSize": "=1"
      },
      "typeVersion": 3
    },
    {
      "id": "0f108078-e303-4da6-9e53-d4ed20314ac0",
      "name": "辩论参与者抽象",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "notes": "This node will receive the AI profiles and execute them as needed. To guarantee they can properly communicate with each other, all answers need to be structured as JSON outputs.",
      "maxTries": 2,
      "position": [
        1740,
        380
      ],
      "parameters": {
        "text": "=Considering your role, continue the following text.\n\"{{ $('Round Loop').item.json.input }}\"\n\nDebate Status = \"{{ $('Round Loop').item.json.round_summary }}\"\nLast Round = \"{{ $('Round Loop').item.json.round_result }}\"\n\nRemember to reply with a JSON output, as ordered!",
        "options": {
          "systemMessage": "=Your Name: {{ $json.name }}.\nYour Description: {{ $json.description }}\nYour Role: {{ $json.role }}.\nYour Nature: {{ $json.nature }}.\nYou follow a Will to {{ $json.will }} and your Reason is {{ $json.reason }},\nYou Like: {{ $json.likes }}.\nYou Dislike: {{ $json.dislikes }}.\nYour Writing Style: {{ $json.writing_style }}.\n\nThe Scenario: {{ $('Configure Workflow Args').item.json.constants.scenario }}\nYou received a text with your input and now it is your turn again to write your answer.\nAnd don't forget that output is always expected in the JSON format: {'output': {...}}"
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "retryOnFail": true,
      "typeVersion": 1.6,
      "waitBetweenTries": 3000
    },
    {
      "id": "83f497f7-85d1-4af9-b402-8a87fd143594",
      "name": "辩论环境",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "notes": "This node will receive the input of each AI Agent and create a \"round result' of the results from the turn debate.",
      "maxTries": 2,
      "position": [
        3220,
        -60
      ],
      "parameters": {
        "text": "=Input Text:\n{{ $('Guarantee Input').item.json.input }}\n\nDebate:\n{{ $json.data.map(item => `Name: ${item.output.data.ai_name}\\nStatus: ${item.output.data.ai_status}\\nReply: ${item.output.data.reply}\\nTargets: ${item.output.data.ai_targets}\\nExplanation: ${item.output.data.cause_for_reply}\\n`).join('\\n') }}",
        "options": {
          "systemMessage": "={{ $('Configure Workflow Args').item.json.constants.ai_environment.context }}\nInput Rewrite Goal: {{ $('Configure Workflow Args').item.json.constants.ai_environment.rewrite_goal }}\nAnd don't forget that output is always expected in the JSON format: {'output': {...}}"
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "retryOnFail": true,
      "typeVersion": 1.6,
      "waitBetweenTries": 3000
    },
    {
      "id": "2c309812-45ca-4c5b-b38e-bd54327601a1",
      "name": "保证输入",
      "type": "n8n-nodes-base.set",
      "position": [
        780,
        340
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "0ac8a4d1-15e0-4e32-84a4-66776d35eff9",
              "name": "input",
              "type": "string",
              "value": "={{ $json.input }}"
            },
            {
              "id": "b233413b-6d33-4acf-b5b4-3567723e9f17",
              "name": "current_round",
              "type": "number",
              "value": "={{ $json.current_round }}"
            },
            {
              "id": "428921be-b084-4ae2-89ce-12656e15fa26",
              "name": "constants",
              "type": "object",
              "value": "={{ $('Configure Workflow Args').item.json.constants }}"
            },
            {
              "id": "6f166343-f64a-4d1e-bd70-7d4784e5c4b4",
              "name": "round_summary",
              "type": "string",
              "value": "={{ $json.round_summary }}"
            },
            {
              "id": "306dcb55-340e-4869-b7f2-cc37e7878d3c",
              "name": "round_result",
              "type": "string",
              "value": "={{ $json.round_result }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "c4c6c0a7-11c6-43d0-b15c-7bd7d3ee46dc",
      "name": "Mistral Cloud Chat Model 2",
      "type": "@n8n/n8n-nodes-langchain.lmChatMistralCloud",
      "position": [
        3160,
        180
      ],
      "parameters": {
        "model": "mistral-small-latest",
        "options": {
          "safeMode": true,
          "maxRetries": 2
        }
      },
      "credentials": {
        "mistralCloudApi": {
          "id": "i9fED0hhcQnPZBi6",
          "name": "Blank Account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "870ea0fb-6d3f-457e-a684-6ab0fce5efe4",
      "name": "聚合",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        3000,
        40
      ],
      "parameters": {
        "options": {},
        "aggregate": "aggregateAllItemData"
      },
      "typeVersion": 1
    },
    {
      "id": "4a8ceb9d-364b-4fa5-b395-5d483ccec789",
      "name": "JSON输出解析器2",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        3420,
        180
      ],
      "parameters": {
        "schemaType": "manual",
        "inputSchema": "{\n  \"type\": \"object\",\n  \"properties\": {\n    \"data\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"round_result\": {\n\t\t\t\"type\": \"string\",\n            \"description\": \"The result of the round.\"\n          },\n          \"round_summary\": {\n\t\t\t\"type\": \"string\",\n            \"description\": \"The resume of the round, keeping the input from every agent while making the text as short as possible.\"\n          },\n          \"rewritten_input\": {\n\t\t\t\"type\": \"string\",\n            \"description\": \"A rewritten input, following the results of the round. Keep it as short as possible.\"\n          }\n        },\n        \"required\": [\"round_result\", \"round_summary\", \"optimized_input\"],\n        \"additionalProperties\": false\n      }\n  },\n  \"required\": [\"data\"],\n  \"additionalProperties\": false\n}"
      },
      "typeVersion": 1.2
    },
    {
      "id": "eb7f959c-dd9d-4fba-9f27-f96874dff696",
      "name": "Simple Memory 2",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "disabled": true,
      "position": [
        3280,
        220
      ],
      "parameters": {
        "sessionKey": "={{ $('Configure Workflow Args').item.json.constants.ai_environment.sessionId }}",
        "sessionIdType": "customKey"
      },
      "typeVersion": 1.3
    },
    {
      "id": "5c1a427f-2cff-4614-99e6-348c96771dc3",
      "name": "发送代理前等待",
      "type": "n8n-nodes-base.wait",
      "position": [
        1520,
        500
      ],
      "webhookId": "29b76d30-cf62-4ef3-a789-d37d356c4e5b",
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "cef6c55f-e736-40bf-8d48-793c614cea81",
      "name": "等待 1",
      "type": "n8n-nodes-base.wait",
      "position": [
        2220,
        300
      ],
      "webhookId": "29b76d30-cf62-4ef3-a789-d37d356c4e5b",
      "parameters": {
        "amount": 1
      },
      "typeVersion": 1.1
    },
    {
      "id": "3e624ac2-62f2-4956-84ab-f722b7fa3bd1",
      "name": "等待 2",
      "type": "n8n-nodes-base.wait",
      "position": [
        2480,
        180
      ],
      "webhookId": "29b76d30-cf62-4ef3-a789-d37d356c4e5b",
      "parameters": {
        "amount": 1
      },
      "typeVersion": 1.1
    },
    {
      "id": "98e03085-5db5-4d54-9b8b-2b99cbb6668f",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        500,
        -440
      ],
      "parameters": {
        "width": 3400,
        "height": 1520,
        "content": "# 辩论"
      },
      "typeVersion": 1
    },
    {
      "id": "bd3a89bf-277b-40ef-bf8c-b1c6f4417b02",
      "name": "便签1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2420,
        -320
      ],
      "parameters": {
        "color": 5,
        "width": 1440,
        "height": 840,
        "content": "## 轮次结果"
      },
      "typeVersion": 1
    },
    {
      "id": "4fdb8f1b-5942-421e-b8d4-f042a7a549b3",
      "name": "便签2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        760,
        -160
      ],
      "parameters": {
        "color": 5,
        "width": 1600,
        "height": 1040,
        "content": "## 轮次执行"
      },
      "typeVersion": 1
    },
    {
      "id": "a3397dbf-a181-4117-8b53-38b914c1523b",
      "name": "便签3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2420,
        540
      ],
      "parameters": {
        "color": 2,
        "width": 740,
        "height": 440,
        "content": "## 继续到下一轮"
      },
      "typeVersion": 1
    },
    {
      "id": "46ac77b9-f3d9-42cb-b9c3-ae0fdcadf065",
      "name": "便签4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        500,
        1120
      ],
      "parameters": {
        "color": 3,
        "width": 1200,
        "height": 1160,
        "content": "### 工作流参数示例 (JSON):"
      },
      "typeVersion": 1
    },
    {
      "id": "049b3320-a354-4519-a3ac-dfd6a051338e",
      "name": "便签5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3940,
        20
      ],
      "parameters": {
        "color": 6,
        "width": 400,
        "height": 380,
        "content": "## 辩论结果"
      },
      "typeVersion": 1
    },
    {
      "id": "55e3c75f-d9bc-4125-9722-8f76f73d6596",
      "name": "便签15",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -360,
        1100
      ],
      "parameters": {
        "color": 7,
        "width": 380,
        "height": 260,
        "content": "**AI 环境参数"
      },
      "typeVersion": 1
    },
    {
      "id": "9da715b0-018a-407f-b003-f42464ebd8c8",
      "name": "便签16",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        40,
        1040
      ],
      "parameters": {
        "color": 7,
        "width": 400,
        "height": 400,
        "content": "**AI 代理参数"
      },
      "typeVersion": 1
    },
    {
      "id": "7a01ecc0-20b6-46c3-921c-fc7891712f14",
      "name": "便签6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        300,
        -180
      ],
      "parameters": {
        "color": 7,
        "width": 150,
        "content": "![Hybroht](https://hybroht.com/assets/favicon.png \"Hybroht Logo\")"
      },
      "typeVersion": 1
    },
    {
      "id": "2b166bc1-0908-47ef-a405-ea57f977a4a7",
      "name": "便签7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1740,
        1120
      ],
      "parameters": {
        "color": 3,
        "width": 900,
        "height": 480,
        "content": "### 输入和输出示例"
      },
      "typeVersion": 1
    },
    {
      "id": "1ddb3887-fc5b-48ba-a3f8-e62613ff54f4",
      "name": "便签8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -380,
        1500
      ],
      "parameters": {
        "color": 7,
        "width": 840,
        "height": 280,
        "content": "### 信息 - n8n 设置"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "callerPolicy": "workflowsFromSameOwner",
    "executionOrder": "v1",
    "executionTimeout": 3600
  },
  "versionId": "7e28c213-f848-48d2-815a-3d423dc90772",
  "connections": {
    "Wait 1": {
      "main": [
        [
          {
            "node": "Wait 2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait 2": {
      "main": [
        [
          {
            "node": "Debate Loop",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule": {
      "main": [
        [
          {
            "node": "Configure Workflow Args",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate": {
      "main": [
        [
          {
            "node": "Debate Environment",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Round Loop": {
      "main": [
        [],
        [
          {
            "node": "Split Out AI Agents",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Debate Loop": {
      "main": [
        [],
        [
          {
            "node": "Aggregate",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update Input": {
      "main": [
        [
          {
            "node": "Guarantee Input",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare Input": {
      "main": [
        [
          {
            "node": "Guarantee Input",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Simple Memory": {
      "ai_memory": [
        [
          {
            "node": "Debate Actor Abstraction",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Guarantee Input": {
      "main": [
        [
          {
            "node": "Round Loop",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Simple Memory 2": {
      "ai_memory": [
        [
          {
            "node": "Debate Environment",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "If No More Rounds": {
      "main": [
        [
          {
            "node": "End of Debate",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Update Input",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Debate Environment": {
      "main": [
        [
          {
            "node": "If No More Rounds",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "JSON Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Debate Actor Abstraction",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Split Out AI Agents": {
      "main": [
        [
          {
            "node": "Wait Before Sending Agents",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Email Trigger (IMAP)": {
      "main": [
        [
          {
            "node": "Configure Workflow Args",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "JSON Output Parser 2": {
      "ai_outputParser": [
        [
          {
            "node": "Debate Environment",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Configure Workflow Args": {
      "main": [
        [
          {
            "node": "Prepare Input",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Debate Actor Abstraction": {
      "main": [
        [
          {
            "node": "Wait 1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Mistral Cloud Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Debate Actor Abstraction",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Mistral Cloud Chat Model 2": {
      "ai_languageModel": [
        [
          {
            "node": "Debate Environment",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Wait Before Sending Agents": {
      "main": [
        [
          {
            "node": "Debate Actor Abstraction",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking ‘Execute workflow’": {
      "main": [
        [
          {
            "node": "Configure Workflow Args",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。

这个工作流适合什么场景?

高级 - 工程, AI 聊天机器人

需要付费吗?

本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。

工作流信息
难度等级
高级
节点数量38
分类2
节点类型16
难度说明

适合高级用户,包含 16+ 个节点的复杂工作流

作者
Hybroht

Hybroht

@hybroht

Company dedicated to delivering tailored software solutions and data-driven experiences through effective technology. We develop workflows leveraging AI agents to maximize the productive benefits of artificial intelligence.

外部链接
在 n8n.io 查看

分享此工作流