8
n8n 한국어amn8n.com

GPT-4와 재사용 가능한 사고 도구를 사용하여 다중 단계 추론 AI 에이전트 생성

중급

이것은Engineering, AI Chatbot분야의자동화 워크플로우로, 11개의 노드를 포함합니다.주로 Agent, ChatTrigger, LmChatOpenAi, ToolWorkflow, ExecuteWorkflowTrigger 등의 노드를 사용하며. GPT-4와 재사용 가능한 사고 도구를 통해 다단계 추론 AI 에이전트 생성

사전 요구사항
  • OpenAI API Key
워크플로우 미리보기
노드 연결 관계를 시각적으로 표시하며, 확대/축소 및 이동을 지원합니다
워크플로우 내보내기
다음 JSON 구성을 복사하여 n8n에 가져오면 이 워크플로우를 사용할 수 있습니다
{
  "nodes": [
    {
      "id": "97a1c69c-d9b4-44a4-a533-25c1af48b38f",
      "name": "채팅 메시지 수신 시",
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "position": [
        -32,
        -96
      ],
      "webhookId": "35e86578-a7fb-4973-9783-9963602c9bb6",
      "parameters": {
        "options": {}
      },
      "typeVersion": 1.3
    },
    {
      "id": "3a6435c3-636b-4e88-b4be-3fdc7af4f587",
      "name": "AI 에이전트",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        208,
        -128
      ],
      "parameters": {
        "options": {
          "systemMessage": "You are a very smart assistant.\n\nYou always start by calling the tool \"Initial thoughts\" to plan the way you'll proceed to use the tools X, Y, and Z.\n\nOnce you've executed your initial plan, call the tool \"Additional thoughts\" to check in with the results and decide if you need to further use tools X, Y, and Z or if you're ready to answer the user.\n"
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "1cdbe2f6-5b78-4c5c-8a76-2ddd2b126543",
      "name": "OpenAI 채팅 모델",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        48,
        112
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "dMiSy27YCK6c6rra",
          "name": "Duv's OpenAI"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "99fb74bf-dae8-4ae4-9f35-ad5c95d5a97d",
      "name": "심플 메모리",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        208,
        112
      ],
      "parameters": {},
      "typeVersion": 1.3
    },
    {
      "id": "74bd5f99-5e02-41b9-961e-7d4654df47a4",
      "name": "초기 생각",
      "type": "@n8n/n8n-nodes-langchain.toolWorkflow",
      "position": [
        448,
        224
      ],
      "parameters": {
        "workflowId": {
          "__rl": true,
          "mode": "list",
          "value": "KNxyzmWuqSCK1GUR",
          "cachedResultName": "TEMPLATE - AI agent with multiple thinking tools"
        },
        "description": "Always start your process by calling this tool to write initial thoughts and plan the way you'll go about answering the user query.",
        "workflowInputs": {
          "value": {
            "Thoughts": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Thoughts', `Write initial thoughts very concisely (be token efficient, just list some thoughts) on the best ways to go about the user query.`, 'string') }}"
          },
          "schema": [
            {
              "id": "Thoughts",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Thoughts",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "Thoughts"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "81f7dad8-01d4-4f26-be4b-250835f97a6b",
      "name": "추가 생각",
      "type": "@n8n/n8n-nodes-langchain.toolWorkflow",
      "position": [
        624,
        224
      ],
      "parameters": {
        "workflowId": {
          "__rl": true,
          "mode": "list",
          "value": "KNxyzmWuqSCK1GUR",
          "cachedResultName": "TEMPLATE - AI agent with multiple thinking tools"
        },
        "description": "Call this tool after having ... to check-in and decide if other steps would be needed before being able to finally answer the user query.",
        "workflowInputs": {
          "value": {
            "Thoughts": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Thoughts', `Write your thoughts very concisely (be token efficient, just list some thoughts) on the best ways to go about the user query.`, 'string') }}"
          },
          "schema": [
            {
              "id": "Thoughts",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Thoughts",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "Thoughts"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "6912f166-d7a7-441c-92e6-578f3f9a81e5",
      "name": "스티키 노트",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -608,
        -96
      ],
      "parameters": {
        "width": 480,
        "height": 768,
        "content": "# Advanced Agent Reasoning Framework\n\nThis template demonstrates how to give an AI agent multiple, custom \"thinking\" steps to build more powerful and reliable automations. It bypasses the single **Think Tool** limit by using a reusable sub-workflow.\n\n## How it works\n\nA simple sub-workflow is used as a reusable \"scratchpad.\" We call it multiple times with the **Tool (Workflow)** node, giving each call a unique description to guide the agent's thinking process (e.g., plan first, then reflect later).\n\n## How to use this template\n\nThis template is a foundation. To make it your own:\n\n1.  **Add your action tools:** Connect your own tools (e.g., web search, API calls) to the **AI Agent**. It needs tasks to think about!\n2.  **Customize the thinking:** Edit the `description` of the `Initial thoughts` and `Additional thoughts` tools to make them relevant to your new action tools.\n3.  **Instruct the agent:** Update the **system prompt** of the main **AI Agent** to tell it how to use its new set of thinking and action tools to solve problems.\n4.  **Connect your AI provider** and activate the workflow."
      },
      "typeVersion": 1
    },
    {
      "id": "3dd09d82-c7d3-40e9-bad6-3b64729142e5",
      "name": "스티키 노트1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        384,
        96
      ],
      "parameters": {
        "color": 7,
        "width": 400,
        "height": 240,
        "content": "## Your thinking tools\nFeel free to adjust their prompts, add more, and connect other necessary tools for your workflow."
      },
      "typeVersion": 1
    },
    {
      "id": "7fdd3183-a348-4c1b-b1ee-5ceef90bfc07",
      "name": "스티키 노트2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -16,
        352
      ],
      "parameters": {
        "color": 7,
        "width": 304,
        "height": 320,
        "content": "## The subworkflow\nThis subworkflow imitates the thinking tool as it accepts a string called \"thought\" as an input."
      },
      "typeVersion": 1
    },
    {
      "id": "3eab469a-d1d3-4da2-be78-c938f85dc943",
      "name": "사고 서브-워크플로우",
      "type": "n8n-nodes-base.executeWorkflowTrigger",
      "position": [
        80,
        512
      ],
      "parameters": {
        "workflowInputs": {
          "values": [
            {
              "name": "Thoughts"
            }
          ]
        }
      },
      "typeVersion": 1.1
    },
    {
      "id": "96cb61dc-146f-4c34-bec5-6d150d2c2bd7",
      "name": "스티키 노트3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        192,
        -240
      ],
      "parameters": {
        "color": 7,
        "width": 400,
        "height": 240,
        "content": "## The agent\nDon't forget to customise the system prompt to your use case!"
      },
      "typeVersion": 1
    }
  ],
  "connections": {
    "99fb74bf-dae8-4ae4-9f35-ad5c95d5a97d": {
      "ai_memory": [
        [
          {
            "node": "3a6435c3-636b-4e88-b4be-3fdc7af4f587",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "74bd5f99-5e02-41b9-961e-7d4654df47a4": {
      "ai_tool": [
        [
          {
            "node": "3a6435c3-636b-4e88-b4be-3fdc7af4f587",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "1cdbe2f6-5b78-4c5c-8a76-2ddd2b126543": {
      "ai_languageModel": [
        [
          {
            "node": "3a6435c3-636b-4e88-b4be-3fdc7af4f587",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "81f7dad8-01d4-4f26-be4b-250835f97a6b": {
      "ai_tool": [
        [
          {
            "node": "3a6435c3-636b-4e88-b4be-3fdc7af4f587",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "97a1c69c-d9b4-44a4-a533-25c1af48b38f": {
      "main": [
        [
          {
            "node": "3a6435c3-636b-4e88-b4be-3fdc7af4f587",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
자주 묻는 질문

이 워크플로우를 어떻게 사용하나요?

위의 JSON 구성 코드를 복사하여 n8n 인스턴스에서 새 워크플로우를 생성하고 "JSON에서 가져오기"를 선택한 후, 구성을 붙여넣고 필요에 따라 인증 설정을 수정하세요.

이 워크플로우는 어떤 시나리오에 적합한가요?

중급 - 엔지니어링, AI 챗봇

유료인가요?

이 워크플로우는 완전히 무료이며 직접 가져와 사용할 수 있습니다. 다만, 워크플로우에서 사용하는 타사 서비스(예: OpenAI API)는 사용자 직접 비용을 지불해야 할 수 있습니다.

워크플로우 정보
난이도
중급
노드 수11
카테고리2
노드 유형7
난이도 설명

일정 경험을 가진 사용자를 위한 6-15개 노드의 중간 복잡도 워크플로우

저자
Guillaume Duvernay

Guillaume Duvernay

@duv

AI and automation expert

외부 링크
n8n.io에서 보기

이 워크플로우 공유

카테고리

카테고리: 34