SuperAPI AI Directory

openviking

General & other

View repository

Updated 10-16 09:48

About this skill

OpenViking Skill

OpenViking context database integration — adds long-term memory and a knowledge base to the AI imperial court.

What is OpenViking

OpenViking is an AI Agent context database open-sourced by Volcano Engine, using a file system paradigm to uniformly manage memory, resources, and skills. Compared to OpenClaw's default qmd memory backend, OpenViking is stronger in large-scale document scenarios:

Capability qmd (default) OpenViking
Semantic search Basic vector matching Directory recursion + semantic fusion
Automatic summarization ❌ ✅ L0/L1/L2 three layers
Structured browsing ❌ ✅ Virtual file system
Token savings ❌ ✅ On-demand loading

Installation

1. Install the Python package

pip install openviking

2. Get an Embedding API Key

The free NVIDIA NIM API is recommended:

  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 such as Volcano Engine or OpenAI.

3. Create a configuration file

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. Set environment variables

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

Usage

The Agent calls the scripts/viking.sh script via exec:

# 查看状态
bash skills/openviking/scripts/viking.sh info

# 索引文件
bash skills/openviking/scripts/viking.sh add ./my-document.md

# 批量索引目录
bash skills/openviking/scripts/viking.sh add-dir ./docs/

# 语义搜索
bash skills/openviking/scripts/viking.sh search "某个话题"

# 浏览已索引的文件
bash skills/openviking/scripts/viking.sh list

# 读取文件摘要
bash skills/openviking/scripts/viking.sh summary <file-path>

Imperial court integration suggestions

  • Ministry of War: index code repositories, search related code snippets
  • Ministry of Revenue: index financial statements, query historical data
  • Ministry of Rites: index brand assets and marketing cases
  • Ministry of Works: index operations documentation and runbooks
  • Ministry of Justice: index laws and regulations and contract templates

It is recommended to keep qmd for daily lightweight memory and use OpenViking for large-scale knowledge bases.