Develop SKILLs for CoPaw

更新时间:
复制 MD 格式

This document explains how to develop SKILLs that operate enterprise software and use them in CoPaw.

Background, challenges, and approach

Enterprise customers face the following challenges when using desktop agents:

  • Low accuracy: Agents do not consistently deliver accurate results when operating enterprise software, failing to meet business requirements. These inaccuracies can lead to direct financial losses in processes such as supply chain customs declarations or e-commerce product listings.

  • Slow execution: The agent's execution speed is often too slow for production workflows. It performs numerous "sense-plan-act" cycles, which can lead to prolonged, ineffective attempts or very slow progress when operating enterprise software.

  • High token consumption: The agent consumes a large number of tokens, making it cost-ineffective. Even for repetitive tasks, the large model must be involved from end to end.

This document proposes the following approach to address these challenges:

  • First, use Robotic Process Automation (RPA) to develop standard enterprise operations into repeatable automated processes. These processes can then be integrated as SKILLs that the agent can use.

  • When employees use the agent, it can use these SKILLs to deliver tangible business value.

Use case

Business requirement

  • Operations staff need to analyze product sales data daily. They face two challenges: first, because products are sold on multiple platforms, staff must manually download sales data from each store. Second, many analysis tasks are routine, making manual analysis and summarization tedious.

Agent components

  • CoPaw: Employees interact with the agent through DingTalk IM to assign tasks and receive results.

  • Enterprise SKILL: To meet the business requirement, the SKILL must automatically retrieve product sales data from the company's stores across all platforms.

  • Architecture

    image

Process summary

  1. Install CoPaw.

  2. Use RPA to develop an automated process and publish it as an MCP Tool.

  3. Use a service-based robot from Alibaba Cloud RPA as the SKILL runtime.

  4. Add the MCP Server configuration in CoPaw.

  5. Add the SKILL in CoPaw.

User workflow

  • Interact with CoPaw to fulfill business requirements.

Procedure

Install CoPaw

This document uses Compute Nest to install and configure CoPaw. For detailed steps, see Deploy a dedicated CoPaw. This example uses CoPaw v1.0.0 and the Qwen3 Max model.

Develop an automated process and publish as an MCP Tool

  1. For details about developing an automated process with RPA, see Develop an automated process.

  2. The following table describes the input and output parameters for the automated process in this example.

    Automated process

    Input parameters

    Output

    Automatically retrieve product sales data from stores

    • statis_date: The date for which to query product sales data.

    • The product data is returned in JSON format and includes details for each store, such as product ID, name, style tags, sales quantity, unit price, and the number of times the product was added to favorites or a cart.

    • The automated process saves the retrieved data using task_result.

    Important

    The implementation in this example is not universally applicable because enterprises use different platforms, require different data, and operate different software. Refer to Develop an automated process to create processes that fit your specific business operations.

  3. Publish the automated process as an RPA application. For more information, see Publish and manage applications.

    image

  4. Publish the application as an MCP Tool. For more information, see Publish as an MCP Tool. The following figure shows the MCP Tool information after publication.

    image

    Important

    If the automated application has a long execution time, we recommend adding the estimated duration and the agent's polling interval to the Tool Description.

Prepare the SKILL runtime

This example uses a service-based robot from Alibaba Cloud RPA as the SKILL runtime.

A service-based robot requires Wuying Workspace. For configuration instructions, see Run an automated process as a service. After the robot is created, it appears as shown in the following figure. You will use this service-based robot to run the SKILL in the following steps.

image

Add an MCP Server in CoPaw

  1. In the RPA console, go to the MCP Server menu to get the MCP Server configuration. As shown in the following figure, this configuration can contain information for multiple MCP Servers.

    image

  2. Use the CoPawPrivate Addresses provided by Compute Nest to add the MCP Server in the CoPaw console, as shown in the following figure.

    image

Add a SKILL in CoPaw

