agentCLAWHUBUnverified

Knowledge Rag

个人知识库:存笔记、搜内容。用自然语言搜本地文档,不用记文件名。跟 AI 说'把这段存到知识库'自动保存并建索引。推荐搭配 Bilibili Auto Transcript:视频转录自动入库,转完即搜。 Skill: Knowledge Rag Owner: 54lynnn Summary: 个人知识库:存笔记、搜内容。用自然语言搜本地文档,不用记文件名。跟 AI 说'把这段存到知识库'自动保存并建索引。推荐搭配 Bilibili Auto Transcript:视频转录自动入库,转完即搜。 Tags: 54lynnn:1.1.0, chinese:1.5.4, knowledge:1.5.4, latest:1.6.1, rag:1.5.4, search:1.5.4 Version history: v1.6.1 | 2026-06-03T08:51:06.513Z | auto **Virtual environment support and installation process improvement** - Added virtual environment (.venv) support; all depend

OpenClaw

Rank

62

Safety

84

Downloads

1.3k

Updated

Oct 10, 2026

Version

1.6.1

Source

CLAWHUB

About

What it does, and when to use it.

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

Avoid when

  • Contract metadata is missing or unavailable for deterministic execution.

Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing

Public facts

Every fact links back to the source it came from.

Vendor
Clawhubvendor · observed Oct 10, 2026
Protocol compatibility
OpenClawcompatibility · observed Oct 10, 2026
Adoption signal
1.3K downloadsadoption · observed Oct 10, 2026
Latest release
1.6.1release · observed Jun 3, 2026
Handshake status
UNKNOWNsecurity

Install and run

Setup complexity: low.

clawhub skill install s17eg5gndg4q9p16rk2nqbpje183gv2k:knowledge-rag
  1. Setup complexity is classified as HIGH. You must provision dedicated cloud infrastructure or an isolated VM. Do not run this directly on your local workstation.
  2. Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data.

Contract: missing

curl -s "https://www.xpersona.co/api/v1/agents/clawhub-54lynnn-knowledge-rag/snapshot"

Documentation

CLAWHUB

146,278 characters of source documentation, loaded on request.

Extracted files

5 files captured from the source.

SKILL.md

---
name: knowledge-rag
version: "1.6.0"
description: "个人知识库:存笔记、搜内容。用自然语言搜本地文档,不用记文件名。跟 AI 说'把这段存到知识库'自动保存并建索引。推荐搭配 Bilibili Auto Transcript:视频转录自动入库,转完即搜。"
metadata:
  openclaw:
    emoji: "📖"
    requires:
      bins: ["python3", "ollama"]
    install:
      - id: "ollama"
        kind: "system"
        label: "安装 Ollama(向量引擎)"
        url: "https://ollama.com/download"
      - id: "embed-model"
        kind: "shell"
        label: "下载推荐向量模型(千问3 Embedding 8B,约 4.7GB)"
        command: "ollama pull qwen3-embedding:8b"
      - id: "pip-deps"
        kind: "shell"
        label: "创建虚拟环境并安装 Python 依赖"
        command: "cd {{SKILL_DIR}} && python3 -m venv .venv && .venv/bin/pip install numpy requests fastapi pydantic uvicorn PyPDF2 pdfplumber python-docx"
      - id: "auto-index-cron"
        kind: "shell"
        optional: true
        label: "(可选)开启自动索引——每30分钟扫描新文件"
        command: "echo '提示:安装后可运行 openclaw cron add 定时运行 index_knowledge.py 实现自动索引'"
---

# 📖 Knowledge RAG

用自然语言搜索你的笔记和文档,像问 ChatGPT 一样问你的私人知识库。

---

## 🚀 安装启动

```bash
# 1. 安装 Ollama
curl -fsSL https://ollama.com/install.sh | sh

# 2. 拉取推荐模型(千问3 Embedding,中文最优)
ollama pull qwen3-embedding:8b

# 3. 创建虚拟环境并安装依赖
python3 -m venv .venv
.venv/bin/pip install numpy requests fastapi pydantic uvicorn PyPDF2 pdfplumber python-docx

# 4. 启动
.venv/bin/python3 start.py
```

打开 `http://localhost:5777` → 文件丢到 `~/workspace/knowledge/` → 管理页点「重新索引」→ 搜索页开搜。

### 可选:开启自动索引
新增文件后不用每次都手动点重新索引,设个定时任务每30分钟自动扫描:
```bash
openclaw cron add \
  --name "knowledge-rag 自动索引" \
  --every 1800000 \
  --message "运行索引检查:cd ~/.openclaw/workspace/skills/knowledge-rag && .venv/bin/python3 scripts/index_knowledge.py" \
  --silent
```

---

## 📂 知识库目录

```
~/workspace/knowledge/
  ├── notes/            ← 技术笔记、读书笔记
  ├── bilibili/         ← B站转录
  ├── wechat-articles/  ← 公众号文章
  ├── other/            ← 其他文档
  └── (可建任意子目录,去设置页添加)
```

支持 `.txt` / `.md` / `.pdf`(文字版)/ `.docx` 文件。

---

## 🔍 搜索方式

### 直接问我
> "帮我搜笔记里关于 Docker 的部分"  
> "知识库里有没有讲 Transformer 的文章?"

我会自动调搜索,带原文回答。

### 命令行
```bash
.venv/bin/python3 scripts/query_knowledge.py "你的问题"
.venv/bin/python3 scripts/query_knowledge.py "微服务" --source bilibili --top 5
.venv/bin/python3 scripts/query_knowledge.py --stats
```

新增文件后运行索引即可:
```bash
.venv/bin/python3 scripts/index_knowledge.py          # 增量
.venv/bin/python3 scripts/index_knowledge.py --force  # 全量重建
```

---

## 📝 Agent 存知识规范

当用户说"把这段存到知识库",按以下规则操作:

| 内容类型 | 存放目录 | 文件名 |
|---------|---------|--------|
| 技术笔记、概念解释 | `notes/` | 中文描述.md |
| B站视频转录 | `bilibili/` | 自动处理 |
| 公众号、网页文章 | `wechat-articles/` | 文章标题.md |
| 其他 | `other/` | 内容摘要.md |

保存后运行 `.venv/bin/python3 scripts/index_knowledge.py` 更新索引。

---

## 🔧 切换模型

在设置页修改 `embed_model` 字段:

| 场景 | 模型 | 大小 |
|------|------|------|
| ✅ 推荐(质量最高) | `qwen3-embedding:8b` | 4.7GB | 中文优秀,检索质量最高 |
| 轻量(CPU友好) | `qwen3-embedding:0.6b` | 640MB | 对 CPU 友好,中文不错 |
| 多语言 | `bge-m3` | 1.2GB |
| 最小体积 | `nomic-embed-text` | 274MB |

改完后点「重新索引」,系统自动检测并全量重建。

---

## �

README.md

<p align="center">
  <h1 align="center">📖 Knowledge RAG</h1>
  <p align="center">把你的笔记和文档变成 AI 知识库,像聊天一样搜索</p>
  <p align="center">
    <a href="https://clawhub.ai/54lynnn/knowledge-rag"><img src="https://img.shields.io/badge/ClawHub-knowledge--rag-6c5ce7" alt="ClawHub"></a>
    <a href="https://github.com/54Lynnn/knowledge-rag"><img src="https://img.shields.io/github/stars/54Lynnn/knowledge-rag" alt="GitHub Stars"></a>
  </p>
</p>

---

## 这是什么

一个**本地运行的 RAG(检索增强生成)知识库系统**。把你的 `.txt` / `.md` / `.pdf` / `.docx` 文件丢进来,用自然语言搜索,像问 ChatGPT 一样问你的私人知识库。

**跟大多数 RAG 工具不同:**

- **极简部署** — 不需要 Docker,不需要数据库,一台机器一个 Ollama 就够了
- **Trae/OpenClaw Agent 集成** — 在 IDE 里直接让 AI 搜你的知识库并带原文回答
- **B站转录自动入库** — 配合 bilibili-auto-transcript,视频转录完自动进知识库

---

## 快速开始

```bash
# 1. 安装 Ollama
curl -fsSL https://ollama.com/install.sh | sh

# 2. 拉取推荐模型(千问3 Embedding 8B)
ollama pull qwen3-embedding:8b

# 3. 创建虚拟环境并安装依赖
python3 -m venv .venv
.venv/bin/pip install numpy requests fastapi pydantic uvicorn PyPDF2 pdfplumber python-docx

# 4. 启动
.venv/bin/python3 start.py
```

打开 `http://localhost:5777` → 把文件丢到 `~/workspace/knowledge/` → 点「重新索引」→ 开搜。

---

## 架构

```
┌─────────────────────────────────────────────────┐
│                 浏览器 (index.html)              │
└──────────────────┬──────────────────────────────┘
                   │ HTTP
┌──────────────────▼──────────────────────────────┐
│         TypeScript Express (server.ts)           │
│   Web 层:静态文件、配置读写、请求路由            │
└──────────────────┬──────────────────────────────┘
                   │ HTTP Proxy
┌──────────────────▼──────────────────────────────┐
│          Python FastAPI (knowledge_api.py)       │
│   RAG 层:搜索、索引、管理、统计 API             │
└──────┬─────────────────────────────┬────────────┘
       │                             │
┌──────▼──────┐            ┌────────▼──────────┐
│ index_      │            │ query_            │
│ knowledge.py│            │ knowledge.py      │
│ 索引构建    │            │ 向量搜索+混合打分  │
└──────┬──────┘            └────────┬──────────┘
       │                            │
       └──────────┬─────────────────┘
                  │ SQLite
       ┌──────────▼──────────┐
       │  chunks.db          │
       │  (文本 + 向量 BLOB) │
       └─────────────────────┘
```

## 知识库目录结构

```
~/workspace/knowledge/
  ├── notes/            ← 技术笔记、读书笔记
  ├── bilibili/         ← B站转录(配合 bilibili-auto-transcript)
  ├── wechat-articles/  ← 公众号文章
  ├── other/            ← 其他文档
  └── (可建任意子目录,去设置页添加)
```

支持的文件格式:`.txt` / `.md` / `.pdf`(文字版)/ `.docx`

---

## 核心特性

| 特性 | 说明 |
|------|------|
| **SQLite 存储** | 文本 + 向量存同一张表,原子写入,不会崩溃后数据不一致 |
| **增量索引** | hash 比对 + mtime 快速跳过,只处理变更文件,删除的文件自动清理 |
| **混合搜索** | 向量余弦相似度 + 查询扩展 + 标题/文本关键词加成 |
| **标题提取** | Markdown H1、PDF/DOCX 首行自动识别为标题,提高匹配精度 |
| **文件解析** | PDF(PyPDF2 + pdfplumber 降级)、DOCX(含表格内容) |
| **删除单条** | API 支持按文件名删除索引,无需全量重建 |
| **Web 界面** | 搜索 + 管理(统计、索引、配置)一体 |
| **多模型支持** | 可切换 embedding 模型,切换后自动全量重建 |

---

## 切换模型

