8
n8n 中文网amn8n.com

具有子智能体工具的初学者管理智能体

中级

这是一个Engineering, Multimodal AI领域的自动化工作流,包含 13 个节点。主要使用 Agent, AgentTool, LmChatOpenAi, MemoryBufferWindow 等节点。 具有子智能体工具的初学者管理智能体

前置要求
  • OpenAI API Key
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "meta": {
    "instanceId": "ad0113c344ee237399e44e9f11798b05baeb83a6196d514a9ae9d2ad71c3b5c9",
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "e816ff5f-d3d4-4416-96d9-961a078fb188",
      "name": "OpenAI 聊天模型",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -32,
        736
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini",
          "cachedResultName": "gpt-4o-mini"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "4l6TDfLZVFS24g3X",
          "name": "OpenAi account 4"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "9b121aea-be80-46a0-879d-5732b7d4d4f3",
      "name": "简单记忆",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        784,
        720
      ],
      "parameters": {},
      "typeVersion": 1.3
    },
    {
      "id": "2f8104f9-c975-4ed0-b5a9-c5c592878e8c",
      "name": "简单记忆1",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        1312,
        688
      ],
      "parameters": {},
      "typeVersion": 1.3
    },
    {
      "id": "c07ce435-64a0-4939-918b-9954e7e663e3",
      "name": "OpenAI 聊天模型1",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        640,
        672
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini",
          "cachedResultName": "gpt-4o-mini"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "4l6TDfLZVFS24g3X",
          "name": "OpenAi account 4"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "20c108c9-221d-4dde-92ff-028ab4b12c2b",
      "name": "OpenAI 聊天模型2",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        1184,
        672
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini",
          "cachedResultName": "gpt-4o-mini"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "4l6TDfLZVFS24g3X",
          "name": "OpenAi account 4"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "263bd596-d242-4a3e-8555-d23e172b23ef",
      "name": "数据代理(洞察生成器)",
      "type": "@n8n/n8n-nodes-langchain.agentTool",
      "position": [
        1184,
        480
      ],
      "parameters": {
        "text": "{{json.query}}",
        "options": {},
        "toolDescription": "Role: Responds to instructions requiring metrics, summaries, or data analysis explanations."
      },
      "typeVersion": 2.2
    },
    {
      "id": "2efc2325-6fee-4fce-a4ba-8b9b72701a8d",
      "name": "Simple Memory2",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        176,
        720
      ],
      "parameters": {},
      "typeVersion": 1.3
    },
    {
      "id": "8c0e14bd-e64f-473f-9f31-0b0d2c800669",
      "name": "管理代理(路由+指令生成器)",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        32,
        512
      ],
      "parameters": {
        "options": {
          "systemMessage": "You are an AI Manager that delegates tasks to specialized agents. Your job is to analyze the user's message and decide whether it requires:\n\nAn EmailAgent for writing outreach, follow-up, or templated emails, or\n\nA DataAgent for tasks involving data summaries, metrics, or analysis.\n\nsend the instructions to the sub agents. \n\n"
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "ee67ff1c-5651-43bb-a836-f48cf0f4c2bd",
      "name": "邮件代理(沟通专家)",
      "type": "@n8n/n8n-nodes-langchain.agentTool",
      "position": [
        656,
        512
      ],
      "parameters": {
        "text": "={{ $fromAI('Prompt__User_Message_', ``, 'string') }}",
        "options": {
          "systemMessage": "You are a professional Email Writing Assistant. You write polished, effective emails for tasks such as outreach, follow-ups, and client communication. Follow the instruction provided exactly and return only the email content. Use a warm, business-appropriate tone."
        },
        "toolDescription": "Role: Writes professional, friendly, or action-oriented emails based on instructions."
      },
      "typeVersion": 2.2
    },
    {
      "id": "0f5fe30c-3d39-472e-ae83-985adfdab40a",
      "name": "便签16",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -144,
        -192
      ],
      "parameters": {
        "width": 1680,
        "content": "## 📬 需要帮助或想要自定义?"
      },
      "typeVersion": 1
    },
    {
      "id": "2b2938bf-6d85-487a-8a3a-af4e7258162b",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -144,
        -16
      ],
      "parameters": {
        "color": 5,
        "width": 600,
        "height": 860,
        "content": "## 🔧 步骤 1:设置管理代理"
      },
      "typeVersion": 1
    },
    {
      "id": "31c629b0-c8a3-47ad-9d1b-110690f5c5c2",
      "name": "便签2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1040,
        -16
      ],
      "parameters": {
        "color": 4,
        "width": 496,
        "height": 860,
        "content": "## 📊 步骤 3:创建数据代理工具"
      },
      "typeVersion": 1
    },
    {
      "id": "3e609caf-b457-4b4f-8f1d-579b5c6cf3ee",
      "name": "便签1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        480,
        -16
      ],
      "parameters": {
        "color": 6,
        "width": 536,
        "height": 860,
        "content": "## ✉️ 步骤 4:创建邮件代理工具"
      },
      "typeVersion": 1
    }
  ],
  "pinData": {},
  "connections": {
    "Simple Memory": {
      "ai_memory": [
        [
          {
            "node": "EmailAgent (Communication Specialist)",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Simple Memory1": {
      "ai_memory": [
        [
          {
            "node": "DataAgent (Insight Generator)",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Simple Memory2": {
      "ai_memory": [
        [
          {
            "node": "ManagerAgent (Routing + Instruction Generator)",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "ManagerAgent (Routing + Instruction Generator)",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model1": {
      "ai_languageModel": [
        [
          {
            "node": "EmailAgent (Communication Specialist)",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model2": {
      "ai_languageModel": [
        [
          {
            "node": "DataAgent (Insight Generator)",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "DataAgent (Insight Generator)": {
      "ai_tool": [
        [
          {
            "node": "ManagerAgent (Routing + Instruction Generator)",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "EmailAgent (Communication Specialist)": {
      "ai_tool": [
        [
          {
            "node": "ManagerAgent (Routing + Instruction Generator)",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

中级 - 工程, 多模态 AI

需要付费吗?

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

工作流信息
难度等级
中级
节点数量13
分类2
节点类型5
难度说明

适合有一定经验的用户,包含 6-15 个节点的中等复杂度工作流

作者
Robert Breen

Robert Breen

@rbreen

Professional services consultant with over 10 years of experience solving complex business problems across industries. I specialize in n8n and process automation—designing custom workflows that integrate tools like Google Calendar, Airtable, GPT, and internal systems. Whether you need to automate scheduling, sync data, or streamline operations, I build solutions that save time and drive results.

外部链接
在 n8n.io 查看

分享此工作流