Multi-AI agent router: compare OpenAI, Anthropic & Groq responses with webhooks
Needs changesNeeds changes. This template uses 1 thing(s) that n8n 3.0 removes: AI Agent v1 (old agent modes). 1 breaking item(s) found. Static check, last run 2026-10-19.
What to replace before upgrading
| Removed in 3.0 | Replace with |
|---|---|
| AI Agent v1 (old agent modes) OpenAI Agent (v1.7), Anthropic Agent (v1.7), Groq Agent (v1.7) | Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent. |
Nodes used (11)
- Structured Output Parser
@n8n/n8n-nodes-langchain.outputParserStructured - Webhook
n8n-nodes-base.webhook - Edit Fields (Set)
n8n-nodes-base.set - Code
n8n-nodes-base.code - Switch
n8n-nodes-base.switch - AI Agent
@n8n/n8n-nodes-langchain.agent - Merge
n8n-nodes-base.merge - Respond to Webhook
n8n-nodes-base.respondToWebhook - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - Groq Chat Model
@n8n/n8n-nodes-langchain.lmChatGroq - Anthropic Chat Model
@n8n/n8n-nodes-langchain.lmChatAnthropic
What it does
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.