{
 "name": "[노드 한 장] Chat Trigger · 환율 물어보는 챗봇",
 "nodes": [
  {
   "id": "c1",
   "name": "When chat message received",
   "type": "@n8n/n8n-nodes-langchain.chatTrigger",
   "typeVersion": 1.1,
   "position": [
    0,
    0
   ],
   "parameters": {
    "options": {}
   }
  },
  {
   "id": "c2",
   "name": "AI Agent",
   "type": "@n8n/n8n-nodes-langchain.agent",
   "typeVersion": 2,
   "position": [
    260,
    0
   ],
   "parameters": {
    "options": {
     "systemMessage": "너는 환율을 알려주는 도우미야. 환율을 물으면 반드시 get_usd_rates 도구로 최신 값을 조회하고, 조회한 값(KRW)과 갱신 시각을 함께 알려줘. 계산이 필요하면 그 값으로 계산해. 한국어로 짧게 답해."
    }
   }
  },
  {
   "id": "c3",
   "name": "OpenAI Chat Model",
   "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
   "typeVersion": 1.2,
   "position": [
    160,
    220
   ],
   "parameters": {
    "model": {
     "__rl": true,
     "mode": "list",
     "value": "gpt-4.1-mini",
     "cachedResultName": "gpt-4.1-mini"
    },
    "options": {
     "temperature": 0
    }
   }
  },
  {
   "id": "c4",
   "name": "Simple Memory",
   "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
   "typeVersion": 1.3,
   "position": [
    300,
    220
   ],
   "parameters": {
    "contextWindowLength": 5
   }
  },
  {
   "id": "c5",
   "name": "get_usd_rates",
   "type": "n8n-nodes-base.httpRequestTool",
   "typeVersion": 4.2,
   "position": [
    440,
    220
   ],
   "parameters": {
    "toolDescription": "미국 달러(USD) 기준 최신 환율을 가져온다. 응답의 rates.KRW가 1달러당 원화, time_last_update_utc가 갱신 시각.",
    "url": "https://open.er-api.com/v6/latest/USD",
    "options": {}
   }
  }
 ],
 "connections": {
  "When chat message received": {
   "main": [
    [
     {
      "node": "AI Agent",
      "type": "main",
      "index": 0
     }
    ]
   ]
  },
  "OpenAI Chat Model": {
   "ai_languageModel": [
    [
     {
      "node": "AI Agent",
      "type": "ai_languageModel",
      "index": 0
     }
    ]
   ]
  },
  "Simple Memory": {
   "ai_memory": [
    [
     {
      "node": "AI Agent",
      "type": "ai_memory",
      "index": 0
     }
    ]
   ]
  },
  "get_usd_rates": {
   "ai_tool": [
    [
     {
      "node": "AI Agent",
      "type": "ai_tool",
      "index": 0
     }
    ]
   ]
  }
 },
 "settings": {
  "timezone": "Asia/Seoul",
  "executionOrder": "v1"
 },
 "meta": {
  "templateCredsSetupCompleted": false,
  "source": "datapopcorn.ai/workflow/nodes"
 }
}