Dify management and development
This topic describes the core workflow of using Dify in the AI-Native Database Service console, including entering a workspace, adding team members, configuring model services, and developing AI applications. It also covers routine instance management operations.
Prerequisites
-
A Dify instance is deployed and is in the Running state. For more information about how to deploy a Dify instance, see Deploy a Dify instance with one click or Create a Dify instance by using an existing database.
-
You have obtained the API key of a large language model (LLM) for connecting to model services in Dify. For more information, see Obtain an API key.
Enter the Dify workspace
-
Log on to the AI-Native Database Service console.
-
On the Dify tab, find the target Dify instance and click Open Dify. You are redirected to the Dify workspace.
Add team members
Dify supports multi-user collaboration. You can invite team members and assign different roles to them. In the Dify workspace, use the member management feature to add team members.
Roles and permissions
|
Role |
Permissions |
Applicable scenario |
|
Admin |
Has full management permissions on the workspace, including member management, application management, model configuration, and system settings. |
Team leaders or project managers. |
|
Developer |
Can create, edit, and debug AI applications, configure workflows and knowledge bases, but cannot manage members or modify system settings. |
Engineers responsible for AI application development. |
|
Ops |
Can view the running status, logs, and monitoring data of applications, but cannot modify application configurations. |
O&M engineers responsible for application maintenance. |
|
Guest |
Can only use published AI applications. Cannot view or modify the internal configurations of applications. |
End users or reviewers of applications. |
Add members
-
In the left-side navigation pane of the Dify workspace, click Members.
-
On the member management page, click Invite Member.
-
Enter the email address of the team member, select a role (Admin, Developer, Ops, or Guest), and then click Confirm.
-
The invited member receives an invitation notification and can join the workspace by clicking the invitation link.
Configure model services
Before you develop AI applications, you must configure LLM services in Dify. Dify supports integration with multiple mainstream model providers.
-
In the upper-right corner of the Dify workspace, click your profile picture and select Settings.
-
On the Settings page, click Model Provider.
-
Find the target model provider, such as Tongyi Qianwen or OpenAI. Click Setup, enter the corresponding API key and related configuration, and then click Save.
We recommend that you configure at least one model provider before you start application development. For more information about how to obtain an API key for model services, see Obtain an API key.
Develop AI applications
After you configure model services, you can create and develop AI applications in the Dify workspace. Dify supports the following application types:
-
Chat Assistant: A conversation-based AI application that supports context memory and multi-turn conversations.
-
Agent: An intelligent agent that can call external tools and APIs. It supports autonomous reasoning and task execution.
-
Workflow: A complex AI processing pipeline that chains multiple nodes by using a visual orchestration interface.
-
Text Generation: A text generation application based on prompt templates. It is applicable to batch processing scenarios.
To create an application, perform the following steps:
-
In the Dify workspace, click Create Application. Select an application type and enter an application name.
-
On the application orchestration page, write a prompt and configure the model parameters and context settings.
-
In the preview panel on the right side, enter test content to debug the application.
-
After debugging is complete, click Publish. An access URL or API endpoint is generated for your team to use the application.
Instance management
You can perform routine management operations on Dify instances in the AI-Native Database Service console. After you log on to the console, navigate to Agent Developer Platform > Custom Development. On the Dify tab, find the target instance to perform the following operations.
|
Operation |
Description |
|
Modify configuration |
Modifies the basic configuration of a Dify instance, such as the instance name and description. |
|
Change computing specification |
Adjusts the computing resources (number of CUs) of a Dify instance based on the workload to accommodate changes in concurrent users. |
|
Redeploy |
Redeploys a Dify instance when the instance encounters an exception or requires a version update. Redeployment does not affect existing application data. |
|
Change billing method |
Switches the billing method between pay-as-you-go and subscription to optimize costs. |
|
Release resources |
Releases a Dify instance and its associated computing resources when the instance is no longer needed. Pay-as-you-go instances can be released at any time. Subscription instances can be released only after they expire. |
After you release a Dify instance, the application configurations and development data in the instance are permanently deleted and cannot be recovered. The associated database instances, such as ApsaraDB RDS for PostgreSQL and Redis, are not automatically released. You must release them separately in the corresponding service consoles. Back up your data before you release an instance.