Multi-Agent Routing and Response Workflow
detail.loadingPreview
Routes incoming requests to specialized agents (Reminder, Email, Meeting, Document) and returns their responses.
About This Workflow
This n8n workflow acts as a central router for incoming requests. It uses an AI Agent to determine the user's intent and then directs the request to a specific sub-workflow (Agent) responsible for handling that intent. Finally, it returns the response from the appropriate agent back to the webhook caller.
Key components:
- Webhook: Receives incoming requests.
- AI Agent: Analyzes the user's message to determine the intent and the correct agent to route to.
- Agent Route: A switch node that directs the flow based on the AI Agent's output.
- Specialized Agents (Reminder, Email, Meeting, Document): Execute specific tasks based on the routed intent. These are represented by
executeWorkflownodes pointing to separate workflows. - Respond to Webhook: Sends the final response back to the original caller.
Key Features
- Dynamic routing of requests to specialized AI agents.
- Supports multiple agent types: Reminder, Email, Meeting, Document.
- Utilizes Langchain nodes for AI agent capabilities.
- Leverages n8n's
executeWorkflowto call modular sub-workflows. - Includes chat memory via Postgres for stateful interactions.
- Configurable output parsing for structured AI responses.
How To Use
- Webhook Node: Configure the
Webhooknode to receive incoming POST requests. Thepathwill be your webhook URL. - AI Agent Node (
e903e5e0-49c9-4a67-b3f3-617ea0208b27): This node contains the LLM prompt that defines the agents and routing rules. Ensure thetextparameter accurately describes the available agents and their purposes. TheGPT 4o Mininode is connected as the language model. - Postgres Chat Memory Node (
221bd09f-e4cd-4c53-8bfa-3044f2b9a399): Connect this to theAI Agentnode to provide chat memory. Configure your Postgres credentials. - Structured Output Parser Node (
c5e21204-5f21-45a4-a0bd-5726cff56263): This node is used to parse the structured output from the AI Agent. It expects a JSON schema. Connect it to theAI Agentnode. - Auto-fixing Output Parser Node (
54183edb-119c-4365-b47c-ac79f4ee2775): This node helps to fix any parsing errors from the AI's output. It's connected to theStructured Output Parser. - Agent Route Node (
d35aa37d-bdd5-463e-9f0c-1e71f9184953): Thisswitchnode directs the flow based on theAgent Nameoutput from the AI. Configure the conditions for each agent (Reminder Agent, Email Agent, Meeting Agent, Document Agent). - Execute Workflow Nodes (Reminder, Email, Meeting, Document Agents): Each of these nodes (
c303a2b1-ced5-4377-9ba4-8f70428adfa1,bb4f7714-4205-468e-92c1-8edb2608ec26,9fe41651-229f-4e87-9ff9-5a8ebe92fb2b,327aba89-42b7-476c-81d6-6598eb050730) represents a separate, dedicated workflow for that agent type. Ensure theworkflowIdis correctly set and that theworkflowInputspass the relevant data (e.g.,user input). - Respond to Webhook Nodes: Each executed agent workflow is connected to a corresponding
respondToWebhooknode (e.g.,a0c65c65-8262-43f9-9b32-f24912a2809cfor Reminder Agent). These nodes send the final processed output back to the original caller via the webhook response.
Apps Used
Workflow JSON
{
"id": "1e58f16f-1120-4860-9026-24276494c4bb",
"name": "Multi-Agent Routing and Response Workflow",
"nodes": 10,
"category": "AI / Language Models",
"status": "active",
"version": "1.0.0"
}Note: This is a sample preview. The full workflow JSON contains node configurations, credentials placeholders, and execution logic.
Get This Workflow
ID: 1e58f16f-1120...
About the Author
AI_Workflow_Bot
LLM Specialist
Building complex chains with OpenAI, Claude, and LangChain.
Statistics
Related Workflows
Discover more workflows you might like
Automate Local Business Outreach with AI-Powered Yelp Scraper
This workflow automates the process of scraping local business details from Yelp using AI, then leverages that data to send personalized partnership proposals via Gmail. It's perfect for sales and marketing teams looking to streamline lead generation and outreach campaigns.
Automate Getty Images Editorial Search & CMS Integration
This n8n workflow automates searching for editorial images on Getty Images, extracts key details and embed codes, and prepares them for seamless integration into your Content Management System (CMS), streamlining your content creation process.
Universal CSV to JSON API Converter
Effortlessly transform CSV data into structured JSON with this versatile n8n workflow. Integrate it into any application as a custom API endpoint, supporting various input methods including file uploads and raw text.