{
  "nodes": [
    {
      "parameters": {
        "content": "### The conversation history (last 20 messages) is stored in a buffer memory",
        "height": 225,
        "width": 300
      },
      "id": "0778ac74-0e99-4781-bd7f-659182f4359f",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -560,
        -100
      ],
      "typeVersion": 1
    },
    {
      "parameters": {
        "content": "### Tools which agent can use to accomplish the task",
        "height": 225,
        "width": 340
      },
      "id": "eb73df27-2b83-4afc-aedc-b149a66f87e3",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -220,
        -100
      ],
      "typeVersion": 1
    },
    {
      "parameters": {
        "content": "### Conversational agent will utilise available tools to answer the prompt. ",
        "height": 211,
        "width": 422
      },
      "id": "5a48b3f4-111c-42bb-aa1d-8cd0b394819a",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -520,
        -500
      ],
      "typeVersion": 1
    },
    {
      "parameters": {
        "options": {}
      },
      "id": "dd0f6ef3-02fa-45bc-84ed-4cdd066155f0",
      "name": "When chat message received",
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "position": [
        -820,
        -420
      ],
      "typeVersion": 1.1
    },
    {
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini"
        },
        "options": {}
      },
      "id": "92501cd1-4e67-410e-99b7-8ee794c8cf0b",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -740,
        0
      ],
      "typeVersion": 1.2,
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "contextWindowLength": 20
      },
      "id": "b0ccd745-0c49-480a-9f0d-f18bea759eb7",
      "name": "Simple Memory",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        -460,
        0
      ],
      "typeVersion": 1.3
    },
    {
      "parameters": {
        "options": {}
      },
      "id": "5a404545-1f9f-4047-a964-49d0f6683a37",
      "name": "SerpAPI",
      "type": "@n8n/n8n-nodes-langchain.toolSerpApi",
      "position": [
        -160,
        0
      ],
      "typeVersion": 1,
      "credentials": {
        "serpApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {},
      "id": "e0ca974f-02ef-46fb-b89e-21091d053d65",
      "name": "Wikipedia",
      "type": "@n8n/n8n-nodes-langchain.toolWikipedia",
      "position": [
        -20,
        0
      ],
      "typeVersion": 1
    },
    {
      "parameters": {
        "options": {}
      },
      "id": "f0b047f6-be31-4143-877d-6e7f2b47cb37",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -440,
        -420
      ],
      "typeVersion": 1.8
    }
  ],
  "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
          }
        ]
      ]
    },
    "SerpAPI": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Wikipedia": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    }
  },
  "meta": {
    "templateCredsSetupCompleted": true
  }
}