Overseas access: www.kdjingpai.com
Bookmark Us
Current Position:fig. beginning " AI How-Tos

Dify Workflow Modularization Challenges and Solutions: An In-Depth Look at the Chatflow Invoker Plugin

2025-08-25 1.2 K

Dify As an open-source LLM application development platform, with its ability to develop applications from the Agent Build, AI workflow organize RAG The all-encompassing capabilities of retrieval and model management have gained traction in the developer community. It is known for its elegant design and smooth experience, while the development team's amazing iterative speed keeps its features improving.

However, as the complexity of application scenarios increases, the Dify A core limitation in workflow orchestration is becoming apparent: the platform does not currently support multiple Chatflow orchestration and inter-calls between them. This means that all business logic must be integrated in a single Chatflow canvas. As the logic becomes complex, this canvas will expand rapidly, leading to a dramatic decrease in maintainability.

(go ahead and do it) without hesitating Dify Provides a way to combine Chatflow convert Workflow and published as a workaround for Tool nodes, but the approach suffers from two key flaws:

  • Streaming output is not possible: Called as a tool node Workflow unsupported Chatflow Native Streaming Output capability. This is at the expense of the user experience, especially in conversational applications that require immediate feedback.
  • Multiple output nodes are not supported:: Workflow s single output limits its use in complex data processing and branching logic scenarios.

In order to break through these limitations, community developers have launched a program called Chatflow Invoker plugin. It allows to convert any local or remote Chatflow encapsulated as a separate node in the process, realizing cross Chatflow This effectively enhances the modularity, flexibility, and maintainability of AI application development.

Chatflow Invoker The core strength of the plugin is:

  • realization Chatflow modularity: Complex business logic can be broken down into multiple independent Chatflow unit, significantly improving the reusability of the logic.
  • Supports cross Chatflow invocations: In different Chatflow Data and instructions can be easily transferred between them, enabling more flexible business processes.
  • Maintaining the full streaming output experience: Even across Chatflow The native streaming output feature can still be retained in the calling scenario, which guarantees the end-user interaction experience.

Usage

Chatflow Invoker Supports both local and remote calling modes , covering the different needs of single instance and distributed deployment .

Local Chatflow Calls

The local call applies to calls made in the same Dify Instances internally have a different Chatflow Make the choreography.

Input Parameters:

  • APP ID(Required): Objective Chatflow The ID can be retrieved from the Dify directly from the application's URL.
  • Prompt(Required): Send to target Chatflow of the query or command.
  • Inputs JSON(optional): a JSON-formatted string to be passed to the Chatflow Input parameters for the start node.
  • Conversation ID(optional): the session ID used to maintain multiple rounds of dialog. if you need to continue the interaction based on the previous dialog history, you must provide the conversation_idThe

Operational Steps:

  1. localization target Chatflow (used form a nominal expression) APP ID. For example https://dify/app/f011f58c-b1ce-4a9b-89b2-f39fce8466a8/workflow In this URL, the f011f58c-b1ce-4a9b-89b2-f39fce8466a8 just like APP IDThe
  2. exist Chatflow Invoker Configuration in the node Inputs JSON parameter to define the variables to be received.
  3. In the reply node, make sure to select stream_output variable to receive and pass downstream the results of the streaming output.
  4. Execute the test and you can see that the plugin successfully calls another Chatflow , and returns the streaming output content in its entirety.

Remote Chatflow Calls

The remote call functionality is further extended with Dify application boundaries, allowing users to build applications that span different Dify Instances of distributed AI applications.

Input Parameters:

  • URL(Required): Remote Dify The message API address of the instance, for example http://127.0.0.1:5001/v1/chat-messagesThe
  • API Key(Required): Objective Chatflow The API access key for the
  • Prompt(Required): The query or command to send.
  • User(Required): A character string used to identify the end user for subsequent log retrieval and usage statistics.
  • Inputs JSON(optional): passes to the Chatflow Input parameters for the start node.
  • Conversation ID(Optional): The session ID used to maintain the status of a multi-round dialog.

Operational Steps:

  1. In the remote that needs to be called Chatflow The "Access API" menu in the API KeyThe
  2. connect a remote Dify and the generated API address of the API Key fill in Chatflow Invoker The corresponding field of the plugin.
  3. importation Prompt and execute, you can realize remote calls while maintaining streaming output.

An added benefit of remote calls over local calls is that all call logs are recorded in the called Dify The instance leaves a full log for debugging and monitoring.

Development Description

Currently, for Dify There is relatively little reference documentation for developing plugins, and AI models lack relevant training data. However.Dify The official code repository provides a wealth of plugin samples and is a great resource for learning and development.

exist Chatflow Invoker During the development of the app-selector The component lets the user choose through an interface Chatflow, but the component was flawed in the tool node scenario, which prevented the application from being selected. Therefore, the final approach was to manually fill in the APP ID way as an alternative.

Chatflow Invoker The plugin is now available in the Dify The official plugin marketplace is online, so users can search and install it directly. The source code is also available on GitHub.

Source URL: https://github.com/yzddmr6/chatflow_invoker

Recommended

Can't find AI tools? Try here!

Just type in the keyword Accessibility Bing SearchYou can quickly find all the AI tools on this site.

Top

en_USEnglish