AutomationFlowsAI & RAG › AI Chatbot Agent with Multiple Knowledge Bases

AI Chatbot Agent with Multiple Knowledge Bases

Original n8n title: AI Chatbot Agent with a Panel of Experts Using Infranodus Graphrag Knowledge

ByInfraNodus @infranodus on n8n.io

This workflow creates an AI chatbot agent that has access to several knowledge bases at the same time (used as "experts").

Chat trigger trigger★★★★☆ complexityAI-powered14 nodesMemory Buffer WindowChat TriggerAgentOpenAI ChatHTTP Request Tool
AI & RAG Trigger: Chat trigger Nodes: 14 Complexity: ★★★★☆ AI nodes: yes Added:

This workflow corresponds to n8n.io template #4402 — we link there as the canonical source.

This workflow follows the Agent → Chat Trigger recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "id": "bHZEpS3GDpUNmmRD",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "AI Chatbot Agent: a Panel of Experts using InfraNodus Graph RAG Knowledge",
  "tags": [
    {
      "id": "66wgFoDi9Xjl74M3",
      "name": "Support",
      "createdAt": "2025-05-21T17:06:32.355Z",
      "updatedAt": "2025-05-21T17:06:32.355Z"
    },
    {
      "id": "9QurS5Kb1CkCYrnG",
      "name": "Product",
      "createdAt": "2025-05-21T17:06:29.704Z",
      "updatedAt": "2025-05-21T17:06:29.704Z"
    },
    {
      "id": "IzYV3Gv55x1h73cK",
      "name": "Ideation",
      "createdAt": "2025-05-20T14:53:20.662Z",
      "updatedAt": "2025-05-20T14:53:20.662Z"
    },
    {
      "id": "aECLdyckoPZ29skg",
      "name": "Writing",
      "createdAt": "2025-05-20T14:53:23.085Z",
      "updatedAt": "2025-05-20T14:53:23.085Z"
    },
    {
      "id": "ciIq4giMNXaJiyiQ",
      "name": "Thinking Tools",
      "createdAt": "2025-05-20T14:53:17.515Z",
      "updatedAt": "2025-05-20T14:53:17.515Z"
    },
    {
      "id": "hCzs9EJfBuD0RxuX",
      "name": "Other",
      "createdAt": "2025-05-21T17:06:34.674Z",
      "updatedAt": "2025-05-21T17:06:34.674Z"
    },
    {
      "id": "sJk9cUvmMU8FkJXv",
      "name": "AI",
      "createdAt": "2025-05-20T13:16:15.636Z",
      "updatedAt": "2025-05-20T13:16:15.636Z"
    }
  ],
  "nodes": [
    {
      "id": "41bf047a-eba0-4a7c-ac46-3a5da9826180",
      "name": "Simple Memory",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        400,
        280
      ],
      "parameters": {},
      "typeVersion": 1.3
    },
    {
      "id": "9fb76eda-0a98-4260-a6dd-d1a24d721bfa",
      "name": "When chat message received",
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "position": [
        0,
        0
      ],
      "parameters": {
        "public": true,
        "options": {
          "title": "EightOS Polysingularity Consilium",
          "subtitle": "Let's find a solution to any issue you have",
          "loadPreviousSession": "manually"
        },
        "initialMessages": "Get an advice based on EightOS and Polysingularity frameworks. Ask your question and I will provide a response based on InfraNodus GraphRAG analysis of those discourses."
      },
      "typeVersion": 1.1
    },
    {
      "id": "cedf6471-af63-4ffe-aca3-f8f81530fcc6",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -120,
        -440
      ],
      "parameters": {
        "color": 6,
        "width": 460,
        "height": 400,
        "content": "## AI Chatbot Agent with Experts\n\n### Uses the InfraNodus knowledge graphs and its Graph RAG to retrieve relevant information.\n\nUse your [InfraNodus graph](https://infranodus.com) as the knowledge base for your AI chatbot. \n\nUpload any data to InfraNodus, generate separate knowledge graphs, then connect them as tools to the agent, so it can decide which \"expert\" to use. InfraNodus' Graph RAG will provide high-quality responses that will augment the chatbot's answers.\n\nVideo demo: [https://www.youtube.com/watch?v=kS0QTUvcH6E](https://www.youtube.com/watch?v=kS0QTUvcH6E)\n\nDetailed description: [Nodus Labs support portal](https://support.noduslabs.com/hc/en-us/articles/20174217658396-Using-InfraNodus-Knowledge-Graphs-as-Experts-for-AI-Chatbot-Agents-in-n8n)\n\nInfraNodus API key can be obtained at [InfraNodus.Com](https://infranodus.com/use-case/ai-knowledge-graphs)"
      },
      "typeVersion": 1
    },
    {
      "id": "dfbcdf98-a86b-4cd9-b3b2-98a5b94f3d13",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        840,
        260
      ],
      "parameters": {
        "width": 200,
        "height": 540,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n## Expert #2\n\nAdd your InfraNodus graph here via the HTTP node using its name in the `body.name` field.\n\nDescribe what the expert does in the Description of the tool. You can use auto-generated Graph RAG summary from InfraNodus > Graph > Project Notes"
      },
      "typeVersion": 1
    },
    {
      "id": "bcd44abe-7719-4b67-b8d7-d9887ca08a02",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1060,
        260
      ],
      "parameters": {
        "width": 200,
        "height": 540,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n## Expert #3\n\nYou can add more experts here. Just make to give them descriptive names, so the agent knows which one to connect to when it has a question. "
      },
      "typeVersion": 1
    },
    {
      "id": "c2736799-4921-438c-8b73-b935b1b7df6f",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        340,
        260
      ],
      "parameters": {
        "width": 200,
        "height": 540,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n## Chat Memory\n\nWe use the Simple Memory node to track the conversation's context so that the user can refer to previous messages as they converse with the model."
      },
      "typeVersion": 1
    },
    {
      "id": "f20c53f4-4498-4585-8c6b-d7c90bd0619e",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        400,
        -220
      ],
      "parameters": {
        "width": 460,
        "height": 360,
        "content": "## 2. AI Agent\n\n### Chooses which tool (expert) to use, depending on the user's message. \n\nMake sure you describe the tools available well both in the Agent's System Prompt and in the tools' descriptions. "
      },
      "typeVersion": 1
    },
    {
      "id": "c7d27990-45b2-457d-be9c-c6171dda2da5",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -60,
        -20
      ],
      "parameters": {
        "width": 220,
        "height": 540,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n## 1. Chat Trigger\n\nYou can use this chat inside n8n or you can make it available via a public URL and then use that link or embed it to any website."
      },
      "typeVersion": 1
    },
    {
      "id": "0273eee6-0eca-4360-ab6c-224eedf221ec",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        900,
        -220
      ],
      "parameters": {
        "width": 220,
        "height": 360,
        "content": "## 3. Chat Response\n\n### When the answer is produced, it's sent back to the user. \n\nYou can also choose to do something else to the response \u2014\u00a0e.g. save it to a Google sheet or Airtable to keep logs of the conversation. "
      },
      "typeVersion": 1
    },
    {
      "id": "9c97ab56-80a6-48af-9d61-f3fb92fc60e7",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        440,
        20
      ],
      "parameters": {
        "options": {
          "systemMessage": "Always use either EightOS or Polysingularity tool before sending a response to the model. You have to use at least one of them, the one that think is more suitable. Or both if both can provide some help. \nIf you used both tools and received responses\u00a0from both of them, combine them in one response making sure you merge both perspectives. Ask for specific, actionable advice."
        }
      },
      "typeVersion": 1.9
    },
    {
      "id": "f09d74c1-b197-436a-90a5-253749fcbb8c",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        200,
        280
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o",
          "cachedResultName": "gpt-4o"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "d6c1a430-1900-4c32-a799-a29798b45c7e",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        620,
        260
      ],
      "parameters": {
        "width": 200,
        "height": 540,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n## Expert #1\n\nAdd your InfraNodus graph here via the HTTP node using its name in the `body.name` field.\n\nDescribe what the expert does in the Description of the tool. You can use auto-generated Graph RAG summary from InfraNodus > Graph > Project Notes"
      },
      "typeVersion": 1
    },
    {
      "id": "d9c40421-f5ef-4f50-bd81-c398c86c5b65",
      "name": "EightOS Expert",
      "type": "n8n-nodes-base.httpRequestTool",
      "position": [
        680,
        300
      ],
      "parameters": {
        "url": "https://infranodus.com/api/v1/graphAndAdvice?doNotSave=true&addStats=true&optimize=develop&includeStatements=true&includeGraphSummary=true&includeGraph=false",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "authentication": "genericCredentialType",
        "bodyParameters": {
          "parameters": [
            {
              "name": "name",
              "value": "panarchy_eightos"
            },
            {
              "name": "requestMode",
              "value": "response"
            },
            {
              "name": "prompt",
              "value": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('parameters2_Value', `User query to send to the expert`, 'string') }}"
            },
            {
              "name": "aiTopics",
              "value": "true"
            }
          ]
        },
        "genericAuthType": "httpBearerAuth",
        "toolDescription": "You are an EightOS specialist who is well-versed in the questions of variability, movement, physical development, adaptivity, resilience. \n\nThe main topics of your expertise are:\n<MainTopics> \n1. Dynamic States: state dynamic fractal change hrv recovery movement regeneration \n2. Idea Scale: focus idea scale small specific gap bring sensitive \n3. Ecological Variability: variability stage thinking panarchy schema infranodus bias system \n4. Breath Count: breath give count time result concrete silence effort \n5. Knowledge Structure: structure highly graph influence knowledge ai text network \n6. Biased Discourse: stay discourse long steer objective short term shifting \n</MainTopics>"
      },
      "credentials": {
        "httpBearerAuth": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "e58946be-1a4c-4991-86b2-3e51a0241548",
      "name": "Polysingularity Expert",
      "type": "n8n-nodes-base.httpRequestTool",
      "position": [
        900,
        300
      ],
      "parameters": {
        "url": "https://infranodus.com/api/v1/graphAndAdvice?doNotSave=true&addStats=true&optimize=develop&includeStatements=true&includeGraphSummary=true&includeGraph=false",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "authentication": "genericCredentialType",
        "bodyParameters": {
          "parameters": [
            {
              "name": "name",
              "value": "polysingularity_overview"
            },
            {
              "name": "requestMode",
              "value": "response"
            },
            {
              "name": "prompt",
              "value": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('parameters2_Value', `User query to send to the expert`, 'string') }}"
            },
            {
              "name": "aiTopics",
              "value": "true"
            }
          ]
        },
        "genericAuthType": "httpBearerAuth",
        "toolDescription": "You are an expert in Polysingularity. You provide responses in the field of multiplicity, networks, seeing multiple points etc. \n\nThe main topics of your expertise are:\n<MainTopics> \n1. Community Dynamics: multiple moment time change state position specific community \n2. Cognitive Practice: polysingularity practice singularity cognitive world social polysingular mind \n3. Network Perception: network make affordance choice perceive constant environmental constantly \n4. Interaction Capacity: capacity human interaction situation node possibility concept describe \n5. Space Creation: condition space form shifting emerge attractor life center \n6. Equation Analysis: find risk fully committed equation sentence rule finding \n7. Process Multiplicity: process multiplicity exist dynamic behavior part show define \n8. Idea Connectivity: ensure diversity metastable idea encounter order connectivity unfold \n9. Directed Evolution: evolution distinct directed kind \n</MainTopics>"
      },
      "credentials": {
        "httpBearerAuth": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.2
    }
  ],
  "active": true,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "8848095b-7ee0-4ab8-bc16-f807f963fb20",
  "connections": {
    "Simple Memory": {
      "ai_memory": [
        [
          {
            "node": "AI Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "EightOS Expert": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Polysingularity Expert": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "When chat message received": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

This workflow creates an AI chatbot agent that has access to several knowledge bases at the same time (used as "experts").

Source: https://n8n.io/workflows/4402/ — original creator credit. Request a take-down →

More AI & RAG workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

AI & RAG

Who is this workflow for? This workflow is designed for SEO analysts, content creators, marketing agencies, and developers who need to index a website and then interact with its content as if it were

Agent, OpenAI Chat, Memory Buffer Window +10
AI & RAG

Categories: AI Agents, Design Automation, Business Tools

Tool Workflow, HTTP Request Tool, Memory Buffer Window +7
AI & RAG

Perfect for educators, consultants, and content creators who record sessions and want to repurpose them into social media posts, videos, and images without manual work. Chat interface triggers the AI

Chat Trigger, OpenAI Chat, Memory Buffer Window +9
AI & RAG

This workflow implements an advanced AI-powered system for generating, and executing Claude Skills stored on GitHub.

Chat Trigger, Memory Buffer Window, Mcp Client Tool +9
AI & RAG

ModelRouter. Uses chatTrigger, agent, modelSelector, httpRequest. Chat trigger; 28 nodes.

Chat Trigger, Agent, Model Selector +8