openviking

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

OpenViking Skill

OpenViking Skill

OpenViking 上下文数据库集成 — 给 AI 朝廷加上长期记忆和知识库。
OpenViking Context Database Integration — Add long-term memory and knowledge base to your AI Court.

什么是 OpenViking

What is OpenViking

OpenViking 是火山引擎开源的 AI Agent 上下文数据库,用文件系统范式统一管理记忆、资源和技能。 相比 OpenClaw 默认的 qmd 记忆后端,OpenViking 在大规模文档场景下更强:
能力qmd(默认)OpenViking
语义搜索基础向量匹配目录递归 + 语义融合
自动摘要✅ L0/L1/L2 三层
结构化浏览✅ 虚拟文件系统
Token 节省✅ 按需加载
OpenViking is an open-source AI Agent context database by Volcano Engine, which unifies the management of memory, resources, and skills using a file system paradigm. Compared to OpenClaw's default qmd memory backend, OpenViking performs better in large-scale document scenarios:
Capabilityqmd (Default)OpenViking
Semantic SearchBasic vector matchingDirectory recursion + semantic fusion
Auto-summarization✅ L0/L1/L2 three layers
Structured browsing✅ Virtual file system
Token saving✅ On-demand loading

安装

Installation

1. 安装 Python 包

1. Install Python Package

bash
pip install openviking
bash
pip install openviking

2. 获取 Embedding API Key

2. Get Embedding API Key

推荐使用免费的 NVIDIA NIM API:
  1. 访问 https://build.nvidia.com/
  2. 登录 → API Keys → 生成 Key
  3. 保存 key(以
    nvapi-
    开头)
也可以用火山引擎、OpenAI 等其他 provider。
Recommended to use the free NVIDIA NIM API:
  1. Visit https://build.nvidia.com/
  2. Log in → API Keys → Generate Key
  3. Save the key (starts with
    nvapi-
    )
You can also use other providers like Volcano Engine, OpenAI, etc.

3. 创建配置文件

3. Create Configuration File

bash
mkdir -p ~/.openviking
cat > ~/.openviking/ov.conf << 'EOF'
{
  "embedding": {
    "dense": {
      "api_base": "https://integrate.api.nvidia.com/v1",
      "api_key": "YOUR_NVIDIA_API_KEY",
      "provider": "openai",
      "dimension": 4096,
      "model": "nvidia/nv-embed-v1"
    }
  },
  "vlm": {
    "api_base": "https://integrate.api.nvidia.com/v1",
    "api_key": "YOUR_NVIDIA_API_KEY",
    "provider": "openai",
    "model": "meta/llama-3.3-70b-instruct"
  }
}
EOF
bash
mkdir -p ~/.openviking
cat > ~/.openviking/ov.conf << 'EOF'
{
  "embedding": {
    "dense": {
      "api_base": "https://integrate.api.nvidia.com/v1",
      "api_key": "YOUR_NVIDIA_API_KEY",
      "provider": "openai",
      "dimension": 4096,
      "model": "nvidia/nv-embed-v1"
    }
  },
  "vlm": {
    "api_base": "https://integrate.api.nvidia.com/v1",
    "api_key": "YOUR_NVIDIA_API_KEY",
    "provider": "openai",
    "model": "meta/llama-3.3-70b-instruct"
  }
}
EOF

4. 设置环境变量

4. Set Environment Variables

bash
echo 'export OPENVIKING_CONFIG_FILE=~/.openviking/ov.conf' >> ~/.bashrc
source ~/.bashrc
bash
echo 'export OPENVIKING_CONFIG_FILE=~/.openviking/ov.conf' >> ~/.bashrc
source ~/.bashrc

使用方式

Usage

Agent 通过 exec 调用
scripts/viking.sh
脚本:
bash
undefined
Agents call the
scripts/viking.sh
script via exec:
bash
undefined

查看状态

Check status

bash skills/openviking/scripts/viking.sh info
bash skills/openviking/scripts/viking.sh info

索引文件

Index files

bash skills/openviking/scripts/viking.sh add ./my-document.md
bash skills/openviking/scripts/viking.sh add ./my-document.md

批量索引目录

Batch index directory

bash skills/openviking/scripts/viking.sh add-dir ./docs/
bash skills/openviking/scripts/viking.sh add-dir ./docs/

语义搜索

Semantic search

bash skills/openviking/scripts/viking.sh search "某个话题"
bash skills/openviking/scripts/viking.sh search "some topic"

浏览已索引的文件

Browse indexed files

bash skills/openviking/scripts/viking.sh list
bash skills/openviking/scripts/viking.sh list

读取文件摘要

Read file summary

bash skills/openviking/scripts/viking.sh summary <file-path>
undefined
bash skills/openviking/scripts/viking.sh summary <file-path>
undefined

朝廷集成建议

AI Court Integration Suggestions

  • 兵部:索引代码仓库,搜索相关代码片段
  • 户部:索引财务报表,查询历史数据
  • 礼部:索引品牌素材和营销案例
  • 工部:索引运维文档和 runbook
  • 刑部:索引法律法规和合同模板
建议保留 qmd 做日常轻量记忆,OpenViking 做大规模知识库。
  • Ministry of War: Index code repositories, search related code snippets
  • Ministry of Revenue: Index financial reports, query historical data
  • Ministry of Rites: Index brand materials and marketing cases
  • Ministry of Works: Index operation and maintenance documents and runbooks
  • Ministry of Justice: Index laws, regulations, and contract templates
It is recommended to keep qmd for daily lightweight memory, and use OpenViking for large-scale knowledge bases.