Skip to main content
In this tutorial, you learn how to use Langflow flows in your watsonx Orchestrate agents. To follow this tutorial, make sure you have access to a watsonx Orchestrate environment that supports Langflow integration. Follow these steps to use watsonx Orchestrate with Langflow:
1

Set up your environment

Create a folder named watsonx_orchestrate_and_langflow to store all agents and tools.
Folder structure
2

Install watsonx Orchestrate ADK and activate your environment

To install watsonx Orchestrate ADK, run:
For more information about installing watsonx Orchestrate ADK, see Setting up and installing the ADK.To add and activate your environment, run:
IBM Cloud
The environment name is flexible—you can choose whatever you prefer. The service instance URL and environment type, however, must match your specific setup. For more information, see Getting credentials for your environments.
Note: To use watsonx Orchestrate Developer Edition as your environment, install it first. Then, start it using the --with-langflow flag to enable Langflow integration. For more information, see Installing watsonx Orchestrate Developer Edition.
3

Create a Langflow flow

Langflow flows convert into tools for watsonx Orchestrate. You create a flow in the Langflow visual editor and export it as JSON to import as a tool. You can access the Langflow visual editor as a standalone tool or through watsonx Orchestrate Developer Edition, which runs on port 7861.For this tutorial, use the following prebuilt Langflow flow. It extracts actionable tasks from unstructured text such as meeting notes, transcripts, or chat logs. It identifies who needs to do what and by when, using pattern-based heuristics.Copy the following JSON code block and save it as transcripts_action_item_extractor.json in your tools folder.
transcripts_action_item_extractor.json
4

(Optional) Test Langflow flow in the visual editor

You can test the Langflow flow in the Playground of the Langflow visual editor. To do this:
  1. Open the Langflow visual editor.
  2. Click Upload a flow.
  3. Import the transcripts_action_item_extractor.json file.
  4. Click Playground.
  5. Test the Langflow flow.
Example

Langflow chat example

5

Import your Langflow flow into watsonx Orchestrate

To import your Langflow flow as a tool into watsonx Orchestrate, run:
BASH
6

Add a tool to an agent

After importing your Langflow flow as a tool, add it to an agent. Copy the following agent definition to create a new agent that uses the Langflow flow tool. Save it as langflow_agent.yml in your agents folder.
langflow_agent.yml
Then import the agent using:
ADK CLI command
7

Use your Langflow tool

To use your Langflow tool in the chat UI, go to the langflow_agent.
Example

Langflow and watsonx Orchestrate chat example