Skip to main content

Integrate with QwenWork and WorkBuddy

Install the Knowledge Studio Skill in QwenWork and WorkBuddy to query your enterprise Knowledge Base in natural language and get answers with sources

Overview

Knowledge Studio packages Knowledge Base listing, retrieval, and Q&A into an Agent Skill. Once the Skill is installed in QwenWork or WorkBuddy, you describe what you need in natural language, the client invokes the retrieval scripts automatically, and the answer ends with the Knowledge Base, document, and section it came from. Compared with uploading attachments in a conversation, the Knowledge Base is maintained centrally on the server. When a document is updated, every member retrieves the current version, with no need to redistribute files. This guide is written for everyday office users and requires no coding.
This Skill provides retrieval and Q&A. Creating a Knowledge Base and importing documents are done in the console — see Create a Knowledge Base.

Prerequisites

Activate the Service and Create an API Key

ItemAction
Activate the Knowledge Base serviceOpen the Knowledge Base page, click Activate Now, and wait one to two minutes
Create an API KeyCreate one on the Settings → API Key page; the format is a string starting with sk-
Prepare a Knowledge BaseAt least one Knowledge Base whose documents are in the parsed state
Keys starting with sk-sp- are Coding Plan keys and do not support Knowledge Base services; calls return 401 InvalidApiKey. Make sure you created a standard sk- key.

The API-Key page in the console: click Create API-KEY in the top right, then copy the key

Create an API Key

Check the Runtime Environment

The Skill calls the retrieval API through local Python scripts, so Python 3 must be installed. Run the following in Terminal or Command Prompt:
python3 --version
Any version number satisfies the requirement. On Windows, if the command is not found, install Python from python.org and select Add python.exe to PATH during setup.

Configure the API Key

The Skill reads the API Key from a system environment variable. Configure it once and it remains in effect. The procedure is the same for both clients.
  • Windows
  • macOS
  1. Search the Start menu for Edit the system environment variables and open it
  2. Click Environment Variables, then click New under User variables
  3. Set the name to DASHSCOPE_API_KEY and the value to your API Key
  4. Save, then restart the client
The API Key is an access credential — anyone who obtains it can call your Knowledge Base directly. Do not share it in chat groups or enter it in the client's conversation box. Once configured as above, the Skill reads it automatically and never needs it supplied in a conversation.

Install the Skill

The Skill package is named alibabacloud-bailian-rag-knowledgebase. Its source is in the aliyun/alibabacloud-aiops-skills repository under skills/aiml/sfm/alibabacloud-bailian-rag-knowledgebase.

QwenWork

QwenWork stores Skills under ~/.qwenworkcn/skills/. Two installation methods are supported. Method 1: Install from a conversation (recommended) Send the following in the conversation box; QwenWork handles the download, placement, and loading automatically:
Please install the alibabacloud-bailian-rag-knowledgebase skill from this repository:
https://github.com/aliyun/alibabacloud-aiops-skills
This method requires the client's network to reach GitHub. Where corporate networks restrict outbound access, the install fails or hangs; use Method 2 instead.

QwenWork clones the repository, validates the Skill structure, installs to ~/.qwenworkcn/skills/, and verifies the result

Installing the Skill from a QwenWork conversation
Method 2: Upload through the interface
  1. Open the repository page and click Code → Download ZIP to get alibabacloud-aiops-skills-master.zip
  2. In QwenWork, click Extensions → Skills in the left navigation, then click + Add in the top right
  3. In the install dialog, drag in or select that zip file and click Install

QwenWork Extensions → Skills → + Add in the top right: upload a zip that contains SKILL.md

Uploading the Skill through the QwenWork interface
The dialog accepts two forms: a zip archive containing SKILL.md, or a single SKILL.md file dragged in directly. If the Skill isn't recognized after uploading the full repository zip, zip the skills/aiml/sfm/alibabacloud-bailian-rag-knowledgebase directory on its own and upload that instead.

WorkBuddy

  1. Open aliyun/alibabacloud-aiops-skills, click Code → Download ZIP, and unzip it
  2. Take the skills/aiml/sfm/alibabacloud-bailian-rag-knowledgebase directory
  3. On the WorkBuddy Skills page, click + Add Skill and choose Upload Skill from the dropdown
  4. Drag in or select that directory to import it

WorkBuddy: click + Add Skill, then choose Upload Skill from the dropdown

The Add Skill entry in WorkBuddy

Upload Skill dialog: a folder or a zip is accepted, and it must contain SKILL.md

The Upload Skill dialog in WorkBuddy

Verify the Installation

The client must be restarted before it loads the Skill. After restarting, send:
List the Knowledge Bases under my account
A returned list of Knowledge Base names indicates a successful installation.

The reply lists Knowledge Base IDs, names, and descriptions; the invoked Skill is visible on the right

Verifying the installation by listing Knowledge Bases

Capabilities and Example Prompts

CapabilityExample prompt
View available Knowledge BasesList the Knowledge Bases under my account
Retrieve from a specific Knowledge BaseSearch the Product Docs Knowledge Base for content about authentication methods
Q&A with automatic Knowledge Base selectionWhich authentication methods does our product support? Check the Knowledge Base first
Retrieve across multiple Knowledge BasesSearch the Product Docs and Support FAQ Knowledge Bases for the refund policy
Require source attributionLook up the travel expense standard and note which document and section it came from
Restrict answers to retrieved contentAnswer this from the Knowledge Base; if nothing is found, say it cannot be confirmed and do not speculate
When no Knowledge Base is specified, the Skill selects the 1 to 3 most relevant Knowledge Bases from the list based on the question, retrieves from each, and merges the results before answering.

Office Scenarios

Citing Official Wording in Written Material

Draft this week's project report. Verify product capability descriptions against
the Knowledge Base rather than writing from memory, and note the source document
after each item.
The Skill retrieves each capability referenced in the report, rewrites from the retrieved text, and appends sources per paragraph. This prevents unreleased features from appearing in the material.

Confirming Scope Before Replying to a Customer

A customer asked which data sources our Knowledge Base supports and whether Yuque
can be connected. Check the Knowledge Base first, answer only from what is
retrieved, and state that anything not found cannot be confirmed.
The instruction to answer only from retrieved content is the critical part; it prevents plausible but nonexistent answers. Adding this constraint is recommended as standard practice in pre-sales and support work.

Looking Up Company Policies

What is the hotel allowance for business travel? Answer according to the company
expense policy and give the policy file name and clause location.
Policy documents change frequently. Once the Knowledge Base completes incremental sync, the client always retrieves the current version, with no need to redistribute files.

Troubleshooting

SymptomCauseResolution
The client reports no such Skill, or does not respond to the questionThe client was not restarted after installationQuit the client completely and reopen it. If it persists, confirm that SKILL.md exists in the Skill directory and that no extra parent directory is nested around it
401 InvalidApiKey is returnedThe environment variable did not take effect, or an sk-sp- key was usedReconfigure the environment variable, confirm it starts with sk-, and restart the client
403 Forbidden or a service-not-activated messageThe Knowledge Base service is not activatedClick Activate Now on the Knowledge Base page and retry after one to two minutes
It answers but omits sourcesThe request did not ask for themAdd a requirement to cite the source document to your question
Content known to exist is not retrievedThe document is still being parsed, or the wording differs substantially from the documentConfirm in the console that the document status is parsed and adjust your wording. See also Improving Retrieval Quality

Advanced Configuration

The steps above cover the standard installation for office users. For more flexible deployments, see the options below.

Using an MCP Connector

An MCP connector does not depend on a local Python environment; it requires only a service URL and an auth header. In QwenWork, paste the configuration under Extensions → Connectors → + Add. In WorkBuddy, write it to ~/.workbuddy/mcp.json, or open Plugins → MCP Servers → Configure MCP.
{
  "mcpServers": {
    "knowledge_studio": {
      "type": "streamable-http",
      "url": "https://{workspaceId}.cn-beijing.maas.aliyuncs.com/api/v1/indices/rag/mcp",
      "headers": {
        "Authorization": "Bearer sk-xxxxxxxx"
      }
    }
  }
}
{workspaceId} is the workspace ID in your console address, in the form llm-xxxxxxxx. The type value is defined by each client: QwenWork uses streamable-http, while coding clients such as Qoder use streamableHttp. The service URL and auth header are the same in both cases. For the tools and their parameters, see Service Channels.

QwenWork Extensions → Connectors → + Add: choose either manual configuration or paste a JSON config

Adding an MCP connector in QwenWork
WorkBuddy's official MCP documentation uses local command-line servers in its examples, so treat the client's configuration form as authoritative for remote-server field names. If the connection fails, use the Skill method instead.

Installing on Multiple Devices

Fetch the Skill package with the CLI, then copy it into the client's Skill directory:
npx skills add aliyun/alibabacloud-aiops-skills \
  --skill alibabacloud-bailian-rag-knowledgebase \
  --agent claude-code -g -y --full-depth --copy

cp -R ~/.claude/skills/alibabacloud-bailian-rag-knowledgebase ~/.qwenworkcn/skills/
The --copy parameter is required. By default the command installs a symlink pointing to the original location, which stops working once copied to another directory, leaving the client unable to read the Skill.
WorkBuddy's Skill directory is not published in its official documentation. ~/.workbuddy/skills/ is the path adopted by convention in the community and may not apply to every version. Verify it on a single device before wider deployment; otherwise use the interface upload method.

Integrating Other Agents

The Agent Skill section of Integration → Service Channels in the console provides the install command and Skill directory for each Agent; select the one you use to obtain a command you can run directly. For the full list of coding clients and their configuration, see Quick Setup for Agents.

Retrieval Quality and Access Scope

Both integration methods in this guide retrieve directly by Knowledge Base ID and do not apply the multi-KB weights or ranking strategy configured in a knowledge retrieval service. To improve retrieval quality consistently, adjust chunking and tags on the Knowledge Base side. To restrict which Knowledge Bases a client can access, place those Knowledge Bases in a dedicated workspace and distribute only that workspace's API Key. Limiting scope in the prompt does not constitute access control.