Skip to content
How to integrate a ...
 
Notifications
Clear all

How to integrate a custom AI model with the AI Agent node?

5 Posts
5 Users
0 Reactions
5 Views
liquid36
(@liquid36)
Posts: 1
New Member
Topic starter
 

Hello everyone,

I'm currently working on a custom AI chat model named Cloudflare Chat Model. It functions flawlessly with nodes such as Basic LLM Chain and Summarization Chain. However, I'm encountering difficulties when attempting to integrate it with the AI Agent node.

Upon reviewing the source code, I discovered the following filter within the Agent.node.ts file:

specialInputs = [
    {
        type: 'ai_languageModel',
        filter: {
            nodes: [
                '@n8n/n8n-nodes-langchain.lmChatAnthropic',
                '@n8n/n8n-nodes-langchain.lmChatAwsBedrock',
                '@n8n/n8n-nodes-langchain.lmChatGroq',
                '@n8n/n8n-nodes-langchain.lmChatOllama',
                '@n8n/n8n-nodes-langchain.lmChatOpenAi',
                '@n8n/n8n-nodes-langchain.lmChatGoogleGemini',
                '@n8n/n8n-nodes-langchain.lmChatGoogleVertex',
                '@n8n/n8n-nodes-langchain.lmChatMistralCloud',
                '@n8n/n8n-nodes-langchain.lmChatAzureOpenAi',
                '@n8n/n8n-nodes-langchain.lmChatDeepSeek',
                '@n8n/n8n-nodes-langchain.lmChatOpenRouter',
                '@n8n/n8n-nodes-langchain.lmChatXAiGrok',
            ],
        },
    },
];

It appears that the AI Agent node is configured to only accept a specific list of models.
My question is: what is the procedure for registering or incorporating my custom model to ensure its compatibility with the AI Agent? Is there a recommended method for expanding this list or exposing a custom node to achieve seamless integration?

Thank you for your assistance!

 
Posted : 07/04/2025 1:21 am
likemo
(@likemo)
Posts: 1
New Member
 

I'm encountering the same problem when attempting to link my custom chat model node. It would be very helpful to find a resolution for this. Thank you.

 
Posted : 20/04/2025 9:54 pm
Michael_Rogers
(@michael_rogers)
Posts: 1
New Member
 

I'm also interested, as I'm looking to utilize a custom chat model.

 
Posted : 26/04/2025 11:10 pm
qazs
 qazs
(@qazs)
Posts: 1
New Member
 

I'm looking into doing something similar using NVIDIA NIM and am curious about how to attach a custom model to an agent.

 
Posted : 30/04/2025 5:48 am
jpvanoosten
(@jpvanoosten)
Posts: 4
New Member
 

Hi there! We currently need to filter the models within the Agent node this way, as we must exclusively permit chat-completion models. Traditional completion models are not compatible with the Agent node.

There isn't a feature available yet to filter by capabilities, which would be the ideal solution for this.

 
Posted : 02/06/2025 9:30 am
Share: