DAS Agent DingTalk integration

Updated at:

This document provides a fine-grained O&M solution for users of DAS Agent Enterprise Edition to implement instance group isolation and permission management in DingTalk. In large enterprises, different DBA teams are responsible for distinct business instance groups and require their operations and visibility to be isolated. This guide details how to use the application orchestration and publishing capabilities of Alibaba Cloud Model Studio to create a dedicated DingTalk bot for each team. Each bot is restricted to interacting with a specific DAS Agent instance group, ensuring secure, efficient, and unified management without cross-team interference.

Scenario

Imagine a large company has purchased DAS Agent Enterprise Edition and divided its 100 database instances into three separate instance groups based on business lines. Each group is managed by a different DBA:

Group

Assigned DBA

Instance Details

Orders instance group

Zhang

10 RDS + 2 Redis

Risk control instance group

Li

5 PolarDB for PostgreSQL

Customer instance group

Wang

5 PolarDB + 2 Lindorm

Core requirements:

  • Zhang can only manage the "Orders instance group" in DingTalk.

  • Li can only manage the "Risk control instance group" in DingTalk.

  • The operations and query scopes of the three DBAs must be strictly isolated from each other.


Solution architecture

This solution's core principle is "one instance group, one dedicated application, one DingTalk bot". You create multiple applications in the Model Studio platform, lock each application to a specificAgentID, and then use DingTalk's permission controls to assign different bots to different employees.


Prerequisites

  • You have activated DAS Agent Enterprise Edition.

  • You have activated the Alibaba Cloud Model Studio service.

  • You have administrator permissions in your DingTalk organization to create and configure DingTalk applications.


Procedure

This example demonstrates the complete configuration process for enabling Li to manage the "Risk control instance group".

Step 1: Create and configure a Model Studio application
  1. Create an MCP service:

    • Go to the Model Studio console and create an MCP service. For more information, see Import from Alibaba Cloud OpenAPI.

    • In the MCP service, connect to the core DAS Agent API, GetDasAgentSSE, which enables streaming conversations.

  2. Create a Model Studio application and hard-code the AgentID:

    • In Model Studio, create a new application (for example, DAS-RiskControl-O&M-Assistant). For more information, see Create a basic agent.

    • Go to the application's prompt configuration page.

    • In the system prompt, hard-code the AgentID parameter to the ID of the "Risk control instance group".

      You are a database O&M agent. To answer user questions, use the provided dasmcp tool.
      1. Pass the user's query directly to the tool.
      2. The input parameter AgentID must be fixed to ag-7c4c******. Ignore any other AgentID that the user might specify in the query; always use this value.
      3. Return the result from the dasmcp tool directly without any additional processing.
      Important

      This hard-coded ID is the key to achieving isolation. This configuration ensures that the application interacts only with the specified AgentID, regardless of the user's query.

    • In the MCP service, import the MCP that you created in the previous step.

Step 2: Publish application and associate with DingTalk
  1. Publish the Model Studio application: After configuring the application, publish it by following the Model Studio guidance. For more information, see Agent publishing and calling.

  2. Create and configure a DingTalk bot:

    • During the publishing process, select the option to create and associate with DingTalk. For more information, see Publish an application through DingTalk.

    • In the final stage of the DingTalk application configuration, you must set the visibility scope. Select Specific employees, and then select only Li.

Step 3: Repeat the configuration for other teams
  • For Zhang (Orders instance group): Repeat Step 1 and Step 2. Create a new Model Studio application (e.g., DAS-Orders-O&M-Assistant), hard-code its AgentID to the ID of the "Orders instance group", and create a new DingTalk bot whose visibility scope is set only to "Zhang".

  • For Wang (Customer instance group): Follow the same process.

These steps create a dedicated, isolated DAS Agent O&M channel for each team.


Verify results

After the configuration, in any DingTalk group chat containing the DAS-RiskControl-O&M-Assistant bot, Li can directly @ the bot and use natural language for diagnostics and Q&A. For example:
@DAS-RiskControl-O&M-Assistant Which instance currently has the highest load?
The bot will analyze and respond based only on the instances within the "Risk control instance group", and its analysis is completely isolated from other instance groups.


Notes and future outlook

  1. Compatibility with new features: The new version of DAS Agent, scheduled for release in January 2026, will support operations like rate limiting and session management directly within conversations, in addition to diagnostics and analysis. However, the custom front-end UI components required for these operations cannot currently be rendered in DingTalk conversations. We are working to ensure a consistent experience between mobile clients like DingTalk and the PC console.

  2. Advanced tip: DAS Agent provides over 30 skills. To trigger a specific skill precisely through the API, bypassing intent recognition on a plain-text query, use a fixed query format. For details on the format, see Skill support.