Dify App
Dify is made for agentic app building. In Studio, you can quickly build agentic workflows via a drag & drop interface and publish them as apps. You can access published apps via API, the web, or as an MCP server. Dify offers two main app types: workflow and chatflow. You will need to choose an app type when creating a new app.We recommend choosing Workflow or Chatflow your app type. But in addition to these, Dify also offers 3 more basic app types: Chatbot, Agent, and Text Generator.
These app types run on the same workflow engine underneath, but comes with simpler legacy interfaces:


Workflow
Build workflow apps to handle single-turn tasks. The webapp interface and API provides easy access to batch execute many tasks at once.Underneath it all, workflow forms the basis for all other app types in Dify.
- User Input: Direct user interaction or API call invokes the app.
- Trigger: The application runs automatically on a schedule or in response to a specific third-party event.
Only workflows started by User Input can be published as standalone web apps or MCP servers, exposed through backend service APIs, or used as tools in other Dify applications.
Chatflow
Chatflow is a special type of workflow app that gets triggered at every turn of a conversation. Other than workflow features, chatflow comes with the ability to store and update custom conversation-specific variables, enable memory in LLM nodes, and stream formatted text, images, and files at different points throughout the chatflow run. Unlike workflow, chatflow can’t use Trigger to start.Dify DSL
All Dify apps can be exported into a YAML file in Dify’s own DSL (Domain-Specific Language) and you may create Dify apps from these DSL files directly. This makes it easy to port apps to other Dify instances and share with others.Variables
A variable is a labeled container to store information, so you can find and use that information later by referencing its name. You’ll come across different types of variables when building a Dify app: Inputs: You can specify any number of input variables at the User Input node for your app’s end users to fill in.
- Workflow
- Chatflow
| Variable Name | Data Type | Description | Notes |
|---|---|---|---|
sys.user_id | String | User ID: A unique identifier automatically assigned by the system to each user when they use a workflow application. It is used to distinguish different users. | |
sys.app_id | String | App ID: A unique identifier automatically assigned by the system to each App. This parameter is used to record the basic information of the current application. | This parameter is used to differentiate and locate distinct Workflow applications for users with development capabilities. |
sys.workflow_id | String | Workflow ID: This parameter records information about all nodes information in the current Workflow application. | This parameter can be used by users with development capabilities to track and record information about the nodes contained within a Workflow. |
sys.workflow_run_id | String | Workflow Run ID: Used to record the runtime status and execution logs of a Workflow application. | This parameter can be used by users with development capabilities to track the application’s historical execution records. |
sys.timestamp | String | The start time of each workflow execution. |


Variable Referencing
You can easily pass variables to any node when configuring its input field by selecting from a dropdown:
/ slash, and selecting the desired variable from the dropdown.
