{
  "name": "RAG #2",
  "nodes": [
    {
      "parameters": {
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "typeVersion": 1.1,
      "position": [
        -60,
        20
      ],
      "id": "5e5baf93-2671-43a2-b2b5-35ea9e697119",
      "name": "When chat message received",
      "webhookId": "9cc113e7-d987-45a2-8e91-a4a664624d05"
    },
    {
      "parameters": {
        "options": {
          "systemMessage": "You are a helpful assistant when it comes to receiving messages, finding the correct response in the Pinecone database and delivering answers.\n\nIf there are tasks that need to be completed, please call the Clickup tool which will create a new to-do task for our team to finish.\n\nEnsure that if there's a question or a task that's been created to let the person know that we're going to get it done and let notify them when it's complete. Use natural language, like you're a professional talking to a customer."
        }
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 1.7,
      "position": [
        160,
        20
      ],
      "id": "28dee7ce-9061-4f29-a167-ea9e4218ffae",
      "name": "Test Agent"
    },
    {
      "parameters": {
        "model": {
          "__rl": true,
          "value": "gpt-4o",
          "mode": "list",
          "cachedResultName": "gpt-4o"
        },
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "typeVersion": 1.2,
      "position": [
        -60,
        240
      ],
      "id": "2557690f-37a4-4fb5-a648-c4a6715ff9c9",
      "name": "OpenAI Chat Model",
      "credentials": {
        "openAiApi": {
          "id": "LMhBWR4HHC3Gn64j",
          "name": "OpenAi account"
        }
      }
    },
    {
      "parameters": {},
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "typeVersion": 1.3,
      "position": [
        80,
        240
      ],
      "id": "53c18c1d-67bb-4527-8c04-1951c664e40c",
      "name": "Window Buffer Memory"
    },
    {
      "parameters": {
        "name": "database",
        "description": "Call this tool to to answer chat questions"
      },
      "type": "@n8n/n8n-nodes-langchain.toolVectorStore",
      "typeVersion": 1,
      "position": [
        320,
        240
      ],
      "id": "eb9d550e-6227-4fd5-ab14-9c0ec91168d5",
      "name": "Answer questions with a vector store"
    },
    {
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini"
        },
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "typeVersion": 1.2,
      "position": [
        460,
        460
      ],
      "id": "af7e14d8-f49d-4d51-85d0-94405b6a650e",
      "name": "OpenAI Chat Model1",
      "credentials": {
        "openAiApi": {
          "id": "LMhBWR4HHC3Gn64j",
          "name": "OpenAi account"
        }
      }
    },
    {
      "parameters": {
        "pineconeIndex": {
          "__rl": true,
          "value": "n8n",
          "mode": "list",
          "cachedResultName": "n8n"
        },
        "options": {
          "pineconeNamespace": "Test"
        }
      },
      "type": "@n8n/n8n-nodes-langchain.vectorStorePinecone",
      "typeVersion": 1,
      "position": [
        140,
        460
      ],
      "id": "1d01e281-2217-457f-b134-874003e4e6f7",
      "name": "Pinecone Vector Store",
      "credentials": {
        "pineconeApi": {
          "id": "lKKUy23NMzAMGJhr",
          "name": "PineconeApi account"
        }
      }
    },
    {
      "parameters": {
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
      "typeVersion": 1.2,
      "position": [
        240,
        680
      ],
      "id": "7e50158a-6ddd-48b4-b6b0-a24522420e0e",
      "name": "Embeddings OpenAI",
      "credentials": {
        "openAiApi": {
          "id": "LMhBWR4HHC3Gn64j",
          "name": "OpenAi account"
        }
      }
    },
    {
      "parameters": {
        "operation": "create",
        "base": {
          "__rl": true,
          "value": "app0Al5GKMul8VlVb",
          "mode": "list",
          "cachedResultName": "Test",
          "cachedResultUrl": "https://airtable.com/app0Al5GKMul8VlVb"
        },
        "table": {
          "__rl": true,
          "value": "tbldDAoA50ij7yWJj",
          "mode": "list",
          "cachedResultName": "Table 1",
          "cachedResultUrl": "https://airtable.com/app0Al5GKMul8VlVb/tbldDAoA50ij7yWJj"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "Name": "={{ $fromAI('taskName') }}",
            "Notes": "={{ $fromAI('taskNotes') }}",
            "Status": "Todo"
          },
          "matchingColumns": [],
          "schema": [
            {
              "id": "Name",
              "displayName": "Name",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "Notes",
              "displayName": "Notes",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "Assignee",
              "displayName": "Assignee",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "Status",
              "displayName": "Status",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "options",
              "options": [
                {
                  "name": "Todo",
                  "value": "Todo"
                },
                {
                  "name": "In progress",
                  "value": "In progress"
                },
                {
                  "name": "Done",
                  "value": "Done"
                }
              ],
              "readOnly": false,
              "removed": false
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.airtableTool",
      "typeVersion": 2.1,
      "position": [
        640,
        240
      ],
      "id": "5f553cf3-4930-4b30-80a4-e8f4ffe5a3e1",
      "name": "Airtable",
      "credentials": {
        "airtableTokenApi": {
          "id": "tE4mljhBhlMvp1pj",
          "name": "Airtable Personal Access Token account 2"
        }
      }
    },
    {
      "parameters": {
        "name": "Test",
        "workflowId": {
          "__rl": true,
          "value": "04snW5j9EEpF4I9x",
          "mode": "list",
          "cachedResultName": "AI Agent #1"
        },
        "workflowInputs": {
          "mappingMode": "defineBelow",
          "value": {},
          "matchingColumns": [],
          "schema": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        }
      },
      "type": "@n8n/n8n-nodes-langchain.toolWorkflow",
      "typeVersion": 2,
      "position": [
        780,
        240
      ],
      "id": "58c7428d-ecdd-4a60-ace6-a77b981b8e5e",
      "name": "Call n8n Workflow Tool"
    }
  ],
  "pinData": {},
  "connections": {
    "When chat message received": {
      "main": [
        [
          {
            "node": "Test Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Test Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Window Buffer Memory": {
      "ai_memory": [
        [
          {
            "node": "Test Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Answer questions with a vector store": {
      "ai_tool": [
        [
          {
            "node": "Test Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model1": {
      "ai_languageModel": [
        [
          {
            "node": "Answer questions with a vector store",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Pinecone Vector Store": {
      "ai_vectorStore": [
        [
          {
            "node": "Answer questions with a vector store",
            "type": "ai_vectorStore",
            "index": 0
          }
        ]
      ]
    },
    "Embeddings OpenAI": {
      "ai_embedding": [
        [
          {
            "node": "Pinecone Vector Store",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "Airtable": {
      "ai_tool": [
        [
          {
            "node": "Test Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Call n8n Workflow Tool": {
      "ai_tool": [
        [
          {
            "node": "Test Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "9a2847e7-e744-4316-b271-f1823348dcc0",
  "meta": {
    "templateCredsSetupCompleted": true,
    "instanceId": "d2017cc6d1e4b956d269a8123bffa72fb7aaa41ad37a73b7c0fb64c7d0e2edae"
  },
  "id": "TXhzjIkJHYmk2EBj",
  "tags": []
}