Tool Calling Agent
Tool Calling Agent answers each message with the AI model you connect and, when it needs to, uses the available tools (looking up information, querying a database, calling another service) before answering. On top of the tools you connect, it always has one for checking the current date and time.
It is an older component kept for compatibility with existing flows. For new flows, use Agent.
When to use it
- Maintaining existing flows built with this agent.
- An assistant that looks things up in external systems through tools before answering.
- An assistant that needs to know today’s date, for example to work out deadlines.
Configuration
| Connection | What to connect |
|---|---|
| Model (required) | The AI model that answers and decides which tools to use. |
| Tools | The tools the agent can use. |
| Chat History | The earlier messages of the conversation, for example from Chat Memory, so the agent takes them into account. |
| Field | What it does |
|---|---|
| Input | The user’s message, usually from Chat Input. |
| System Prompt | The agent’s instructions. Default: “You are a helpful assistant”. |
| Prompt | The template of the message the agent receives. It must contain {input}, which is replaced with the contents of Input. Default: {input}. |
| Executor Name | The name the agent appears under in the run log. Default: tool_calling_agent. |
Advanced options
| Field | What it does |
|---|---|
| Handle Parse Errors | If the model returns an answer in an unexpected format, the agent tries to recover instead of stopping. Default: on. |
| Verbose | Logs the agent’s steps in detail. Default: on. |
| Max Iterations | The maximum number of steps (tool calls) before stopping. Default: 15. |
| Disable Streaming | Makes the model deliver the whole answer at once instead of showing it as it is written. Default: off. |
| Early Stopping Method | What happens when Max Iterations is reached. With None (default) or force, the agent stops and answers with a notice that it has reached the step limit. Flows saved with the old generate option behave like force. |
Some older versions of the component do not show Executor Name or Early Stopping Method.
Using it as an agent tool
You can connect this component to an agent’s Tools input. In the Tool tab, Tool Name and Tool Description are the name and explanation the agent uses to recognise the tool and decide when to call it: write a clear description of what it does.
Output
- Response: the answer as a message. Connect it to Chat Output or to any component that takes text.
- Agent: the configured agent, to connect it to components that take an agent.
Example
The courier company Envíos Rápidos wants an assistant that reports the status of parcels:
- Connect Chat Input to Input and an AI model to Model.
- Connect the tool that looks up shipment status to Tools.
- In System Prompt, write: “You are Envíos Rápidos’ assistant. Ask for the tracking number and check its status before answering.”
- Connect Response to Chat Output.
When a customer gives their tracking number, the agent looks up the shipment and answers with its status and, if needed, how many days are left until delivery based on today’s date.
Good practices
- Connect only the tools the agent needs: the fewer it has, the better it chooses.
- If the agent stops before finishing long tasks, raise Max Iterations.
Related components
- Agent: the recommended agent for new flows.
- OpenAI Tools Agent: another older agent with tools.