Building tools
Tools act as interfaces to external capabilities, enabling agents to interact with systems, retrieve data, run calculations, or trigger workflows that go beyond their built-in reasoning. You can build new tools and edit existing tools for your agents to use.
What is a tool?
A tool is a modular, callable function that agents use to complete specific actions. You can think of tools as functional extensions that allow agents to move from planning to execution. For example, they enable an agent to query a database, send an email, generate a report, or call an API.
Each tool is:
- Defined by a schema: Clear input and output formats make them easy for agents to use.
- Purpose-built: Designed for specific tasks like sending emails, querying databases, or generating reports.
- Reusable: Can be shared across agents.
- Secure: Controlled access helps ensure safe and auditable execution.
How an agent uses tools
An agent uses tools to complete a goal or task. To complete the task of generating and sending a weekly sales report, the agent follows a multi-step workflow that uses tools:
- The agent uses a data-upload tool to access the latest sales data.
- The agent then uses a report-generation tool to format the data into a structured report.
- The agent uses an email-sending tool to deliver the report to the intended recipients.
Each step is automated and uses tools, allowing the agent to complete the task autonomously without manual intervention.
Following are the different ways to add a tool:
Creating agentic workflows
Agentic workflows are reusable structures that agents can use to run a series of activities. These activities include prompting users for input, running custom code, and controls that direct how the agentic workflow progresses. Instead of handling each step manually, agents can use an agentic workflow to manage the entire process from start to end. To learn more, see Creating agentic workflows.
Adding tools to an agent
Tools can be added directly to an agent from the catalog or a local instance:
Catalog
A catalog is a collection of prebuilt tools that you can add to your agent. These tools extend the agent’s capabilities without extra development. Catalog tools provide consistency, allow faster setup, and can be reused across multiple workflows.
Local instance
A local instance is a workspace that contains tools you already have, such as imported tools, tools added from the catalog, or tools created and uploaded with the CLI. Tools from a local instance can be reused without being created or imported again.
To learn more about adding tools directly to your agent, see Managing tools from an agent.
Importing external tools
You can also import external tools into watsonx Orchestrate with the following methods:
MCP server
A Model Context Protocol (MCP) server is a service that provides external tools which agents can use to complete tasks. By importing tools from an MCP server, you can expand your agent’s capabilities without creating tools manually. To learn more, see Importing tools from an MCP server.
OpenAPI
OpenAPI is a standard format for defining REST APIs. It describes the available endpoints, request methods, input parameters, and response types. By importing an OpenAPI specification, you can quickly create tools from existing APIs without manually defining each operation. To learn more, see Importing tools from an OpenAPI specification.
Using the Agent Development Kit (ADK)
The Agent Development Kit (ADK) provides a flexible framework for building and importing custom tools into watsonx Orchestrate. You can add Python tools and Langflows tools to watsonx Orchestrate.
- Python tools: Use Python tools to define custom logic that use Python functions. These tools are ideal for tasks such as data processing, API integration, or executing business logic. With the ADK, you can package Python scripts as tools and upload them to your workspace, making them available for reuse across agents.
- Langflow tools: Langflow assembles AI components into a data pipeline to generate responses within a single turn of a conversation. Use Langflow to build AI pipelines and import them into watsonx Orchestrate, making them available for reuse across agents. For more information about langflow tool and ADK, see Authoring Langflow tools.
To get started with the ADK, see Agent Development Kit.
-
An agentic workflow can be added to define a set of linked activities and controls that are designed to achieve a specific business purpose or goal.
-
OpenAPI tools can be added to the system and used by agents to complete complex operations.
-
Import external tools using MCP servers and manage your MCP connections.