Skip to main content

Multi-AI agent router: compare OpenAI, Anthropic & Groq responses with webhooks

Workflow preview

Workflow preview
100%
Multi-AI agent router: compare OpenAI, Anthropic & Groq responses with webhooks preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

Introduction This workflow connects to OpenAI, Anthropic, and Groq, processing requests in parallel with automatic performance metrics. Ideal for testing speed, cost, and quality across models. How...

Best for

  • Engineering automation workflows
  • AI Summarization automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

@n8n/n8n-nodes-langchain.outputparserstructured, n8n-nodes-base.webhook, n8n-nodes-base.set, n8n-nodes-base.code, n8n-nodes-base.switch, @n8n/n8n-nodes-langchain.agent, n8n-nodes-base.merge, n8n-nodes-base.respondtowebhook

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Cheng Siong Chin.

Original n8n.io source

1.1 Workflow description

Title
Multi-AI agent router: compare OpenAI, Anthropic & Groq responses with webhooks
Workflow name
Multi-AI agent router: compare OpenAI, Anthropic & Groq responses with webhooks

Introduction

This workflow connects to OpenAI, Anthropic, and Groq, processing requests in parallel with automatic performance metrics. Ideal for testing speed, cost, and quality across models.

How It Works

Webhooks trigger parameter extraction and routing. Three AI agents run simultaneously with memory and parsing. Responses merge with detailed metrics.

Workflow Template

Webhook → Extract Parameters → Router ├→ OpenAI Agent ├→ Anthropic Agent ├→ Groq Agent → Merge → Metrics → Respond

Workflow Steps

  1. Webhook receives POST with prompt and settings.
  2. Parameters extracted and validated.
  3. Router directs by cost, latency, or type.
  4. AI agents run in parallel.
  5. Results merged with metadata.
  6. Metrics compute time, cost, and quality.
  7. Response returns outputs and recommendation.

Setup Instructions

  1. Activate Webhook with authentication.
  2. Add API keys for all providers.
  3. Define models, tokens, and temperature.
  4. Adjust Router logic for selection.
  5. Tune Metrics scoring formulas.

Prerequisites

  • n8n v1.0+ instance
  • API keys: OpenAI, Anthropic, Groq
  • HTTP client for testing

Customization

Add providers like Gemini or Azure OpenAI. Enable routing by cost or performance.

Benefits

Auto-select efficient providers and compare model performance in real time.

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Output Parser

Type / Role
@n8n/n8n-nodes-langchain.outputParserStructured - outputParserStructured
Config choices
Version 1.2

Block 2 - Output Parser2

Type / Role
@n8n/n8n-nodes-langchain.outputParserStructured - outputParserStructured
Config choices
Version 1.2

Block 3 - Webhook

Type / Role
n8n-nodes-base.webhook - webhook
Config choices
Version 2

Block 4 - Extract Input Parameters

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 5 - Dynamic LLM Router

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 6 - Route to Provider

Type / Role
n8n-nodes-base.switch - switch
Config choices
Version 3.2

Block 7 - OpenAI Agent

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 1.7

Block 8 - Anthropic Agent

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 1.7

Block 9 - Groq Agent

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 1.7

Block 10 - Merge Results

Type / Role
n8n-nodes-base.merge - merge
Config choices
Version 3

Block 11 - Calculate Performance Metrics

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 12 - Respond to Webhook

Type / Role
n8n-nodes-base.respondToWebhook - respondToWebhook
Config choices
Version 1.1

Block 13 - OpenAI Model

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenAi - lmChatOpenAi
Config choices
Version 1

Block 14 - Output Parser1

Type / Role
@n8n/n8n-nodes-langchain.outputParserStructured - outputParserStructured
Config choices
Version 1.2

Block 15 - Groq Model

Type / Role
@n8n/n8n-nodes-langchain.lmChatGroq - lmChatGroq
Config choices
Version 1

Block 16 - Anthropic Model

Type / Role
@n8n/n8n-nodes-langchain.lmChatAnthropic - lmChatAnthropic
Config choices
Version 1

Block 17 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 18 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

3. Summary Table

Workflow Multi-AI agent router: compare OpenAI, Anthropic & Groq responses with webhooks
Complexity advanced
Nodes 18
Categories Engineering, AI Summarization
Author Cheng Siong Chin
Published 29 Oct 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/10287/10287.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Multi-AI agent router: compare OpenAI, Anthropic & Groq responses with webhooks do?

Introduction This workflow connects to OpenAI, Anthropic, and Groq, processing requests in parallel with automatic performance metrics. Ideal for testing speed, cost, and quality across models. How...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Engineering, AI Summarization use case.