Quote

The latest n8n update brought three important features to AI Agent, a node that allows you to integrate artificial intelligence into workflows. Developers and automators can now:

- Configure the Fallback Model in case of a basic error,

- Select a model for a specific task (Model Selector),

- Create chains of multiple AI Agents for complex scenarios.

Let's take a closer look at each of these features.

1. Fallback Model: a backup model in case of an error

The problem:

Previously, if the main model (for example, OpenAI GPT-4) gave an error or was not available, the whole process could be interrupted.

Solution:

You can now specify a Fallback Model in the AI Agent. If the first model fails, n8n will automatically switch to a backup option (for example, Anthropic Claude or local Llama 3).

Example of use:

- Main model: GPT-4-Turbo (fast and accurate, but expensive)

- Fallback Model: Mixtral 8x7B (less expensive, but slightly slower).

If GPT-4 does not respond for some reason, the request will automatically go to Mixtral and the workflow will not stop.

2. Model Selector: choosing a model for a specific task

The problem:

Different tasks require different models. For example:

- GPT-4 is better suited for text analysis.

- Claude 3 Opus for code generation.

- For cheap mass requests — Mistral 7B.

Previously, you had to manually switch models or create difficult conditions.

Solution:

AI Agent now has Model Selector, a tool that allows you to set the conditions for selecting a model.

Example of use:

If (the request contains “code”) → use Claude 3.

Otherwise, if (the query is complex) → use GPT-4.

Otherwise → use Mistral.

This allows us to optimize costs and improve the quality of responses.

3. AI Agent Chains: Connecting Agents to Each Other

The problem:

Complex tasks (for example, analysis → refinement → verification) required several separate nodes, which made workflow more complicated.

Solution:

AI Agent can now be connected to another AI Agent as a tool. This allows you to create sequential processing chains.

Example of use:

1. The first agent (GPT-4) analyzes the text.

2. The second agent (Claude 3) tests the logic.

3. A third agent (Llama 3) formats the response.

Thus, it is possible to build complex AI pipelines right inside the n8n.

Conclusion: powerful AI Orchestration in n8n

These three innovations make AI Agent an even more flexible tool for:

- Fallback Model,

- Cost and quality optimization (Model Selector),

- Creating complex AI chains (embedded agents).

With this update, n8n is becoming a powerful tool for AI orchestration, allowing you to combine different models and approaches in one workflow.  

Читайте также