n8n-nodes-agent-fallback
v0.1.4
Published
AI Agent node for n8n with automatic multi-model failover and retry mechanisms
Maintainers
Readme
n8n-nodes-agent-fallback
An AI Agent Community Node for n8n with built-in automatic multi-model failover and retry mechanics.
Connect your Primary Chat Model and up to 5 Fallback Chat Models (e.g., OpenAI GPT-4o, Anthropic Claude 3.5 Sonnet, Google Gemini 1.5 Pro, Groq Llama 3, DeepSeek, etc.). If the primary provider fails due to rate limits (429), timeouts, quotas, server downtime, or context length limits, the node automatically catches the error and seamlessly continues execution with your fallback models.
Features
- 🎯 Primary Model + Up to 5 Fallbacks: Dedicated visual connectors in the canvas.
- 🛡️ Catch-All Resilient Failover: Handles HTTP 429, timeouts, token limits, and 5xx API errors.
- 🔁 Configurable Retries & Delay: Set max retries per model and delay between attempts.
- 🛠️ Full AI Agent Tool Calling: Connect multiple tools (
ai_tool) shared seamlessly across all models. - 🧠 Memory & History: Supports
ai_memorybuffer across runs. - 📦 Output Parsers: Structured JSON parsing with
ai_outputParser. - ⚡ 100% Transparent Output: Compatible drop-in replacement for standard n8n AI Agent workflows.
Installation
In n8n Community Nodes (UI)
- Go to Settings > Community Nodes.
- Click Install a community node.
- Enter
n8n-nodes-agent-fallbackand click Install.
In Self-Hosted Docker / Custom Installation
npm install n8n-nodes-agent-fallbackCanvas Connectors
| Connector | Type | Required | Description |
|---|---|---|---|
| Primary Model | ai_languageModel | Yes | Main LLM used for execution |
| Fallback Model 1 | ai_languageModel | No | First failover model if primary fails |
| Fallback Model 2 | ai_languageModel | No | Second failover model |
| Fallback Model 3 | ai_languageModel | No | Third failover model |
| Fallback Model 4 | ai_languageModel | No | Fourth failover model |
| Fallback Model 5 | ai_languageModel | No | Fifth failover model |
| Tools | ai_tool | No | Tools available to the agent |
| Memory | ai_memory | No | Chat conversation history |
| Output Parser | ai_outputParser | No | Structured output parser |
Node Parameters & Options
- Prompt Type:
Define Below: Write prompt directly or use expressions={{ $json.chatInput }}.Take From Previous Node: Automatically extractschatInput,text, orpromptfrom incoming items.
- Options:
System Message: Instructions defining agent persona and constraints.Max Retries per Model: Number of attempts on the same model before falling back (0-5).Delay Between Attempts (ms): Wait time in milliseconds before retry/fallback (default: 1000ms).Max Iterations: Maximum tool-calling loop iterations (default: 10).
Development & Publishing
Build
npm install
npm run buildRun Tests
npm testPublish to npm
npm publish --access public