{
  "name": "Exemplos",
  "nodes": [
    {
      "parameters": {
        "mode": "insert",
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.vectorStorePGVector",
      "typeVersion": 1.3,
      "position": [
        0,
        0
      ],
      "id": "dca241a4-0f56-421d-a625-f9fa07a242b1",
      "name": "Postgres PGVector Store",
      "credentials": {
        "postgres": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "modelName": "models/text-embedding-004"
      },
      "type": "@n8n/n8n-nodes-langchain.embeddingsGoogleGemini",
      "typeVersion": 1,
      "position": [
        -40,
        320
      ],
      "id": "54b84fbe-0767-49ed-9b21-23ca58101ce7",
      "name": "Embeddings Google Gemini",
      "credentials": {
        "googlePalmApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "fileSelector": "/dados/teste.pdf",
        "options": {}
      },
      "type": "n8n-nodes-base.readWriteFile",
      "typeVersion": 1,
      "position": [
        -460,
        120
      ],
      "id": "812ff873-75b6-4ea9-94c4-c0c489ef6a7c",
      "name": "Read/Write Files from Disk"
    },
    {
      "parameters": {
        "operation": "pdf",
        "options": {}
      },
      "type": "n8n-nodes-base.extractFromFile",
      "typeVersion": 1,
      "position": [
        -220,
        140
      ],
      "id": "176c5add-42d5-466e-9484-9eece360e814",
      "name": "Extract from File"
    },
    {
      "parameters": {
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.documentDefaultDataLoader",
      "typeVersion": 1.1,
      "position": [
        140,
        220
      ],
      "id": "ee2c641c-e0a0-4045-bd36-437dc8617217",
      "name": "Default Data Loader"
    },
    {
      "parameters": {
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "typeVersion": 1.1,
      "position": [
        -860,
        320
      ],
      "id": "655769de-f0bb-4f33-aa9c-2fcc1e523a02",
      "name": "When chat message received"
    },
    {
      "parameters": {
        "options": {
          "systemMessage": "Respoda as perguntas do usu\u00e1rio somente em portugu\u00eas.\nUse sempre a tool 'Postgres PGVectorStore' para responder as perguntad do usu\u00e1rio"
        }
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 2,
      "position": [
        -640,
        320
      ],
      "id": "dc392b40-4e81-4c08-b2e1-3c0a938fcf8a",
      "name": "AI Agent"
    },
    {
      "parameters": {
        "modelName": "models/gemini-2.5-flash",
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "typeVersion": 1,
      "position": [
        -640,
        480
      ],
      "id": "8847c6b0-27b1-404b-8f5f-ebfa86fc5161",
      "name": "Google Gemini Chat Model",
      "credentials": {
        "googlePalmApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {},
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "typeVersion": 1.3,
      "position": [
        -540,
        540
      ],
      "id": "d5e5d532-4f87-4591-98f9-e8349cb13051",
      "name": "Simple Memory"
    },
    {
      "parameters": {
        "mode": "retrieve-as-tool",
        "toolDescription": "Use essa ferramenta para responder as perguntas do usu\u00e1rio",
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.vectorStorePGVector",
      "typeVersion": 1.3,
      "position": [
        -400,
        560
      ],
      "id": "9ed47428-2caa-4b8f-b765-fadf22eefe6d",
      "name": "Postgres PGVector Store1",
      "credentials": {
        "postgres": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "modelName": "models/text-embedding-004"
      },
      "type": "@n8n/n8n-nodes-langchain.embeddingsGoogleGemini",
      "typeVersion": 1,
      "position": [
        -320,
        780
      ],
      "id": "6ceb2f71-53a1-4e12-8751-996a20a63367",
      "name": "Embeddings Google Gemini1",
      "credentials": {
        "googlePalmApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {},
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [
        -640,
        80
      ],
      "id": "1109e2e3-94c1-43ca-80a9-5fb76d35d999",
      "name": "When clicking \u2018Execute workflow\u2019"
    }
  ],
  "connections": {
    "Embeddings Google Gemini": {
      "ai_embedding": [
        [
          {
            "node": "Postgres PGVector Store",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "Read/Write Files from Disk": {
      "main": [
        [
          {
            "node": "Extract from File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract from File": {
      "main": [
        [
          {
            "node": "Postgres PGVector Store",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Default Data Loader": {
      "ai_document": [
        [
          {
            "node": "Postgres PGVector Store",
            "type": "ai_document",
            "index": 0
          }
        ]
      ]
    },
    "When chat message received": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Simple Memory": {
      "ai_memory": [
        [
          {
            "node": "AI Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Postgres PGVector Store1": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Embeddings Google Gemini1": {
      "ai_embedding": [
        [
          {
            "node": "Postgres PGVector Store1",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "When clicking \u2018Execute workflow\u2019": {
      "main": [
        [
          {
            "node": "Read/Write Files from Disk",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "981652c1-7dbd-4e4d-be5d-f55d574a0ec8",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "id": "5GSJPjjJ9FkySelT",
  "tags": []
}