Workflow application
A workflow breaks down complex tasks into ordered steps to reduce system complexity. In Alibaba Cloud Model Studio, workflows let you combine nodes, such as large models, APIs, and Function Compute, to reduce coding costs.
Application
Why use a workflow application
A workflow breaks down complex tasks into a sequence of steps to reduce system complexity. Creating a workflow application on Model Studio lets you define the execution order, assign responsibilities, and specify dependencies between steps to automate and optimize the process.
Common use cases for workflow applications include:
- Travel planning: You can use a workflow plugin to select parameters, such as a destination, and automatically generate a travel plan that includes flights, accommodations, and attraction recommendations.
- Report analysis: For complex datasets, you can combine data processing, analysis, and visualization plugins to generate structured, formatted analysis reports.
- Customer support: You can use automated workflows to handle customer inquiries, including issue classification, to improve response speed and accuracy.
- Content creation: You can generate content such as articles and marketing copy. Provide a topic and requirements, and the system automatically generates a draft.
- Education and training: You can use a workflow to design personalized learning plans with progress tracking and assessments, enabling self-paced learning for students.
- Medical consultation: Based on patient-entered symptoms, a workflow can combine multiple analytical tools to generate a preliminary assessment or recommend relevant tests to assist doctors with further diagnosis.
Node Types
A workflow is composed of various functional nodes.
Basic Nodes
AI Nodes
- LLM Node
- Knowledge Base Node
- Intent Classification Node
- Parameter Extraction Node
- Multimodal Generation Node
- Agent Creation Node
- Agent Group Node
Tool Nodes
- API Node
- Function Compute Node
- Script Node
- Plugin Node
- MCP Node
- AppFlow Node
- Application Component Node
Data Processing Nodes
- Variable Processing Node
- Variable Assignment Node
- Document Extraction Node
- Image Extraction Node
- Audio Extraction Node
- Video Extraction Node
- Data Connector Node
Session parameters
A session variable acts as a global variable, storing parameters throughout the workflow's lifecycle to be referenced by any node. Click the session variable icon in the upper-right corner of the canvas configuration page to configure it.
Test application
After you configure the workflow, you can use the test feature to verify that it runs as expected. Click the Test button in the upper-right corner to open the test panel. The test panel offers multiple test modes for different use cases.
Text conversation
Text conversation is the default test mode. It preserves the conversation history and supports continuous, multi-turn conversations.
- From the drop-down list at the top of the test panel, select text conversation mode (selected by default). If the workflow contains custom variables, enter their values in the parameter configuration area.
- In the input box, enter your test content (text and file attachments are supported), and then click the Send button or press Enter to run the test.
- Review the test results. You can click a node to view its detailed input and output, or switch the output format between Text and JSON.
- To continue the conversation, enter your next turn in the input box and send it. To start a new conversation, click the Clear All button.
Text generation
The text generation mode is for single-turn interactions. Each test is independent, and the conversation history is not preserved. It supports two modes:
- Synchronous run: For simple, fast tasks. Returns the result immediately after the workflow completes.
- Asynchronous run: For complex, time-consuming tasks. Returns a Task ID that you can use to query the result.
Synchronous run
In synchronous run mode, the workflow executes immediately and returns the result directly upon completion.
- In the input box, enter your test content and click the Run button to start the test.
- After the workflow finishes running, switch to the Result tab to view the output. You can click a node to view its detailed input and output, or switch the output format between Text and JSON.
Asynchronous run
In asynchronous run mode, the workflow executes in the background. The system immediately returns a Task ID, which you can use to query the result. You can view the history of asynchronous tasks in the Task Center.
- In the input box, enter your test content and click the Run button to start the test. The system immediately returns a Task ID.
- While the asynchronous task is running, the test panel displays an "Executing" status. You can click the Refresh button to refresh the status.
- After the task is complete, view the output on the Result tab. The output includes an "Async" tag and the Task ID. You can click a node to view its detailed input and output, or switch the output format between Text and JSON.
Audio and video interaction
Alibaba Cloud Bailian lets you publish a workflow as a real-time audio and video conversation application. It provides a convenient debugging window where you can quickly test a demo on an H5 or mobile app. You can also integrate the application into your web, iOS, or Android applications using an audio and video SDK.
- We do not recommend using models with high latency for real-time audio and video conversations, as it may affect the conversation experience. Examples include the DeepSeek-R1 and QwQ series models.
- The DeepSeek V3 model does not support video chat.
- Create a workflow by configuring a start node, a large language model node, and an end node so it runs correctly.
- In Test > Text Chat, debug the application until it performs as expected.
- After you are satisfied with the text conversation performance, switch to Interactive voice response or Video Interaction mode. Then, click Configure to set up the API key to call the application.
- In the Audio & Video Settings, configure the parameters, then click Call to debug the audio and video interaction. Under speech-to-text, you can select the language. Under text-to-speech, you can select the voice model and timbre.
- Once you are satisfied with the test results, click the Try button in the upper-right corner to generate a temporary QR code for testing. You can scan the QR code with WeChat, DingTalk, or a mobile browser to test the interaction. The QR code is valid for 24 hours.
- After confirming the performance, click the Publish button to publish the application. Then, go to the Publish Channel, activate Intelligent Media Service, grant SLR authorization, and create an interactive agent.
Checklist
The checklist lists the required configurations for your workflow. To view the checklist, click the checklist icon in the upper-right corner of the canvas configuration page.
Release an application
Once an application is released, you can call it via an API or share it as a web page with RAM users in the same main account. To do so, click the Publish button in the upper-right corner of the agent application management page.
Call via API
On the Publish Channel tab of your workflow application, click View API next to API to learn how to call the agent application by using an API.
Note: You must replace
DASHSCOPE_API_KEYwith your API key to call the API.
For FAQs and information about API calls, see the following topics:
- For invocation methods (HTTP/SDK), see Invoke a workflow application.
- For details on API call parameters, see Application call parameter information.
- For details on passing parameters, see Parameter passing for applications.
- To resolve errors returned by API calls, see Error codes.
- The application itself has no concurrency limit; instead, the limit is determined by the models it calls. See the Model Studio console.
Currently, you cannot call the Xiyan service from a workflow. Instead, use an API node to call a custom API service.
The timeout for API calls is 600 seconds and cannot be changed. If a timeout may occur, consider the following solutions:
- Use asynchronous mode: In this mode, the system returns a task ID. You can then use the task ID to query the result, which avoids the synchronous timeout limit.
- Split the task: Break down the task into multiple steps, or process batch data in smaller chunks to prevent a single execution from timing out.
Release as a component
You can release a workflow application as a component for use in other agents or workflows. For detailed instructions, see Release as a component.
Other invocation methods
For other sharing methods, see Share an application.
Import or export a workflow
-
Import or export a Model Studio workflow
Click the more icon at the top of the workflow page and select Export DSL or Import Model Studio DSL.
-
Import a Dify workflow
Model Studio supports one-click import of Dify workflows for easy migration and reuse.
- Click the more icon at the top of the workflow page and select Import Dify DSL.
- Adjust the parameters for each node. The node compatibility details are as follows:
Dify node Mapped Model Studio node Compatibility start start sys.querymaps toquery;sys.dialogue_countmaps to maximum memory turns.LLM LLM Model: Model Studio clears the model field for unsupported models, requiring you to select one manually. Supported models are fully compatible. Prompt: Dify's System prompt maps to the main prompt in Model Studio, while its User prompt maps to the user prompt. Vision capability: fully compatible. Context: Model Studio incorporates the raw fields from Dify's context directly into its system prompt. knowledge retrieval knowledge base Input: Model Studio consistently uses the contentfield as the input. Knowledge base: cleared after import; you must manually associate a knowledge base. Retrieval settings: Dify'sTop-kmaps to the number of retrieved fragments.Direct Reply output node Fully compatible. agent None Only the name is retained. You must click the node and select a specific Model Studio node as a replacement. Question Classifier intent classification Model Studio clears the model field for unsupported models, requiring you to select one manually. Supported models are fully compatible. Iteration batch processing Input maps to Batch Array; output variable maps to Output Variable. loop loop Fully compatible. code execution script Model Studio distinguishes between Python and JavaScript scripts. Template Transform None Not compatible. Model Studio generates a custom node. Variable Aggregator Variable Processing Maps to the Aggregate Groups output mode of the Variable Processing node. Document Extractor None Not compatible. Model Studio generates a custom node. Variable Assignment Variable Settings Fully compatible. Parameter Extractor parameter extraction Model Studio does not support inference mode. Other features are fully compatible. HTTP request API Fully compatible, but you must re-authenticate. List Operation None Not compatible. Model Studio generates a custom node. Tool plugin, MCP Not compatible. Model Studio generates a custom node. comment None Not compatible. end end If a Dify workflow contains multiple end nodes, Model Studio converts them into a single Variable Processing node and a single end node.
Manage workflow versions
- Click Publish in the top-right corner of the workflow configuration page. In the Publish dialog box, enter version information, such as 1.0.0, and click OK.
- Click Version Management at the top of the page, and in the Historical Versions panel, you can view or use different versions of the current workflow application as needed by clicking Overwrite Current Draft or Return to Current Version. You can also click Export DSL for This Version at the top to export the DSL of the selected historical version.
- Optional: In the Node Library, view or search for nodes.
Delete and copy workflow applications
In My Applications, find a published application card and click the more icon to delete the application, copy its workflow, or modify its application name.
FAQ
Workflow applications
-
How do I write the results of a workflow run to a database?
Use a script conversion node to write the output from the previous node to a database.
-
How do I upload files when building a workflow application in Model Studio?
Add an API node to your workflow application to upload files.
-
How do I upload images?
Use a VL model and pass the image URL as a parameter.
-
Can I use an asynchronous task API within a workflow application?
The timeout for a workflow application is 600 seconds. Avoid using an asynchronous task API within a workflow.
-
How can I call the Model Studio workflow API from a frontend application and receive a streaming output?
Frontend calls are not currently supported.
-
Why can't I import a standalone .yaml file into a Model Studio workflow?
Model Studio does not support importing standalone .yaml files. You must provide a compressed package that includes an MD5 file. We recommend regenerating the MD5 if you encounter issues.
-
Can variable names in Model Studio workflows be in Chinese?
No, variable names cannot contain Chinese characters.
-
How is conversation history stored?
Workflow applications store data for only one month. You must save your own conversation history. The
session_idis valid for one hour.
Nodes
-
Why does my intent classification node fail when context is enabled?
If you enable context for an intent classification node, the variable that you pass to it must be a list.
-
Why does my API node fail when I use streaming output?
The API node within a workflow does not support streaming output. However, streaming output is supported by the underlying HTTP API.
-
How do I speed up a slow conditional node?
- Check your workflow configuration: Ensure each node, especially the conditional node, is configured correctly. Avoid unnecessarily complex calculations or data processing to reduce response time.
- Optimize script logic: If the conditional logic involves a custom script, optimize the script by reducing unnecessary loops or redundant data processing to improve performance.
- Run batch tests: Measure the average response time of your workflow to identify performance bottlenecks under specific conditions.
-
How do I stream the reasoning process from a large model node?
You need to add a text conversion node after the large model node, configure the
reasoning_contentvariable, and enable Result Return. The end node must receive the result. -
How can I customize the output parameters of a large model node?
- Use a script node to process the output: Add a script node after the large model node to process its output, convert it to your desired format, or add extra parameters.
- Configure a batch node: If you are using a large model node within a batch node, you can select the output of the large model node as the final output
resultListin the batch node's configuration.
-
Why does my API node return no result or fail to pass parameters?
Verify that your API key and Base URL are correct. Ensure that the input parameters are configured correctly, and adjust the field input types if necessary. Use Model Observation to view model usage details.
-
How do I resolve issues when accessing Excel data from a knowledge base?
You cannot directly access local files. Use MCP to access local resources. You must manually process the output from a knowledge base node. We recommend adding a large model node to convert the output to a table format before passing it to a script node for further processing.