Trigger a workflow as a tool
Learn how to create a tool from a workflow with Retool Agents.
| Agents Availability | |||
|---|---|---|---|
| Cloud | Public beta | ||
| Self-hosted Edge 3.234 or later | Public beta | ||
| Self-hosted Stable 3.253 or later | Public beta | ||
You can configure your agent to use a workflow as a tool. This is useful for users that already have a workflow that they want to leverage.
Using an agent as a tool does not copy the workflow—it creates a new trigger for the workflow. Any changes that you make to a workflow that is referenced as a tool persist in all uses of that workflow.
For example, a marketing team wants to create an agent that helps them with providing discount codes based on the item catalogue and inventory. If the team already has a workflow that retrieves the catalogue of clothing, they can use that workflow as a tool for your agent without needing to create a custom tool or new workflow.
Features
Key features of workflows as tools include:
- Minimize duplicate work by leveraging existing workflows.
- Share a single workflow between several agents.
- Use the workflow limits, which are longer than those of custom tools.
When a workflow is called by an agent, Retool triggers the workflow as if it was triggered by the first user with admin permissions in your organization. If the workflow requires access to user-authenticated resource, the workflow is run as if it was triggered by the authenticated user.
Requirements
Your workflow must meet the following requirements be used in an agent:
- It must be published.
- It must include a response block.
- It must not have path parameters or headers.