knowledge-vault

👤 lilyjazz 📦 v1.0.0 ⭐ 4.1 ⬇️ 430 下载
🤖 AI-Agent 免费 🔑 需 API Key

📖 技能介绍


name: knowledge-vault description: Long-term RAG memory storage for your agent, powered by TiDB Vector. metadata: openclaw: emoji: 📚 requires: bins: ["python3", "curl"] env: ["TIDB_HOST", "TIDB_PORT", "TIDB_USER", "TIDB_PASSWORD", "GEMINI_API_KEY"]

小葱技能7w4.net持续更新中。


Knowledge Vault (Powered by TiDB Zero)

Overview

Knowledge Vault is a Long-Term Memory module for AI Agents, powered by TiDB Vector Search (RAG).

Traditional agent memory (context window) is ephemeral and limited. Knowledge Vault allows agents to: 1. Store: Ingest documents, notes, and facts as vector embeddings. 2. Retrieve: Semantically search for relevant information based on user queries ("RAG"). 3. Remember: Access unlimited historical context without overflowing the LLM prompt.

Why use this?

  • Infinite Recall: Store millions of documents without confusing the agent.
  • Contextual Relevance: Find exact paragraphs related to a question, not just keywords.
  • Privacy: Keep your knowledge base private in your own TiDB Cloud instance.

Prerequisites

  • TiDB Cloud (Serverless): With Vector Search enabled.
  • Embedding Model: Requires GEMINI_API_KEY (or compatible).

🔐 Security & Provisioning

This skill operates in two modes: 1. Bring Your Own Database (Recommended): Set TIDB_HOST, TIDB_USER, TIDB_PASSWORD environment variables. The skill will use your existing database. 2. Auto-Provisioning (Fallback): If no credentials are found, the skill calls the TiDB Zero API to create a temporary, ephemeral database for you. It caches the connection string locally (~/.openclaw_knowledge_vault_dsn) to persist memory across runs.

Installation

1. Add to TOOLS.md

- **knowledge-vault**: Store and retrieve knowledge using vector search.
  - **Location:** `{baseDir}/skills/knowledge_vault/SKILL.md`
  - **Command:** `python {baseDir}/skills/knowledge_vault/run.py --action search --query "<QUESTION>"`

2. Add to AGENTS.md (Protocol)

Copy PROTOCOL.md.

Usage

  • Add Knowledge: bash python {baseDir}/run.py --action add --content "The user prefers spicy food but is allergic to peanuts."
  • Search (RAG): bash python {baseDir}/run.py --action search --query "What are the user's dietary restrictions?"

🤖 AI 评测

这个 Skill 整体质量不错,能较好地实现长期记忆存储和语义搜索功能。文档清晰、配置灵活是它的亮点。但存在一些小问题:嵌入维度设置可能与实际模型不符,错误处理不够完善,而且缺少测试保证稳定性。对于需要稳定使用的场景,建议先确认维度配置与实际环境匹配后再部署。

📊 多维度评分

适应性4.3
规范性4
有效性4
可靠性4.1
可信度4.4

📁 包含文件 (6 个)

📄 DESIGN.md 445 B
📄 PROTOCOL.md 428 B
📄 SKILL.md 2.3 KB
📄 _meta.json 134 B
📄 requirements.txt 21 B
📄 run.py 5.5 KB