Differences Between Workflow and Chatflow
A detailed analysis of the functional differences and application scenarios of Workflow and Chatflow in the Dify platform, helping users choose the appropriate flow type
Note
Original Article
一个无人问津的小站 - Lesson 03: The Differences Between Workflow and Chatflow in DIFY
The biggest difference between Chatflow and Workflow is whether there's a conversation scenario. This leads to several functional differences in DIFY's design.
Differences in Starting Points
Chatflow provides support for conversation-related features, such as conversation ID, number of conversation turns, etc. These are not available in Workflow.
Differences in LLM Node Memory
Since Chatflow is used for conversations, the system's built-in conversation context (the memory settings area shown in the image below) allows you to configure the context length in the LLM node. Workflow doesn't have memory configuration, which means each Workflow run is a completely fresh start.
Chatflow Session Variables
Chatflow has session variables that are associated with the conversation ID. In multiple rounds of dialogue with the same conversation ID, session variables can be referenced, assigned, and modified. Workflow doesn't have these features.
Workflow Batch Processing
Since Workflow doesn't have the concept of a conversation ID, each process call runs independently. Therefore, in the application's web interface, there are clear differences between Workflow and Chatflow.
- Chatflow provides interaction through conversations.
- Workflow provides interaction through tasks.
This is the Workflow interaction interface, which provides batch processing interaction.
This is the Chatflow interaction interface, which provides conversational interaction.
Workflow as a Tool
This is a feature unique to Workflow. Since each call runs independently, it can be packaged as a tool and called in other processes (Workflow/Chatflow). This allows you to publish some common functions as tools, making future maintenance easier and shortening the main process. At the same time, if paired with the new Agent node in version 1.0, you might have even more different ways to use it.
For example, I packaged some context message processing Workflows as a tool. In future processes, this Workflow can be referenced directly.