OpenViking is an open-source context database designed specifically for AI Agents(such as openclaw). OpenViking unifies the management of context (memory, resources, and skills) that Agents need through a file system paradigm, enabling hierarchical context delivery and self-evolving.
npx skills add https://github.com/volcengine/openviking --skill openviking-memoryInstallieren Sie diesen Skill über die CLI und beginnen Sie mit der Verwendung des SKILL.md-Workflows in Ihrem Arbeitsbereich.
Website · GitHub · Issues · Docs
👋 Join our Community
📱 Lark Group · WeChat · Discord · X
In the AI era, data is abundant, but high-quality context is hard to come by. When building AI Agents, developers often face these challenges:
OpenViking is an open-source Context Database designed specifically for AI Agents.
We aim to define a minimalist context interaction paradigm for Agents, allowing developers to completely say goodbye to the hassle of context management. OpenViking abandons the fragmented vector storage model of traditional RAG and innovatively adopts a "file system paradigm" to unify the structured organization of memories, resources, and skills needed by Agents.
With OpenViking, developers can build an Agent's brain just like managing local files:
Before starting with OpenViking, please ensure your environment meets the following requirements:
pip install openviking --upgrade --force-reinstall
curl -fsSL https://raw.githubusercontent.com/volcengine/OpenViking/main/crates/ov_cli/install.sh | bash
Or build from source:
cargo install --git https://github.com/volcengine/OpenViking ov_cli
OpenViking requires the following model capabilities:
OpenViking supports multiple VLM providers:
| Provider | Description | Setup |
|---|---|---|
volcengine |
Volcengine Doubao Models | Volcengine Console |
openai |
OpenAI Official API | OpenAI Platform |
openai-codex |
Codex VLM | Use openviking-server init |
kimi |
Kimi Code Membership | Use openviking-server init |
glm |
GLM Coding Plan | Use openviking-server init |
Volcengine supports both model names and endpoint IDs. Using model names is recommended for simplicity:
{
"vlm": {
"provider": "volcengine",
"model": "doubao-seed-2-0-pro-260215",
"api_key": "your-api-key",
"api_base": "https://ark.cn-beijing.volces.com/api/v3"
}
}
You can also use endpoint IDs (found in Volcengine ARK Console:
{
"vlm": {
"provider": "volcengine",
"model": "ep-20241220174930-xxxxx",
"api_key": "your-api-key",
"api_base": "https://ark.cn-beijing.volces.com/api/v3"
}
}
Use OpenAI's official API:
{
"vlm": {
"provider": "openai",
"model": "gpt-4o",
"api_key": "your-api-key",
"api_base": "https://api.openai.com/v1"
}
}
You can also use a custom OpenAI-compatible endpoint:
{
"vlm": {
"provider": "openai",
"model": "gpt-4o",
"api_key": "your-api-key",
"api_base": "https://your-custom-endpoint.com/v1"
}
}
Use this provider when you want OpenViking to call Codex VLM through your ChatGPT/Codex OAuth session instead of a standard OpenAI API key:
openviking-server init
# choose OpenAI Codex when prompted
openviking-server doctor
{
"vlm": {
"provider": "openai-codex",
"model": "gpt-5.3-codex",
"api_base": "https://chatgpt.com/backend-api/codex",
"temperature": 0.0,
"max_retries": 2
}
}
💡 Tip:
openai-codexdoes not requirevlm.api_keywhen Codex OAuth is available- OpenViking stores its own Codex auth state at
~/.openviking/codex_auth.jsonopenviking-server doctorvalidates that the current Codex auth is usable
Use this provider when you want OpenViking to call the dedicated Kimi Coding subscription endpoint directly:
openviking-server init
# choose Kimi Coding when prompted
openviking-server doctor
{
"vlm": {
"provider": "kimi",
"model": "kimi-code",
"api_key": "your-kimi-subscription-api-key",
"api_base": "https://api.kimi.com/coding",
"temperature": 0.0,
"max_retries": 2
}
}
💡 Tip:
kimiapplies the recommended Kimi Coding defaults automatically, including the default Kimi Coding user agentkimi-codeandkimi-codingare accepted aliases for the provider namekimi-codeis normalized to Kimi's upstream coding model automatically
Use this provider when you want OpenViking to call Z.AI's OpenAI-compatible Coding Plan endpoint directly:
openviking-server init
# choose GLM Coding Plan when prompted
openviking-server doctor
{
"vlm": {
"provider": "glm",
"model": "glm-4.6v",
"api_key": "your-zai-api-key",
"api_base": "https://api.z.ai/api/coding/paas/v4",
"temperature": 0.0,
"max_retries": 2
}
}
💡 Tip:
glm,zhipu,zai,z-ai, andz.aiall resolve to the same first-class GLM provider- The default endpoint is the Coding Plan endpoint, not the general Z.AI endpoint
- Use a vision-capable model such as
glm-4.6vorglm-5v-turbofor multimodal parsing
If you want to run OpenViking with local models via Ollama, the interactive setup wizard handles everything automatically:
openviking-server init
The wizard will:
ov.conf configuration fileTo validate your setup at any time:
openviking-server doctor
doctor checks local prerequisites (config file, Python version, embedding/VLM provider connectivity, disk space) without requiring a running server.
For cloud API providers (Volcengine, OpenAI, Gemini, etc.), continue with the manual configuration below.
The recommended first-time flow is:
openviking-server init
openviking-server doctor
If you choose OpenAI Codex inside openviking-server init, the wizard can import existing Codex auth or start the Codex sign-in flow for you.
If you prefer manual configuration, create ~/.openviking/ov.conf, remove the comments before copy:
{
"storage": {
"workspace": "/home/your-name/openviking_workspace"
},
"log": {
"level": "INFO",
"output": "stdout" // Log output: "stdout" or "file"
},
"embedding": {
"dense": {
"api_base" : "<api-endpoint>", // API endpoint address
"api_key" : "<your-api-key>", // Model service API Key
"provider" : "<provider-type>", // Provider type: "volcengine" or "openai" (currently supported)
"dimension": 1024, // Vector dimension
"model" : "<model-name>" // Embedding model name (e.g., doubao-embedding-vision-251215 or text-embedding-3-large)
},
"max_concurrent": 10 // Max concurrent embedding requests (default: 10)
},
"vlm": {
"api_base" : "<api-endpoint>", // API endpoint address
"api_key" : "<your-api-key>", // Model service API Key (optional for openai-codex)
"provider" : "<provider-type>", // Provider type (volcengine, openai, openai-codex, kimi, glm, etc.)
"model" : "<model-name>", // VLM model name (e.g., doubao-seed-2-0-pro-260215 or gpt-4-vision-preview)
"max_concurrent": 100 // Max concurrent LLM calls for semantic processing (default: 100)
}
}
Note: For embedding models, supported providers are
volcengine(Doubao),openai,jina,voyage,minimax,vikingdb, andgemini(requirespip install "google-genai>=1.0.0"). For VLM models, common providers includevolcengine,openai,openai-codex,kimi, andglm.
👇 Expand to see the configuration example for your model service:
{
"storage": {
"workspace": "/home/your-name/openviking_workspace"
},
"log": {
"level": "INFO",
"output": "stdout" // Log output: "stdout" or "file"
},
"embedding": {
"dense": {
"api_base" : "https://ark.cn-beijing.volces.com/api/v3",
"api_key" : "your-volcengine-api-key",
"provider" : "volcengine",
"dimension": 1024,
"model" : "doubao-embedding-vision-251215"
},
"max_concurrent": 10
},
"vlm": {
"api_base" : "https://ark.cn-beijing.volces.com/api/v3",
"api_key" : "your-volcengine-api-key",
"provider" : "volcengine",
"model" : "doubao-seed-2-0-pro-260215",
"max_concurrent": 100
}
}
{
"storage": {
"workspace": "/home/your-name/openviking_workspace"
},
"log": {
"level": "INFO",
"output": "stdout" // Log output: "stdout" or "file"
},
"embedding": {
"dense": {
"api_base" : "https://api.openai.com/v1",
"api_key" : "your-openai-api-key",
"provider" : "openai",
"dimension": 3072,
"model" : "text-embedding-3-large"
},
"max_concurrent": 10
},
"vlm": {
"api_base" : "https://api.openai.com/v1",
"api_key" : "your-openai-api-key",
"provider" : "openai",
"model" : "gpt-4-vision-preview",
"max_concurrent": 100
}
}
Install the required package first:
pip install "google-genai>=1.0.0"
{
"storage": {
"workspace": "/home/your-name/openviking_workspace"
},
"embedding": {
"dense": {
"provider": "gemini",
"api_key": "your-google-api-key",
"model": "gemini-embedding-2-preview",
"dimension": 3072
},
"max_concurrent": 10
},
"vlm": {
"api_base" : "https://api.openai.com/v1",
"api_key" : "your-openai-api-key",
"provider" : "openai",
"model" : "gpt-4o",
"max_concurrent": 100
}
}
Get your Google API key at https://aistudio.google.com/apikey
Use openviking-server init and choose OpenAI Codex, then run openviking-server doctor.
{
"storage": {
"workspace": "/home/your-name/openviking_workspace"
},
"embedding": {
"dense": {
"api_base" : "https://ark.cn-beijing.volces.com/api/v3",
"api_key" : "your-volcengine-api-key",
"provider" : "volcengine",
"dimension": 1024,
"model" : "doubao-embedding-vision-251215"
}
},
"vlm": {
"api_base" : "https://chatgpt.com/backend-api/codex",
"provider" : "openai-codex",
"model" : "gpt-5.3-codex",
"max_concurrent": 100
}
}
After creating the configuration file, set the environment variable to point to it (Linux/macOS):
export OPENVIKING_CONFIG_FILE=~/.openviking/ov.conf # by default
On Windows, use one of the following:
PowerShell:
$env:OPENVIKING_CONFIG_FILE = "$HOME/.openviking/ov.conf"
Command Prompt (cmd.exe):
set "OPENVIKING_CONFIG_FILE=%USERPROFILE%\.openviking\ov.conf"
💡 Tip: You can also place the configuration file in other locations, just specify the correct path in the environment variable.
👇 Expand to see the configuration example for your CLI/Client:
Example: ovcli.conf for visiting localhost server
{
"url": "http://localhost:1933",
"timeout": 60.0,
"output": "table"
}
After creating the configuration file, set the environment variable to point to it (Linux/macOS):
export OPENVIKING_CLI_CONFIG_FILE=~/.openviking/ovcli.conf # by default
On Windows, use one of the following:
PowerShell:
$env:OPENVIKING_CLI_CONFIG_FILE = "$HOME/.openviking/ovcli.conf"
Command Prompt (cmd.exe):
set "OPENVIKING_CLI_CONFIG_FILE=%USERPROFILE%\.openviking\ovcli.conf"
📝 Prerequisite: Ensure you have completed the configuration (ov.conf and ovcli.conf) in the previous step.
Now let's run a complete example to experience the core features of OpenViking.
openviking-server doctor
openviking-server
If you configured provider=openai-codex, openviking-server doctor already validates Codex auth.
or you can run in background
nohup openviking-server > /data/log/openviking.log 2>&1 &
ov status
ov add-resource https://github.com/volcengine/OpenViking # --wait
ov ls viking://resources/
ov tree viking://resources/volcengine -L 2
# wait some time for semantic processing if not --wait
ov find "what is openviking"
ov grep "openviking" --uri viking://resources/volcengine/OpenViking/docs/zh
Congratulations! You have successfully run OpenViking 🎉
VikingBot is an AI agent framework built on top of OpenViking. Here's how to get started:
# Option 1: Install VikingBot from PyPI (recommended for most users)
pip install "openviking[bot]"
# Option 2: Install VikingBot from source (for development)
uv pip install -e ".[bot]"
# Start OpenViking server with Bot enabled
openviking-server --with-bot
# In another terminal, start interactive chat
ov chat
If you use the official Docker image, vikingbot is already bundled in the image and starts by default together with the OpenViking server and console UI. You can disable it at runtime with either --without-bot or -e OPENVIKING_WITH_BOT=0.
For production environments, we recommend running OpenViking as a standalone HTTP service to provide persistent, high-performance context support for your AI Agents.
🚀 Deploy OpenViking on Cloud:
To ensure optimal storage performance and data security, we recommend deploying on Volcengine Elastic Compute Service (ECS) using the veLinux operating system. We have prepared a detailed step-by-step guide to get you started quickly.
👉 View: Server Deployment & ECS Setup Guide
| Experimental Group | Task Completion Rate | Cost: Input Tokens (Total) |
|---|---|---|
| OpenClaw(memory-core) | 35.65% | 24,611,530 |
| OpenClaw + LanceDB (-memory-core) | 44.55% | 51,574,530 |
| OpenClaw + OpenViking Plugin (-memory-core) | 52.08% | 4,264,396 |
| OpenClaw + OpenViking Plugin (+memory-core) | 51.23% | 2,099,622 |
👉 View: OpenClaw Context Plugin
👉 View: OpenCode Memory Plugin Example
👉 View: Claude Code Memory Plugin Example
--
After running the first example, let's dive into the design philosophy of OpenViking. These five core concepts correspond one-to-one with the solutions mentioned earlier, together building a complete context management system:
We no longer view context as flat text slices but unify them into an abstract virtual filesystem. Whether it's memories, resources, or capabilities, they are mapped to virtual directories under the viking:// protocol, each with a unique URI.
This paradigm gives Agents unprecedented context manipulation capabilities, enabling them to locate, browse, and manipulate information precisely and deterministically through standard commands like ls and find, just like a developer. This transforms context management from vague semantic matching into intuitive, traceable "file operations". Learn more: Viking URI | Context Types
viking://
├── resources/ # Resources: project docs, repos, web pages, etc.
│ ├── my_project/
│ │ ├── docs/
│ │ │ ├── api/
│ │ │ └── tutorials/
│ │ └── src/
│ └── ...
├── user/ # User: personal preferences, habits, etc.
│ └── memories/
│ ├── preferences/
│ │ ├── writing_style
│ │ └── coding_habits
│ └── ...
└── agent/ # Agent: skills, instructions, task memories, etc.
├── skills/
│ ├── search_code
│ ├── analyze_data
│ └── ...
├── memories/
└── instructions/
Stuffing massive amounts of context into a prompt all at once is not only expensive but also prone to exceeding model windows and introducing noise. OpenViking automatically processes context into three levels upon writing:
Learn more: Context Layers
viking://resources/my_project/
├── .abstract # L0 Layer: Abstract (~100 tokens) - Quick relevance check
├── .overview # L1 Layer: Overview (~2k tokens) - Understand structure and key points
├── docs/
│ ├── .abstract # Each directory has corresponding L0/L1 layers
│ ├── .overview
│ ├── api/
│ │ ├── .abstract
│ │ ├── .overview
│ │ ├── auth.md # L2 Layer: Full content - Load on demand
│ │ └── endpoints.md
│ └── ...
└── src/
└── ...
Single vector retrieval struggles with complex query intents. OpenViking has designed an innovative Directory Recursive Retrieval Strategy that deeply integrates multiple retrieval methods:
This "lock high-score directory first, then refine content exploration" strategy not only finds the semantically best-matching fragments but also understands the full context where the information resides, thereby improving the globality and accuracy of retrieval. Learn more: Retrieval Mechanism
OpenViking's organization uses a hierarchical virtual filesystem structure. All context is integrated in a unified format, and each entry corresponds to a unique URI (like a viking:// path), breaking the traditional flat black-box management mode with a clear hierarchy that is easy to understand.
The retrieval process adopts a directory recursive strategy. The trajectory of directory browsing and file positioning for each retrieval is fully preserved, allowing users to clearly observe the root cause of problems and guide the optimization of retrieval logic. Learn more: Retrieval Mechanism
OpenViking has a built-in memory self-iteration loop. At the end of each session, developers can actively trigger the memory extraction mechanism. The system will asynchronously analyze task execution results and user feedback, and automatically update them to the User and Agent memory directories.
This allows the Agent to get "smarter with use" through interactions with the world, achieving self-evolution. Learn more: Session Management
For more details, please visit our Full Documentation.
For more details, please see: About Us
OpenViking is still in its early stages, and there are many areas for improvement and exploration. We sincerely invite every developer passionate about AI Agent technology:
Let's work together to define and build the future of AI Agent context management. The journey has begun, looking forward to your participation!
The OpenViking project uses different licenses for different components: