The WorkflowTools toolkit enables Agents to execute, analyze, and reason about workflow operations. This toolkit integrates with Workflow and provides a structured approach for running workflows and evaluating their results.
The toolkit implements a “Think → Run → Analyze” cycle that allows an Agent to:
- Think through the problem and plan workflow inputs and execution strategy
- Execute the workflow with appropriate inputs and parameters
- Analyze the results to determine if they are sufficient or if additional workflow runs are needed
This approach significantly improves an Agent’s ability to successfully execute complex workflows by giving it tools to plan, execute, and evaluate workflow operations.
The toolkit includes the following tools:
think: A scratchpad for planning workflow execution, brainstorming inputs, and refining approaches. These thoughts remain internal to the Agent and are not shown to users.
run_workflow: Executes the workflow with specified inputs and additional parameters.
analyze: Evaluates whether the workflow execution results are correct and sufficient, determining if further workflow runs are needed.
Reasoning is not enabled by default on this toolkit. You can enable it by setting enable_think=True and enable_analyze=True.
Example
Here’s an example of how to use the WorkflowTools toolkit:
Here is how you can configure the toolkit:
Async Support
The WorkflowTools toolkit supports both synchronous and asynchronous workflow execution: