Tools are used to connect your agent to external systems or inline code supplied to the agent. This allows your agent to interact with other systems to fetch, update, format, or analyze information. Sections on this page describe various types of tools that are supported.
Create a tool
To create a tool:
- Click the tool icon on the right side of the agent builder.
- Select a tool type (see descriptions of tool types in this document).
- Provide the requested information for the tool.
- Use snake case for the tool name.
- Tool descriptions are supplied to agent models.
Use a tool in an agent
After creating a tool, you need to instruct a particular agent to use the tool.
- Hover over an agent.
- Click Add tool.
- Select a tool.
- Describe how the tool should be used in your agent instructions.
Test a tool
Before using a tool in your agent, you can test the tool in the console:
- Open the tool panel.
- Click the Test Tool button at the top of the panel.
Provide input for the tool as defined by the tool schema. For example, if the schema is JSON with
placeandcityproperties, you could use the following input:{ "place": "automobile repair center", "city": "austin texas" }Click Submit. The tool is executed with the input, and the output is populated.
After directly testing the tool, you can also test the tool by using Preview agent.
Available tools
The following tools are available:
| Tool | Description |
|---|---|
| Agent as a tool | Reuse capabilities of agents without handing off to another agent. |
| Client function tools | Code tools that are executed on the client side, not by the agent. |
| Data store tools | Provide AI-generated agent responses based on website content and uploaded data. |
| File search tools | Upload file or provide RAG knowledge base to an agent. |
| Google Search tools | Connect your agent the power of grounding with Google Search. |
| Integration Connector tools | Create tools that utilize your configured Connections. |
| MCP tools | Connect to a MCP server. |
| OpenAPI tools | Connect to an external API using an OpenAPI schema. |
| Python code tools | Provide Python code as a tool for your agent. |
| Salesforce tools | Connect your agent to a Salesforce instance. |
| Service Now tools | Connect your agent to a Service Now instance. |
| System tools | Built-in tools that can be used by the agent to perform common tasks. |
| Widget tools | Flexible widget tools to create rich user interactions. |
Execution type
Tools support two execution types: asynchronous (non-blocking) and synchronous (blocking). Selecting the appropriate execution type depends on the latency of the tool and the desired agent experience. This setting is available in the Advanced tab of tool configuration.
Synchronous execution type
This type should be used when the tool execution should block agent response generation until the tool response is available. The agent will not generate any response until the tool response is available. These tools should ideally have low latency (less than 5 seconds) to keep overall agent response latency low.
Asynchronous execution type
This type should be used for non-blocking execution of tools. When a tool call is triggered, the agent will proceed with a "pending" response. The agent can continue talking to the user while the tool response is being fetched. Once the response is available, it is added to the context the next time an agent response is generated. Ideally used for tools with 5-60 second response latencies.
Conversation flow for asynchronous execution type:
- Agent triggers function call: The agent triggers a function call and is waiting for response. For example, invoke order status tool.
- Tool pending response:
The tool immediately returns a
function_responsecontaining a pending status, such as"status": "pending". - Agent handles pending tool: The agent should be instructed to handle pending responses as desired. Example instruction: "Ask the user if they have any other questions while you are fetching order status". Example agent response: "Is there anything else I can do for you while I fetch your order status?".
Agent handles final response: The actual tool response is available for the agent. This will be included as a context tag. For example:
<context>function [<tool_name>] completed with response <response JSON></context>
Best practices
Use the following best practices for tools:
- Always write semantically meaningful tool names that are relevant to the task they perform.
- Always provide high quality descriptions of your tools and the task or tasks they are capable of achieving.
- For asynchronous tools,
include detailed instructions for the following scenarios:
- Let the agent know that
is an asynchronous tool and will initially return a pending response. - Include instructions for how the agent should respond when the tool returns "pending".
- Include instructions for how the agent should respond when the actual tool response is available.
- Include instructions for how the agent should respond if the tool returns an error.
- Let the agent know that