Dify Workflow
Learn about Dify workflow development
🤔 Chatflow & Workflow: What's the differences?
In Dify's advanced application types, there are Chatflow and Workflow. Chatflow behaves more like a chatbot, that is, a robot that can interact with users in a loop; while Workflow behaves more like a script, which is only executed once when called and is usually used as the application backend.
You need to choose the appropriate application type according to the application scenario you are building. In this demonstration, we will choose the Workflow type.
🌰 In a nutshell:
Feature | Chatflow | Workflow |
---|---|---|
Trigger | Initiated by user messages and continues in a loop | Invoked once per API call, completes then stops |
Interaction model | Conversational, multi-turn | One-shot script-like execution |
State management | Maintains context across turns | Stateless except for inputs/outputs of a single run |
Best suited for | Front-end chat experiences, support bots | Back-end automation, data processing pipelines |
Response format | Natural language text, rich cards | Structured JSON or other machine-readable payload |