{
  "name": "JobMatch AI V3 (Ultimate Enterprise Architecture)",
  "nodes": [
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "job-assistant",
        "responseMode": "lastNode",
        "options": {}
      },
      "id": "b870661b-79cb-45c9-855e-54e04fef4088",
      "name": "Streamlit App (Webhook Entry)",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 1.1,
      "position": [
        0,
        350
      ]
    },
    {
      "parameters": {
        "agent": "toolsAgent",
        "promptType": "define",
        "text": "={{ $json.body.query }}",
        "options": {}
      },
      "id": "d899f28a-bc6a-4b91-a044-248955350d9d",
      "name": "Main Orchestrator Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 1.4,
      "position": [
        550,
        200
      ]
    },
    {
      "parameters": {
        "name": "qdranttool",
        "description": "Cari informasi pekerjaan (job_title, company_name, job_description) di database vektor Qdrant.",
        "topK": 10
      },
      "id": "b1264cdd-7ef0-43f4-ad50-75a79adc3622",
      "name": "HR Knowledge Tool",
      "type": "@n8n/n8n-nodes-langchain.toolVectorStore",
      "typeVersion": 1,
      "position": [
        850,
        300
      ]
    },
    {
      "parameters": {
        "qdrantCollection": {
          "__rl": true,
          "value": "indonesian_jobs_n8n",
          "mode": "list",
          "cachedResultName": "indonesian_jobs_n8n"
        },
        "options": {
          "contentPayloadKey": "document"
        }
      },
      "id": "ac8b6d83-f919-4144-8a6d-8f74962f8e29",
      "name": "Qdrant 1 (Jobs Vector DB)",
      "type": "@n8n/n8n-nodes-langchain.vectorStoreQdrant",
      "typeVersion": 1,
      "position": [
        1150,
        300
      ],
      "credentials": {
        "qdrantApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {},
      "id": "5bd4ab74-5575-4561-bf4a-d8fedd6c012e",
      "name": "Gemini Embeddings",
      "type": "@n8n/n8n-nodes-langchain.embeddingsGoogleGemini",
      "typeVersion": 1,
      "position": [
        1150,
        500
      ],
      "credentials": {
        "googlePalmApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "descriptionType": "manual",
        "toolDescription": "Query tabel MySQL bernama \"jobs\" untuk mencari lowongan berdasarkan data terstruktur seperti gaji atau tipe kerja. Kolom yang tersedia: job_title (varchar), company_name (varchar), location (varchar), work_type (varchar, contoh: Full time, Kontrak/Temporer, Paruh waktu, Kasual), salary_min (float, gaji minimum dalam Rupiah), salary_max (float, gaji maksimum dalam Rupiah), job_description (text). Gunakan tool ini HANYA JIKA pertanyaan berkaitan dengan ANGKA GAJI atau TIPE PEKERJAAN spesifik. PENTING - ATURAN SQL WAJIB: SELALU gunakan tanda kutip TUNGGAL (apostrof) untuk nilai teks/string di query, JANGAN PERNAH pakai tanda kutip ganda (database ini akan error kalau pakai kutip ganda untuk nilai). Contoh query yang BENAR: SELECT job_title, company_name, salary_min, salary_max FROM jobs WHERE salary_min >= 8000000 AND work_type = 'Full time' LIMIT 10;",
        "operation": "executeQuery",
        "query": "{{$fromAI('query', 'The SQL SELECT query to execute')}}",
        "options": {}
      },
      "type": "n8n-nodes-base.mySqlTool",
      "typeVersion": 2.5,
      "position": [
        850,
        100
      ],
      "id": "e1e5a2f9-bf5f-4512-829f-18f7bf43d93c",
      "name": "Aiven 1 (Primary SQL)",
      "credentials": {
        "mySql": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "typeVersion": 1,
      "position": [
        400,
        50
      ],
      "id": "e2bb8ea8-4976-4624-9409-e77275c52386",
      "name": "Gemini Chat Model",
      "credentials": {
        "googlePalmApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "url": "https://oauth2.googleapis.com/tokeninfo",
        "method": "GET"
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 2.5,
      "position": [
        250,
        350
      ],
      "id": "844f71dc-70e1-40e4-94fe-73ef962d7d95",
      "name": "Google Auth Validator",
      "credentials": {
        "mySql": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "agent": "toolsAgent",
        "promptType": "define",
        "text": "={{ $json.body.cs_query_veronika }}",
        "options": {}
      },
      "id": "507ba070-f654-406f-b046-0e8677bc9ce7",
      "name": "Veronika (CS Agent)",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 1.4,
      "position": [
        550,
        450
      ]
    },
    {
      "parameters": {
        "agent": "toolsAgent",
        "promptType": "define",
        "text": "={{ $json.body.cs_query_leonardo }}",
        "options": {}
      },
      "id": "e9877f65-425c-4be0-b4b4-24a424985766",
      "name": "Leonardo (CS Agent)",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 1.4,
      "position": [
        550,
        700
      ]
    },
    {
      "parameters": {
        "descriptionType": "manual",
        "toolDescription": "Simpan log ke Aiven 2.",
        "operation": "executeQuery",
        "query": "{{$fromAI('query', 'The SQL SELECT query to execute')}}",
        "options": {}
      },
      "type": "n8n-nodes-base.mySqlTool",
      "typeVersion": 2.5,
      "position": [
        850,
        550
      ],
      "id": "f39e8c25-20ee-42df-bef4-2a6b0f688108",
      "name": "Aiven 2 (Telemetry/Kafka)",
      "credentials": {
        "mySql": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "qdrantCollection": {
          "__rl": true,
          "value": "cs_memory",
          "mode": "list",
          "cachedResultName": "indonesian_jobs_n8n"
        },
        "options": {
          "contentPayloadKey": "document"
        }
      },
      "id": "be590680-2275-4195-b851-63050553a9db",
      "name": "Qdrant 2 (CS Memory DB)",
      "type": "@n8n/n8n-nodes-langchain.vectorStoreQdrant",
      "typeVersion": 1,
      "position": [
        1150,
        750
      ],
      "credentials": {
        "qdrantApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "name": "qdranttool",
        "description": "Cari di Qdrant 2.",
        "topK": 10
      },
      "id": "d0ae7ade-ea68-4ecf-af91-0742a96be8e2",
      "name": "CS Knowledge Tool",
      "type": "@n8n/n8n-nodes-langchain.toolVectorStore",
      "typeVersion": 1,
      "position": [
        850,
        750
      ]
    }
  ],
  "connections": {
    "Gemini Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Main Orchestrator Agent",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "HR Knowledge Tool",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "Veronika (CS Agent)",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "Leonardo (CS Agent)",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Gemini Embeddings": {
      "ai_embedding": [
        [
          {
            "node": "Qdrant 1 (Jobs Vector DB)",
            "type": "ai_embedding",
            "index": 0
          },
          {
            "node": "Qdrant 2 (CS Memory DB)",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "Streamlit App (Webhook Entry)": {
      "main": [
        [
          {
            "node": "Google Auth Validator",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Auth Validator": {
      "main": [
        [
          {
            "node": "Main Orchestrator Agent",
            "type": "main",
            "index": 0
          },
          {
            "node": "Veronika (CS Agent)",
            "type": "main",
            "index": 0
          },
          {
            "node": "Leonardo (CS Agent)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aiven 2 (Telemetry/Kafka)": {
      "ai_tool": [
        [
          {
            "node": "Veronika (CS Agent)",
            "type": "ai_tool",
            "index": 0
          },
          {
            "node": "Leonardo (CS Agent)",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "CS Knowledge Tool": {
      "ai_tool": [
        [
          {
            "node": "Veronika (CS Agent)",
            "type": "ai_tool",
            "index": 0
          },
          {
            "node": "Leonardo (CS Agent)",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Qdrant 2 (CS Memory DB)": {
      "ai_vectorStore": [
        [
          {
            "node": "CS Knowledge Tool",
            "type": "ai_vectorStore",
            "index": 0
          }
        ]
      ]
    },
    "Qdrant 1 (Jobs Vector DB)": {
      "ai_vectorStore": [
        [
          {
            "node": "HR Knowledge Tool",
            "type": "ai_vectorStore",
            "index": 0
          }
        ]
      ]
    },
    "Aiven 1 (Primary SQL)": {
      "ai_tool": [
        [
          {
            "node": "Main Orchestrator Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Main Orchestrator Agent": {
      "main": [
        []
      ]
    },
    "HR Knowledge Tool": {
      "ai_tool": [
        [
          {
            "node": "Main Orchestrator Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": true,
  "settings": {
    "executionOrder": "v1",
    "binaryMode": "separate",
    "availableInMCP": false
  },
  "versionId": "40159aa5-676f-45f2-bf06-fb3760169f84",
  "id": "joc429PfquCLynfI",
  "tags": []
}