This workflow creates an AI voice chatbot agent that has access to several knowledge bases at the same time (used as "experts").
These knowledge bases are provided using the InfraNodus GraphRAG using the knowledge graphs and providing high-quality responses without the need to set up complex RAG vector store workflows.
We use ElevenLabs to set up a voice agent that can be embedded to any website or used via their API.
The advantages of using GraphRAG instead of the standard vector stores for knowledge are:
This template uses the n8n AI agent node as an orchestrating agent that decides which tool (knowledge graph) to use based on the user's prompt.
The user's prompt is received from the ElevenLabs Conversational AI agent via an n8n Webhook, which also takes care of the voice interaction.
The response from n8n is then sent to the Webhook, which is polled by the ElevenLabs voice agent. This agent processes the response and provides the final answer.
Here's a description step by step:
knowledge_base
tool in ElevenLabs to the n8n Webhook with the POST request containing the user's prompt
and sessionID
for Chat Memory node in n8n.knowledge_base
tool via the webhook and then condenses it for conversational format and transforms text into voice.You need an InfraNodus GraphRAG API account and key to use this workflow.
body
name
field.1. How many "experts" should I aim for?
We recommend to aim for the number of experts as the optimal number of people in a team, which is usually 2-7. If you add more experts, your AI orchestrating agent will have troubles choosing the most suitable "expert" tool for the user's query. You can mitigate this by specifying in the AI agent description that it can choose maximum 3-7 experts to provide a response.
2. Why use InfraNodus GraphRAG and not standard vector store for knowledge?
First, vector stores are complex to set up and to update. You'd need a separate workflow for that, decide on the vector dimensions, add metadata to your knowledge, etc.
With InfraNodus, you have a complete RAG / GraphRAG solution under the hood that is easy to set up and provides high-quality responses that takes the overall structure and the relations between your ideas into account.
3 Why not use ElevenLabs' own knowledge?
One of the reasons is that you want your knowledge base to be in one place so you can reuse it in other n8n workflows. Another reason is that you will not have such a good separation between the "experts" when you converse with the agent. So the answers you get will be based on top matches from all the books / articles you upload, while with the InfraNodus GraphRAG setup you can better control which graphs are consulted as experts and have an explicit way to display this data.
You can use this same workflow with a Telegram bot, so you can interact with it using Telegram. There are many more customizations available on our GitHub repo for n8n workflows.
Check out the complete setup guide for this workflow at https://support.noduslabs.com/hc/en-us/articles/20318967066396-How-to-Build-a-Text-Voice-AI-Agent-Chatbot-with-n8n-Elevenlabs-and-InfraNodus
Also check out the video tutorial with a demo: