Xpersona
A

Alibabacloud Bailian Rag Knowledgebase

CLAWHUB · Unverified

Alibaba Cloud Bailian Knowledge Base Retrieval Tool. Use HTTPS API to query and retrieve knowledge base content. Use when: User needs to query knowledge base...

62
Rank
84
Safety
1.1k
Downloads

About

What it does, and when to use it.

Capability contract not published. No trust telemetry is available yet. 1.1K downloads reported by the source. Last updated 10/11/2026.

Avoid when

  • Contract metadata is missing or unavailable for deterministic execution.

Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing

Install and run

Setup complexity: medium.

clawhub skill install s173swjet2yrebzqrp6hjkvmy583mxef:alibabacloud-bailian-rag-knowledgebase
  1. Install using `clawhub skill install s173swjet2yrebzqrp6hjkvmy583mxef:alibabacloud-bailian-rag-knowledgebase` in an isolated environment before connecting it to live workloads.
  2. No published capability contract is available yet, so validate auth and request/response behavior manually.
  3. Review the upstream CLAWHUB listing at https://clawhub.ai/sdk-team/alibabacloud-bailian-rag-knowledgebase before using production credentials.

Contract: missing

curl -s "https://www.xpersona.co/api/v1/agents/clawhub-sdk-team-alibabacloud-bailian-rag-knowledgebase/snapshot"

Run-check

$0.02 USD

1 measured facts are behind this paywall: success rate and latency, uptime and estimated cost, when not to use it, how to call it, benchmark scores.

Agents pay $0.02 in USDC. A card payment is $0.50, the smallest a card allows.

Documentation

CLAWHUB

45,619 characters of source documentation, loaded on request.

Extracted files

5 files captured from the source.

SKILL.md

---
name: alibabacloud-bailian-rag-knowledgebase
description: "Alibaba Cloud Bailian Knowledge Base Retrieval Tool. Use HTTPS API to query and retrieve knowledge base content. Use when: User needs to query knowledge base, retrieve document content, or answer questions based on knowledge base. Prerequisites: (1) Configure DashScope API Key (2) Activate Bailian Knowledge Base service."
---

# Bailian Knowledge Base Retrieval

This Skill provides query and retrieval capabilities for Alibaba Cloud Bailian Knowledge Base via HTTPS API.

## API Key Security Management

Scripts automatically handle key retrieval via `api_key.py`. The Agent does not need to and should not manually extract, set, or pass API Key values.

- **Key retrieval is automated**: Scripts internally call `api_key.py` to automatically obtain keys from config files/environment variables. The Agent only needs to run the script command.
- **Never hardcode any form of key**: Including `api_key = "sk-..."`, `export DASHSCOPE_API_KEY="sk-..."`, and assigning keys in shell scripts.
- **Never extract keys from CLI output**: The Agent must not write key values into any script, variable, or file.
- **Never expose keys in any output**: Including generated scripts, shell commands, log files, and terminal output containing strings starting with `sk-`.
- **Never read or print keys from config files**: Do not use `cat`, `jq`, `python -c`, or other commands to read and output API Key values.
- **Mandatory self-check before task completion**: Run `grep -rn "sk-" <output_directory>/` to check all output files; if any strings starting with `sk-` are found (excluding `sk-xxx` placeholders), delete the affected files and regenerate.

## 🚀 Initial Setup (Required for First-time Use)

### 1. Configure API Key

API Keys are managed by the unified `scripts/api_key.py` module, with the following retrieval priority:
1. Alibaba Cloud CLI config `~/.aliyun/config.json` current profile's `dashscope.api_key`
2. Environment variable `DASHSCOPE_API_KEY`
3. Auto-create and save when Alibaba Cloud CLI is available (`generate_api_key()`)

```python
# All scripts use this unified approach
from api_key import get_api_key
api_key = get_api_key()  # Returns str, raises ValueError if not found
```

Manual environment variable configuration:
```bash
export DASHSCOPE_API_KEY=sk-xxx
```

| Item | Description |
|------|-------------|
| **Key Format** | `sk-xxx` (standard DashScope API Key) |
| **Not Supported** | `sk-sp-xxx` (Coding Plan Key, does not support knowledge base services) |
| **Get Key** | https://bailian.console.aliyun.com/cn-beijing/?tab=app#/api-key |

### Alibaba Cloud CLI Configuration (API Key Auto-Create/Delete)

The `scripts/api_key.py` module creates and deletes API Keys via `aliyun modelstudio` commands. Complete the following setup before use:

**1. Update Plugins**

```bash
# Update plugins to latest version
aliyun plugin update
```

**2. Install 

_meta.json

{
  "ownerId": "kn74p5w8ywv6prh40g0s82gmqh83nw54",
  "slug": "alibabacloud-bailian-rag-knowledgebase",
  "version": "0.0.3",
  "publishedAt": 1781233602942
}

references/ram-policies.md

# RAM Policies for Bailian RAG Knowledge Base

This skill requires the following Alibaba Cloud RAM permissions to function properly.

## Required Permissions

| Service | Action | Description |
|---------|--------|-------------|
| modelstudio | `modelstudio:ListWorkspaces` | List workspaces (to obtain workspace ID) |
| modelstudio | `modelstudio:CreateApiKey` | Create a DashScope API Key |
| modelstudio | `modelstudio:DeleteApiKey` | Delete a DashScope API Key |

## Minimum Required Policy

```json
{
  "Version": "1",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "modelstudio:ListWorkspaces",
        "modelstudio:CreateApiKey",
        "modelstudio:DeleteApiKey"
      ],
      "Resource": "*"
    }
  ]
}
```

## How to Apply

1. Go to [Alibaba Cloud RAM Console](https://ram.console.aliyun.com/users)
2. Select the target RAM user
3. Click "Add Permissions"
4. Choose one of the following:
   - **System Policy**: Search and select `AliyunBailianFullAccess`
   - **Custom Policy**: Create a custom policy using the JSON above and attach it

## Notes

- Permission changes may take up to 30 seconds to take effect
- If you encounter `403 Forbidden` errors, verify that the RAM user has been granted the permissions above
- If you only need knowledge base retrieval (not API Key management), no RAM permissions are required -- only a valid DASHSCOPE_API_KEY

scripts/requirements.txt

dashscope>=1.25.0,<2.0.0
requests>=2.28.0,<3.0.0

skill-card.md

## Description:

Provides HTTPS API workflows for listing Alibaba Cloud Bailian knowledge bases, retrieving relevant chunks, and answering questions from those results.

This skill is ready for commercial/non-commercial use.

## Publisher:

[sdk-team](https://clawhub.ai/user/sdk-team)

### License/Terms of Use:

MIT-0

## Use Case:

Developers, engineers, and support agents use this skill to query Alibaba Cloud Bailian knowledge bases, select relevant indexes, retrieve document chunks, and compose source-attributed answers.

### Deployment Geography for Use:

Global

## Known Risks and Mitigations:

Risk: Normal setup can install Alibaba Cloud CLI tooling and create, persist, or delete DashScope API keys.

Mitigation: Review before installing, use an existing least-privileged DASHSCOPE_API_KEY when possible, and grant CreateApiKey/DeleteApiKey only when credential management is intended.

Risk: The skill can write API key material to ~/.aliyun/config.json during automatic key creation.

Mitigation: Run only in environments where writes to the Alibaba Cloud CLI config are acceptable, or configure an existing environment-provided API key before use.

## Reference(s):

- [ClawHub Skill Page](https://clawhub.ai/sdk-team/skills/alibabacloud-bailian-rag-knowledgebase)
- [RAM Policies for Bailian RAG Knowledge Base](references/ram-policies.md)
- [Bailian API Key Console](https://bailian.console.aliyun.com/cn-beijing/?tab=app#/api-key)
- [Bailian Knowledge Base Console](https://bailian.console.aliyun.com/cn-beijing/?tab=app#/knowledge-base)
- [Alibaba Cloud RAM Console](https://ram.console.aliyun.com/users)

## Skill Output:

**Output Type(s):** [Text, Markdown, Code, Shell commands, Configuration instructions, Guidance]

**Output Format:** [Markdown guidance with shell commands and JSON retrieval results]

**Output Parameters:** [1D]

**Other Properties Related to Output:** [Retrieval output includes knowledge-base index IDs, chunk content, relevance scores, document names, and section titles.]

## Skill Version(s):

0.0.3 (source: ClawHub release metadata)

## Ethical Considerations:

Users should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.

Sponsored

Ads related to Alibabacloud Bailian Rag Knowledgebase and adjacent AI workflows.