OpenAI Tools Agent
OpenAI Tools Agent answers each message with the AI model you connect and, when it needs to, uses the available tools (searching the internet, querying a database, calling another service) before answering. It needs a model that supports tool calling.
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 up external information through tools before answering.
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. |
| 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; if it does not, the component fails. Default: {input}. |
Advanced options
| Field | What it does |
|---|---|
| Chat History | Connection for the earlier messages of the conversation, for example from Chat Memory, so the agent takes them into account. |
| 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 | When on, the model answers in one piece instead of word by word. Default: off. |
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 travel agency Destino Sur wants an assistant that checks the weather before recommending plans:
- Connect Chat Input to Input and an AI model to Model.
- Connect an internet search tool to Tools.
- In System Prompt, write: “You are Destino Sur’s assistant. Before recommending outdoor activities, check the weather forecast.”
- Connect Response to Chat Output.
When a customer asks what to do at the weekend in Granada, the agent looks up the forecast and suggests suitable plans.
Good practices
- Connect only the tools the agent needs: the fewer it has, the better it chooses.
- Explain in System Prompt when each tool should be used.
Related components
- Agent: the recommended agent for new flows.
- Tool Calling Agent: an equivalent agent with more options.