在 `~/workspace/knowledge/.knowledge-config

_meta.json

{
  "ownerId": "kn742cdrc476d1kbhpsvnrnznx81x4r7",
  "slug": "knowledge-rag",
  "version": "1.6.1",
  "publishedAt": 1780476666513
}

skill-card.md

## Description:

Personal knowledge base skill for saving notes, indexing local documents, and searching them with natural-language queries.

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

## Publisher:

[54lynnn](https://clawhub.ai/user/54lynnn)

### License/Terms of Use:

MIT-0

## Use Case:

Developers, agents, and individual users use this skill to create a local searchable knowledge base from notes and documents, then retrieve relevant source text through chat-style prompts or CLI commands.

### Deployment Geography for Use:

Global

## Known Risks and Mitigations:

Risk: Private document search and admin APIs may be exposed too broadly.

Mitigation: Run only on a trusted single-user machine and do not expose ports 5777 or 8768 to a LAN or untrusted browser context.

Risk: The skill can browse or index outside the intended knowledge folder.

Mitigation: Avoid placing sensitive documents in reachable paths until API binding, authentication, and path limits are fixed.

Risk: Installation depends on external Ollama and package installation steps.

Mitigation: Use verified Ollama and package sources before installing or pulling embedding models.

## Reference(s):

- [ClawHub Skill Page](https://clawhub.ai/54lynnn/skills/knowledge-rag)
- [Ollama Download](https://ollama.com/download)

## Skill Output:

**Output Type(s):** [text, markdown, code, shell commands, configuration, guidance]

**Output Format:** [Markdown guidance with inline shell commands and local API or CLI outputs]

**Output Parameters:** [1D]

**Other Properties Related to Output:** [Produces local search guidance and retrieval results backed by a local SQLite index and Ollama embeddings.]

## Skill Version(s):

1.6.1 (source: server 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.

web/package-lock.json

{
  "name": "knowledge-server-ts",
  "version": "1.0.0",
  "lockfileVersion": 3,
  "requires": true,
  "packages": {
    "": {
      "name": "knowledge-server-ts",
      "version": "1.0.0",
      "dependencies": {
        "express": "^5.1.0"
      },
      "devDependencies": {
        "@types/express": "^5.0.1",
        "@types/node": "^22.14.1",
        "tsx": "^4.19.4",
        "typescript": "^5.8.3"
      }
    },
    "node_modules/@esbuild/aix-ppc64": {
      "version": "0.28.0",
      "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.28.0.tgz",
      "integrity": "sha512-lhRUCeuOyJQURhTxl4WkpFTjIsbDayJHih5kZC1giwE+MhIzAb7mEsQMqMf18rHLsrb5qI1tafG20mLxEWcWlA==",
      "cpu": [
        "ppc64"
      ],
      "dev": true,
      "license": "MIT",
      "optional": true,
      "os": [
        "aix"
      ],
      "engines": {
        "node": ">=18"
      }
    },
    "node_modules/@esbuild/android-arm": {
      "version": "0.28.0",
      "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.28.0.tgz",
      "integrity": "sha512-wqh0ByljabXLKHeWXYLqoJ5jKC4XBaw6Hk08OfMrCRd2nP2ZQ5eleDZC41XHyCNgktBGYMbqnrJKq/K/lzPMSQ==",
      "cpu": [
        "arm"
      ],
      "dev": true,
      "license": "MIT",
      "optional": true,
      "os": [
        "android"
      ],
      "engines": {
        "node": ">=18"
      }
    },
    "node_modules/@esbuild/android-arm64": {
      "version": "0.28.0",
      "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.28.0.tgz",
      "integrity": "sha512-+WzIXQOSaGs33tLEgYPYe/yQHf0WTU0X42Jca3y8NWMbUVhp7rUnw+vAsRC/QiDrdD31IszMrZy+qwPOPjd+rw==",
      "cpu": [
        "arm64"
      ],
      "dev": true,
      "license": "MIT",
      "optional": true,
      "os": [
        "android"
      ],
      "engines": {
        "node": ">=18"
      }
    },
    "node_modules/@esbuild/android-x64": {
      "version": "0.28.0",
      "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.28.0.tgz",
      "integrity": "sha512-+VJggoaKhk2VNNqVL7f6S189UzShHC/mR9EE8rDdSkdpN0KflSwWY/gWjDrNxxisg8Fp1ZCD9jLMo4m0OUfeUA==",
      "cpu": [
        "x64"
      ],
      "dev": true,
      "license": "MIT",
      "optional": true,
      "os": [
        "android"
      ],
      "engines": {
        "node": ">=18"
      }
    },
    "node_modules/@esbuild/darwin-arm64": {
      "version": "0.28.0",
      "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.28.0.tgz",
      "integrity": "sha512-0T+A9WZm+bZ84nZBtk1ckYsOvyA3x7e2Acj1KdVfV4/2tdG4fzUp91YHx+GArWLtwqp77pBXVCPn2We7Letr0Q==",
      "cpu": [
        "arm64"
      ],
      "dev": true,
      "license": "MIT",
      "optional": true,
      "os": [
        "darwin"
      ],
      "engines": {
        "node": ">=18"
      }
    },
    "node_modules/@esbuild/darwin-x64": {
      "version": "0.28.0",
      "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.
Github ReposUpdated 1d agoRank 70

AionUi

Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!

MCPOPENCLAW
Github ReposUpdated 6mo agoRank 70

activepieces

AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents

OPENCLAW
Github ReposUpdated 6mo agoRank 70

cherry-studio

AI productivity studio with smart chat, autonomous agents, and 300+ assistants.

MCPOPENCLAW
Github ReposUpdated 7mo agoRank 70

CopilotKit

The Frontend for Agents & Generative UI. React + Angular

OPENCLAW

Machine-readable data

The same record, as JSON, for agents and crawlers.

{
  "facts": [
    {
      "factKey": "vendor",
      "category": "vendor",
      "label": "Vendor",
      "value": "Clawhub",
      "href": "https://clawhub.ai/54lynnn/skills/knowledge-rag",
      "sourceUrl": "https://clawhub.ai/54lynnn/skills/knowledge-rag",
      "sourceType": "profile",
      "confidence": "medium",
      "observedAt": "2026-10-10T18:51:10.809Z",
      "isPublic": true
    },
    {
      "factKey": "protocols",
      "category": "compatibility",
      "label": "Protocol compatibility",
      "value": "OpenClaw",
      "href": "https://www.xpersona.co/api/v1/agents/clawhub-54lynnn-knowledge-rag/contract",
      "sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-54lynnn-knowledge-rag/contract",
      "sourceType": "contract",
      "confidence": "medium",
      "observedAt": "2026-10-10T18:51:10.809Z",
      "isPublic": true
    },
    {
      "factKey": "traction",
      "category": "adoption",
      "label": "Adoption signal",
      "value": "1.3K downloads",
      "href": "https://clawhub.ai/54lynnn/knowledge-rag",
      "sourceUrl": "https://clawhub.ai/54lynnn/knowledge-rag",
      "sourceType": "profile",
      "confidence": "medium",
      "observedAt": "2026-10-10T18:51:10.809Z",
      "isPublic": true
    },
    {
      "factKey": "latest_release",
      "category": "release",
      "label": "Latest release",
      "value": "1.6.1",
      "href": "https://clawhub.ai/54lynnn/knowledge-rag",
      "sourceUrl": "https://clawhub.ai/54lynnn/knowledge-rag",
      "sourceType": "release",
      "confidence": "medium",
      "observedAt": "2026-06-03T08:51:06.513Z",
      "isPublic": true
    },
    {
      "factKey": "handshake_status",
      "category": "security",
      "label": "Handshake status",
      "value": "UNKNOWN",
      "href": "https://www.xpersona.co/api/v1/agents/clawhub-54lynnn-knowledge-rag/trust",
      "sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-54lynnn-knowledge-rag/trust",
      "sourceType": "trust",
      "confidence": "medium",
      "observedAt": null,
      "isPublic": true
    }
  ],
  "events": [
    {
      "eventType": "release",
      "title": "Release 1.6.1",
      "description": "**Virtual environment support and installation process improvement** - Added virtual environment (.venv) support; all dependencies now installed into a dedicated environment. - Updated installation commands and documentation to use .venv/bin/python3 and .venv/bin/pip. - Modified all scripts and documentation to match the new environment setup. - Removed the old skill-card.md file and added a new README.md. - Improved installation reliability and isolated dependency management.",
      "href": "https://clawhub.ai/54lynnn/knowledge-rag",
      "sourceUrl": "https://clawhub.ai/54lynnn/knowledge-rag",
      "sourceType": "release",
      "confidence": "medium",
      "observedAt": "2026-06-03T08:51:06.513Z",
      "isPublic": true
    }
  ]
}

Record generated Oct 10, 2026.

Sponsored

Ads related to Knowledge Rag and adjacent AI workflows.