npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

n8n-nodes-agent-fallback

v0.1.4

Published

AI Agent node for n8n with automatic multi-model failover and retry mechanisms

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_memory buffer 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)

  1. Go to Settings > Community Nodes.
  2. Click Install a community node.
  3. Enter n8n-nodes-agent-fallback and click Install.

In Self-Hosted Docker / Custom Installation

npm install n8n-nodes-agent-fallback

Canvas 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 extracts chatInput, text, or prompt from 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 build

Run Tests

npm test

Publish to npm

npm publish --access public

License

MIT