This section explains how to add an enterprise SKILL in CoPaw to help the agent better understand user intent and complete tasks accurately.

  1. Prepare the SKILL, which consists of three .md files.

    Note

    The SKILL content in this document is an example. You must adapt it for your specific business scenario.

    1. SKILL.md

      ---
      name: rpa-skill
      description: |
        Operations efficiency toolkit, including querying product sales data for stores.
        Triggers: product operations, product statistics, trends, price, sales volume
      metadata:
        {
          "copaw":
            {
              "requires": { "env": ["ALIYUN_RPA_RobotId"] },
            },
        }
      ---
      
      # rpa-skill
      
      Unified entrypoint: Use mcporter to call an mcp tool.
      
      ## Included tools
      | tool | Description                   |
      |-----|----------------------|
      | `list_product_metrics` | Query product sales data for all stores on a specified date. |
      | `workerSysGetTaskStatus`| Query task status and result by taskId.  |
      
      ## Usage flow
      - All tools except `workerSysGetTaskStatus` are invoked asynchronously and immediately return a taskId.
      - You can use `workerSysGetTaskStatus` to query the task status and result using the taskId.
      - If you need to wait for the task result, you must use the `workerSysGetTaskStatus` tool to poll for the task status. Use the polling interval specified in the MCP Tool description whenever available.
      - If an input parameter requires a robotId, use `ALIYUN_RPA_RobotId`.
      
      ## Prerequisites
      - Before you run `list_product_metrics` for the first time, read the entire `references/list_product_metrics.md` file.
      - Before you run `workerSysGetTaskStatus` for the first time, read the entire `references/workerSysGetTaskStatus.md` file.
      - For subsequent calls to the same tool within the same session, you can reuse the loaded knowledge. Reread the document only if there are rule conflicts or if the document has been updated.
    2. The references directory contains the following two .md files.

      list_product_metrics.md

      # Query product sales data for all stores on a specified date
      
      Purpose: Query product sales data for all stores on a specified date.
      
      ## Invocation
      
      To invoke this tool using mcp, provide the following parameters:
      
      | Parameter          | Required | Description                               |
      |-------------|----|----------------------------------|
      | robotId     | Yes | Use `ALIYUN_RPA_RobotId`.           |
      | statis_date | Yes | The date for which to gather sales data. Format: YYYY-MM-DD. Example: 2026-11-02. |
      
      ## Output structure
      
      - A successful call returns a `taskId`.
      - You can use `workerSysGetTaskStatus` to query the task execution result. The `taskResult` contains the daily report content. The following is an example.
      
      ```json
      {
        "Store A": {
          "products": [
            {
              "id": "FS-2026-001",
              "name": "New Chinese Style Jacquard Song Brocade Jacket (Spring Limited Edition)",
              "style_tags": [
                "New Chinese",
                "China-Chic"
              ],
              "sales": 1850,
              "favorites_and_cart": 6200,
              "avg_transaction_price": 328.0
            }
          ]
        }
      }
      ```
      
      - The following table describes the fields in the `products` array.
      
      | Field                    | Description           |
      |-----------------------|--------------|
      | id                    | Product ID         |
      | name                  | Product name         |
      | style_tags            | Product tags         |
      | sales                 | Sales quantity (in units)   |
      | favorites_and_cart    | Number of users who added the product to favorites or a cart      |
      | avg_transaction_price | Average transaction price (in CNY) |
      
      

      workerSysGetTaskStatus.md

      # Query task status and result
      
      Purpose: Query task execution status by taskId.
      
      ## Invocation
      
      To invoke this tool using mcp, provide the following parameters:
      
      | Parameter     | Required | Description             |
      |--------|----|----------------|
      | taskId | Yes | The taskId returned when the tool was called. |
      
      
      ## Output structure
      
      - Returns a JSON object.
      - If the task is complete, the result is returned as follows. The `taskResult` is the tool output. For details, see the markdown file for the corresponding tool in the `references/` directory.
      
      ```json
      {
        "taskStatus": "complete",
        "taskResult": "Tool execution result"
      }
      ```
      
      - If the task is not yet complete, the result is returned as follows:
      
      ```json
      {
        "taskStatus": "waiting"
      }
      ```
      
      - The following table describes the `taskStatus` values.
      
      | Value          | Description     |
      |------------|--------|
      | waiting    | The task is waiting to run. |
      | running    | The task is running. |
      | complete   | The task completed successfully. |
      | terminated | The task was terminated due to an error. |
      
  2. Add the SKILL. Package the three .md files into rpa-skill.zip according to their directory structure. In the CoPaw console, upload the .zip file, as shown below.

    image

  3. Configure the robotId

    1. Set the robot on which the SKILL runs. This prevents business users from needing to provide the robotId to the agent.

      Important
      • To simplify the process, this document assumes all users share the same SKILL runtime (the same robot).

      • This approach has limitations in production environments. We recommend provisioning a dedicated, cloud-based digital employee for each user. This also requires adding a module to manage the relationship between SKILL runtimes (robots) and employees.

    2. In the CoPaw console, go to the Skill menu, click the rpa-skill that you added in the previous step, and enter the robotId as shown in the following figure.

      image

You have now completed the configuration.

Results

A user makes the following request in the CoPaw chat:

image

The agent returns the following result:

image

Note

The product sales data in this document is sample data.