Tools AI Agent node
The Tools Agent uses external tools and APIs to perform actions and retrieve information. It can understand the capabilities of different tools and determine which tool to use depending on the task. This agent helps integrate LLMs with various external services and databases.
This agent has an enhanced ability to work with tools and can ensure a standard output format.
The Tools Agent implements Langchain’s tool calling interface. This interface describes available tools and their schemas. The agent also has improved output parsing capabilities, as it passes the parser to the model as a formatting tool.
Refer to AI Agent for more information on the AI Agent node itself.
You can use this agent with the Chat Trigger node. Attach a memory sub-node so that users can have an ongoing conversation with multiple queries. Memory doesn’t persist between sessions.
This agent supports the following chat models:
Available tools
The Tools Agent can use the following tools:
Node parameters
Configure the Tools Agent using the following parameters.
Prompt
Select how you want the node to construct the prompt (also known as the user’s query or input from the chat).
Choose from:
Take from previous node automatically: If you select this option, the node expects an input from a previous node called
chatInput.Define below: If you select this option, provide either static text or an expression for dynamic content to serve as the prompt in the Prompt (User Message) field.
Require Specific Output Format
This parameter controls whether you want the node to require a specific output format. When turned on, n8n prompts you to connect one of these output parsers to the node:
Node options
Refine the Tools Agent node’s behavior using these options:
System Message
If you’d like to send a message to the agent before the conversation starts, enter the message you’d like to send.
Use this option to guide the agent’s decision-making.
Max Iterations
Enter the number of times the model should run to try and generate a good answer from the user’s prompt.
Defaults to 10.
Return Intermediate Steps
Select whether to include intermediate steps the agent took in the final output (turned on) or not (turned off).
This could be useful for further refining the agent’s behavior based on the steps it took.
Automatically Passthrough Binary Images
Use this option to control whether binary images should be automatically passed through to the agent as image type messages (turned on) or not (turned off).
Enable Streaming
When enabled, the AI Agent sends data back to the user in real-time as it generates the answer. This is useful for long-running generations. This is enabled by default.
Templates and examples
Refer to the main AI Agent node’s Templates and examples section.
Dynamic parameters for tools with $fromAI()
To learn how to dynamically populate parameters for app node tools, refer to Let AI specify tool parameters with $fromAI().
Human review for tool calls
You can require human approval before the AI Agent executes specific tools. This is useful for tools that perform sensitive actions like sending messages, modifying records, or deleting data.
To add a human review step:
Click the tool connector on the AI Agent node.
In the Tools Panel, find the Human review section.
Select your preferred approval channel (Chat, Slack, Telegram, and more) and configure it.
Connect the tools that require approval to the human review step.
When the AI wants to use a gated tool, the workflow pauses and sends an approval request through your chosen channel. The recipient can approve (tool executes) or deny (action canceled).
For detailed setup instructions and best practices, refer to Human-in-the-loop for AI tool calls.
Common issues
For common questions or issues and suggested solutions, refer to Common issues.