I’m currently trying to develop a custom node that can be used as a tool by an AI agent.
I managed to go through your documentation on how to Build a programmatic-style node.
My custom nodes are working, and the next step I’m looking into is allowing the AI agent to use them.
I found how to link them to the tool used by the AI agent by adding the value usableAsTool: true, in my CustomNode.node.ts file.
Encountered Error
Sadly, when I test my workflow, I get the following error:
I looked into it, and here’s what I’ve tried so far.
I install the n8n-nodes-searxng to test if installing a community nodes will work and it was working for me.
What I tried was installing my node as a community node, but only locally, by creating the node’s repository in ~/.n8n, adding the following line to package.json: n8n-nodes-friendgrid: "C:/Users/<MyUser>/n8n-nodes-friendgrid"
and then running npm install inside the directory.
Right now the error message is still the same but the name of the tool called is different.
Thanks for posting this update. I also ran into this issue and had long long debugging sessions to fix my nodes. I created subnodes with xxxTool name, tried implementing langchain Tool, tried implementing supplyData() to no luck.
I didn’t know this is gated behind a check. It looks like there is now also a env variable that we can set: N8N_COMMUNITY_PACKAGES_ALLOW_TOOL_USAGE