What's a tool in AI?#
In AI, 'tools' has a specific meaning. Tools act like addons that your AI can use to access extra context or resources.
Here are a couple of other ways of expressing it:
Tools are interfaces that an agent can use to interact with the world (source)
We can think of these tools as being almost like functions that your AI model can call (source)
AI tools in n8n#
n8n provides tool sub-nodes that you can connect to your AI agent. As well as providing some popular tools, such as Wikipedia and SerpAPI, n8n provides three especially powerful tools:
- Custom n8n Workflow Tool: use this to load any n8n workflow as a tool.
- Custom Code Tool: write code that your agent can run.
- HTTP Request Tool: make calls to fetch a website or data from an API.
The next three examples highlight the Custom n8n Workflow Tool:
You can also learn how to let AI dynamically specify parameters for tools with the $fromAI()
function.