DataWorks Agent for third-party clients
DataWorks Agent is based on the Model Context Protocol (MCP). It connects to the DataWorks MCP Server and other big data MCP servers, such as the Hologres MCP Server, to provide capabilities such as data development, task O&M, and data integration in DataWorks through natural language interaction.
For a streamlined Agent service, see Agent.
How it works
DataWorks Agent enables big data development through natural language interactions in an intelligent chat window. It works by using a Large Language Model (LLM) to parse your requests and then calls MCP Server capabilities to execute tasks.
For example, you can ask "How many workspaces do I have?" in the DataWorks Agent chat window. The Agent uses the LLM to parse this request and calls the ListProjects tool provided by the DataWorks MCP Server, which is built on DataWorks OpenAPI, to retrieve the result. For complex tasks, the LLM interacts with the MCP Server multiple times.
DataWorks Agent not only integrates with the DataWorks MCP Server but also connects to other MCP servers. You can also choose your own LLM, such as Qwen, DeepSeek, or OpenAI.
You can also try the following prompts to explore more task scenarios supported by DataWorks Agent.
|
Scope |
Example prompt |
|
Data Studio |
[Query tasks] Find all |
|
[Rename tasks] Rename the nodes found above to 'invalid_node_to_delete'. Use sequential numbers to differentiate them. |
|
|
[Create tasks] Create five |
|
|
Task O&M |
[Rerun failed tasks] In this workspace, find the tasks that failed on |
|
[Query failed instances] Find all instances that failed on |
|
|
[Analyze task rerun properties] Analyze the rerun properties of these tasks. If they are rerunnable, rerun them. |
|
|
Data Integration |
[Sync a single MySQL table to MaxCompute] Create a batch data integration task in the current workspace with the following settings:
|
|
[Sales analysis] Analyze the sales trends of the top 10 best-selling products this month from the order table. |
Limitations
This feature is available only in a personal development environment within a workspace where the new version of Data Studio is enabled.
You must reinstall the MCP Server after restarting a personal development environment. Proceed with caution.
Billing
Using DataWorks Agent incurs the following fees:
-
DataWorks OpenAPI call fees
When the Agent calls DataWorks OpenAPI through an MCP Server, calls are charged based on the OpenAPI billing standards.
-
LLM token fees
The Agent calls the Large Language Model (LLM) that you configure, such as Qwen, to parse user intent and generate natural language responses. This process consumes input and output tokens, which are billed according to the pricing rules of your chosen model provider. For example, if you use the
qwen-coder-plusmodel in Model Studio, the fees are calculated based on the Model Studio billing details.
Quick start
After you configure DataWorks Agent, click the
icon in the upper-right corner of the Cline page to open the DataWorks Agent chat interface and try a quick example: query the members of the current workspace.
Enter the following prompt: Query the members of the current workspace.
The Agent executes the task in the following steps:
-
Parse and confirm the request: The Agent parses your intent (such as "query the members of the current workspace"), automatically identifies the
ListProjectMembersAPI to call, and asks you to confirm required parameters, such as the target workspace (ProjectId). -
Call the API and receive a response: After you click Approve, the Agent calls the
ListProjectMembersOpenAPI to retrieve a structured list of members in the workspace, including their roles and account types. For more information about theListProjectMembersOpenAPI, see Query the list of workspace members.Note-
During execution, the system prompts you to confirm relevant actions and provide necessary information. You can click Approve to proceed or Reject to cancel the action.
-
The breakdown logic for key steps may vary slightly depending on task complexity, LLM selection, and model version. The actual execution flow depends on the Agent's real-time parsing and interaction during the session.
-
Configure DataWorks Agent
DataWorks Agent uses an MCP client extension, such as Cline, to create the chat interface. It connects to the DataWorks MCP Server and other Alibaba Cloud MCP servers through MCP Server configurations.
You can connect to more open source MCP servers as needed to enhance the capabilities of DataWorks Agent.
Prerequisites
-
You have created a workspace and selected Use Data Studio (New Version).
-
(Optional, for RAM users) You have added the RAM user for task development to the workspace with the Development or Workspace Administrator role. The Workspace Manager role has extensive permissions, so assign it with caution. For details on adding members, see Add members to a workspace.
If you are using an Alibaba Cloud account, you can skip this step.
-
You have created a personal development environment instance.
NoteIf your personal development environment needs to be bound to a VPC, you must configure public network access for the personal development environment.
Step 1: Enter the personal development environment
Follow these steps to start and access your personal development environment.
Go to the Workspaces page in the DataWorks console. In the top navigation bar, select a desired region. Find the desired workspace and choose in the Actions column.
-
Click the
icon next to Personal Development Environment in the top navigation bar to check the status of your personal development environment instance and access it.-
If the Instance Status is Running: Click the running personal development environment instance under Personal Development Environment to enter the environment.
-
If the instance has any other status: Click Management Environment in the pop-up window. On the Personal Development Environment Instances page, find your instance, and click Start in the Actions column. Wait for the Instance Status to change to Running, and then click the instance to enter the environment.
NoteAn icon similar to
in the Personal Development Environment area indicates that you have successfully entered the personal development environment. -
Step 2: Install Cline
After you enter the personal development environment, follow these steps to configure DataWorks Agent. This guide uses Cline as an example.
If you selected the dataworks-mcp:py3.11-ubuntu22.04 image when you created your personal development environment instance, you do not need to upgrade the engine or install the Cline extension.
Upgrade the engine
Install the Cline extension
Step 3: Configure the LLM API key
After you install the Cline extension, follow these steps to configure your API Key. This example shows how to connect to the Model Studio API by using the OpenAI Compatible mode.
-
To connect to other models, configure the relevant parameters according to the user interface.
-
Only the Use your own API key method is supported; Get Started for Free is not.
-
On the Data Studio personal development environment page, click the
icon in the upper-right corner of the top navigation bar to open Copilot Chat, and then click the
icon to switch to Cline. -
On the Cline page, click Use your own API key and configure the parameters as described in the following table.
Parameter
Description
API Provider
The API service provider that you want to use. Select
OpenAI Compatible. This indicates that you will use an OpenAI-compatible interface to connect to the Model Studio API.Base URL
The base URL of the API service.
For example, the OpenAI-compatible API endpoint provided by Model Studio is
https://dashscope.aliyuncs.com/compatible-mode/v1.API Key
The key that is used for authentication. You can obtain this API Key from the Alibaba Cloud Model Studio console.
Model ID
The specific model that you want to use. Different models have different functions and performance.
Select
qwen-coder-plusorqwen-plus:-
qwen-coder-plus: suitable for code generation and programming tasks. -
qwen-plus: suitable for general text generation and processing tasks.
-
-
Click Let's go! to save the configuration.
Step 4: Configure the MCP Server
After you configure the API Key, follow these steps to connect to and configure the DataWorks MCP Server. For more information about the DataWorks MCP Server, see Appendix: DataWorks MCP Server.
-
In the upper-right corner of the Cline page, click the
icon to go to the MCP Servers Marketplace tab. -
Switch to the Installed tab to view installed MCP servers.
-
Click Configure MCP Servers to open the
cline_mcp_settings.jsonconfiguration file. DataWorks provides a default configuration foralibabacloud-dataworks-mcp-server. The configuration is as follows:{ "mcpServers": { "alibabacloud-dataworks-mcp-server": { "command": "npx", "args": [ "alibabacloud-dataworks-mcp-server" ], "env": { "REGION": "cn-shanghai", "ALIBABA_CLOUD_CREDENTIALS_URI": "http://localhost:7002/api/v1/credentials/0", "TOOL_CATEGORIES": "SERVER_IDE_DEFAULT" }, "disabled": false, "autoApprove": [], "timeout": 60 } } }Parameter
Description
command
npx, the command provided by dataworks-mcp-server.
args
alibabacloud-dataworks-mcp-server, the command argument for dataworks-mcp-server.
env
REGION
The region where your DataWorks workspace is located, for example, cn-shanghai.
ALIBABA_CLOUD_CREDENTIALS_URI
The URI for the Alibaba Cloud credential.
ImportantThis parameter is valid only in the DataWorks personal development environment and is used to obtain Alibaba Cloud user authentication.
TOOL_CATEGORIES
An allowlist of
Toolcategories. Enter the OpenAPI categories, separated by commas.Example:
"TOOL_CATEGORIES":"Data Source,Workspace Management,Resource Group Management,Data Map,Data Integration,Data Studio (new version),Operation Center,DataService,Open Platform,Data Quality,Label Management,Security Center,SERVER_IDE_DEFAULT".Note-
SERVER_IDE_DEFAULTrefers to the defaultToolsin the personal development environment. The other service categories can be found in the left-side directory tree on the DataWorks - OpenAPI Overview page. -
To improve model loading performance and user experience, the default configuration sets
TOOL_CATEGORIEStoSERVER_IDE_DEFAULT. To enable all OpenAPI tools, you can remove this configuration item.
TOOL_NAMES
An allowlist of
Toolnames. Enter the OpenAPI names, separated by commas.Example:
"TOOL_NAMES":"ListProjects,CreateNode,UpdateNode".NoteYou can find
TOOL_NAMESon the DataWorks - OpenAPI Overview page. -
-
If a list of available Tools loads on the page after you save the configuration,
alibabacloud-dataworks-mcp-serveris installed and configured correctly. You can now use the DataWorks MCP Server features.NoteIf this information fails to load, make sure that you have upgraded the engine.
-
You can extend the capabilities of DataWorks Agent by directly editing the
cline_mcp_settings.jsonconfiguration file or by installing other MCP servers from the Marketplace. For example, to use Hologres-related functions in DataWorks Agent, you can connect to the Hologres MCP Server.
FAQ
-
Q: When I run a preset prompt on the MCP Server, an API request takes too long to respond. What could be the cause and how can I fix it?
A: The request may time out due to compatibility issues with an outdated engine version. Upgrade the engine to resolve this.
-
Q: What can I do to improve the model's response speed?
A: To improve response performance, try the following measures:
-
Disable unused MCP servers to reduce system overhead.
-
In the MCP Server's configuration file, use the
envparameter to explicitly specifyTOOL_CATEGORIESorTOOL_NAMES. This loads only the necessary toolsets and reduces the number of importedTools.
-
Appendix: DataWorks MCP Server
MCP (Model Context Protocol) is a protocol that provides a standardized context for Large Language Models (LLMs). It standardizes how LLMs connect to various data sources and tools, enabling them to process information more effectively. An MCP client can call the capabilities of various MCP servers through the MCP protocol.
The DataWorks MCP Server, as a type of MCP server, encapsulates DataWorks OpenAPI and exposes the big data processing capabilities of DataWorks. You can integrate the DataWorks MCP Server into third-party products, programs, or agents to quickly call DataWorks capabilities.
To use DataWorks Agent outside a personal development environment, you must configure ALIBABA_CLOUD_ACCESS_KEY_ID and ALIBABA_CLOUD_ACCESS_KEY_SECRET in the env parameter and remove the ALIBABA_CLOUD_CREDENTIALS_URI configuration. You can obtain the required keys here.
icon to Configure Keybindings or move the extension to your preferred location, such as the