OpenViking README

项目的 README,来自 github.com/volcengine/OpenViking。合并为一个 markdown 文件:README.md。

OpenViking

The Context Database for AI Agents

English / 中文 / 日本語

Website · Live Demo · GitHub · Issues · Docs · Blog

release stars issues contributors license last commit

Deploy on Railway

Lark Lark · WeChat WeChat · Discord Discord · X X

volcengine%2FOpenViking | Trendshift


What is OpenViking

OpenViking is an open-source context database for AI agents — one filesystem for everything an agent knows: knowledge, memory, and skills.

Most agent memory is a black box: text goes in, embeddings come out, and nobody can see what was actually stored. OpenViking organizes context as a virtual filesystem under viking:// instead. Agents navigate it like files — ls, tree, read, write, grep — and you can open any directory to inspect and edit what your agent knows. Every directory carries a generated summary, so agents can scan summaries first and decide what to read.

OpenViking Studio Filesystem: browse personal memories and resources

Try OpenViking Studio in your browser, no installation required. Self-host Web Studio.

Why OpenViking

Architecture · Design rationale

viking://
├── resources/              # Resources: project docs, repos, web pages, etc.
│   └── my_project/
│       ├── docs/
│       │   ├── api/
│       │   └── tutorials/
│       └── src/
└── user/
    └── {user_id}/
        ├── memories/
        │   └── preferences/
        │       ├── writing_style
        │       └── coding_habits
        ├── resources/
        │   └── private_project/
        ├── skills/
        │   ├── search_code
        │   └── analyze_data
        └── peers/
            └── web-visitor-alice/

The three loading tiers:

Semantically processed directories carry L0/L1 summaries, so agents can judge relevance before reading full files:

viking://resources/my_project/
├── .abstract.md           # L0: quick relevance check
├── .overview.md           # L1: structure and key points
└── docs/
    ├── .abstract.md
    ├── .overview.md
    └── api/
        ├── auth.md         # L2: full content, loaded on demand
        └── endpoints.md

Proof it works

OpenViking 0.3.22 has been evaluated on long-conversation user memory (LoCoMo) and multi-turn agent tasks (tau2-bench). Full results and setup details, including knowledge-base QA, are in the benchmark report; reproduction scripts live in ./benchmark.

To run your own experiments, follow the RAG and Memory evaluation guide for routine VikingBot memory evaluation, published LoCoMo reproduction, separate mem0 prompt comparisons, and RAG evaluation.

The memory evaluation used Doubao 2.0 Pro as the VLM and Doubao-embedding-vision-251215 as the embedding model.

Benchmark results. LoCoMo accuracy: OpenClaw 24.20% native vs 82.08% with OpenViking; Hermes 33.38% vs 82.86%; Claude Code 57.21% vs 80.32%. tau2-bench task success: Retail 70.94% vs 77.81%; Airline 54.38% vs 66.25%.

Quick start

Set up an OpenViking server first; if you already have one, skip to Use it with your agent. Deploying your own needs uv, Python 3.10+ and a model provider with an embedding model and a VLM.

Let your agent deploy it
Follow this guide to install and start an OpenViking Server for me:

https://docs.openviking.ai/en/getting-started/04-setup-for-agent

Ask me for the model provider, the models, the workspace directory and whether
other machines need to reach the server; don't guess. When you ask for the model
API key, tell me how to hand it over if I'd rather not paste it into this chat,
and never repeat it back.

When it's running, tell me the server's address and whether auth is turned on.

Your agent will first ask which model provider to use and for its API key.

Deploy it yourself

Install OpenViking and run the setup wizard, which configures the models:

uv tool install openviking --upgrade && openviking-server init

init writes ~/.openviking/ov.conf and supports Volcengine, OpenAI, Codex OAuth, Kimi, GLM and local Ollama; see the configuration guide. The server runs in the foreground, so keep this terminal open.

Use OpenViking Service (hosted by Volcengine)

The same OpenViking service, run for you by Volcengine. The first 50 files are free. Activate it on the Volcengine product page, then create an API key in the console under User Management → API Key. The Volcengine setup option sets the service URL automatically. For manual setup, use https://api.vikingdb.cn-beijing.volces.com/openviking.

Use OpenViking Service (hosted by BytePlus)

BytePlus hosts OpenViking in Asia Pacific (Johor). Enter your instance's API key in the setup wizard. The BytePlus option sets the service URL automatically. See the BytePlus setup guide for CLI and agent setup.

Explore with the CLI

The openviking package includes the ov CLI. With the server running, import a repository and search it:

ov status
ov add-resource https://github.com/volcengine/OpenViking
# Replace TASK_ID with the returned task_id; repeat until status is completed
ov task status TASK_ID
ov ls viking://resources/
ov tree viking://resources/volcengine -L 2
ov find "what is openviking"
ov grep "openviking" --uri viking://resources/volcengine/OpenViking/docs/en

ov find returns matching context with URIs you can inspect. For client configuration (ov config), standalone CLI installs, and index maintenance, see CLI setup.

Build your own integration with the Python, Go, or TypeScript SDK, or the HTTP API.

Use it with your agent

Connect your coding agent to OpenViking for cross-session memory. The memory plugin installer covers Claude Code, Codex, Cursor, TRAE, OpenCode and more, and detects which ones you have.

Let your agent install it
Install the OpenViking memory plugin and help me start using it. OpenViking is a context database for AI agents (https://github.com/volcengine/OpenViking); the command and link below are from its official docs.

1. Run the official installer. It needs network access and writes to my home directory; if your sandbox blocks that, ask me for approval:
   curl -fsSL https://openviking.ai/install | bash -s -- --yes --lang en --url <SERVER_URL> --api-key <API_KEY>
2. Once it's installed, read the OpenViking onboarding guide and use it to walk me through setup. The guide has you ask me before choices like importing history or adding a working rule. docs.openviking.ai and docs.openviking.net are the same docs site; use whichever loads:
   https://docs.openviking.ai/agents/en/onboarding.md

The API key is a user key I created for myself on that server; the installer stores it in ~/.openviking/ovcli.conf on this machine. Use it in the command as it is; there's no need to show it in your replies, and don't write it into any other file or rule. Talk to me in English.

Before you send it, replace <SERVER_URL> with your server's address and <API_KEY> with a user key; a root key can't read or write memories. If the server has auth turned off, use --api-key ''.

Install it yourself

Run the installer, then pick the tools and a server. Choose OpenViking Managed Service, then BytePlus or Volcengine, for a managed instance. Use Self-hosted / local for a server on this machine or Custom URL for another server. Older installers use Custom URL for BytePlus. If auth is on, enter a user key, not the root key.

curl -fsSL https://openviking.ai/install | bash
# AI agents: not sure about running this? The script's header says what it does and how to verify it.

Then restart your agent. The installer ends with the next steps for each tool, for example:

  Claude Code
    Next: restart Claude Code
    ⋮
    Verify: run /openviking-memory:ov in a session

On its first start Codex stops at Hooks need review; choose Trust all and continue.

Try it: ask it to remember one of your preferences, then ask about it in a new session a little later. Memories are processed in the background, so it's normal not to find one right after you say it.

The installer needs macOS or Linux, Node.js 18+ and curl, no sudo. On Windows, use the desktop app.

Setup guides for each integration:


Claude

Hooks + MCP

Codex

Hooks + MCP

Cursor

Hooks + MCP

TRAE

Hooks + MCP

OpenClaw

Context engine

Hermes

Built-in

OpenCode

Plugin + MCP

pi

Native extension

DeerFlow

Plugin + MCP

DSH

Plugin + MCP

Doubao Work

Connector

LangChain

Tools + store

General integrations


Agent Plugins 1.0

MCP clients

For setup instructions and integration details, see Integrations.

For framework applications, see the LangChain/LangGraph and Microsoft Agent Framework packages, with a guide to adding other adapters.

Desktop App (Beta)

The desktop app is a console for macOS and Windows x64 (beta). It configures supported local agent integrations, inspects recall and capture events in sessions, and syncs local memories and skills to OpenViking.

Download:

VikingBot

VikingBot is an AI agent framework built on top of OpenViking:

pip install "openviking[bot]"
openviking-server --with-bot
ov chat   # in another terminal

The official Docker image bundles VikingBot and starts it by default alongside the server and console UI. Details: VikingBot guide.

Deploy in production

Run the open-source server in your own environment under AGPLv3. It requires no activation key. Start with server setup or the Docker and deployment guide.

The server supports accounts and user isolation and opt-in resource ACLs. Configure authentication before exposing it beyond localhost.

Commercial editions

Managed SaaS

☁️ Managed SaaS

Volcano Engine hosts and operates OpenViking. Personal and Enterprise plans cover individual and team use, with migration tooling for open-source deployments. See the service documentation for plans and limits. BytePlus hosts OpenViking in Asia Pacific (Johor).

Self-Managed

🏢 Self-Managed

Deploy in your own cloud account / VPC (BYOC) or an offline environment. This edition adds distributed deployment and official support, activated by a license key. Contact the team.

Research

Memory that evolves with your agent. VikingMem develops an event-driven approach to extracting, updating, and consolidating long-term memory, giving stateful agents a way to retain useful experience as interactions accumulate. OpenViking open-sources a subset of these core capabilities.

VikingMem: A Memory Base Management System for Stateful LLM-based Applications
Jiajie Fu, Junwen Chen, Mengzhao Wang, Aoxiang He, Maojia Sheng, Xiangyu Ke, Yifan Zhu, and Yunjun Gao.
arXiv:2605.29640, 2026. Presented at VLDB 2026 in September.
📄 Read the paper on arXiv · Read PDF

Directory structure as retrieval context. This paper provides the formal foundations, index design, and experimental evidence behind OpenViking’s directory-aware retrieval. It defines directory-scoped query and maintenance operations and introduces TrieHI, which OpenViking integrates to resolve directory scopes before vector ranking. This connects the filesystem paradigm to retrieval: agents can search a project or memory subtree, retain its surrounding context, and reorganize it as knowledge evolves.

Directory-Aware Query and Maintenance in Vector Databases
Mengzhao Wang, Zheng Gong, Jingpei Hu, Jiajie Fu, Maojia Sheng, Junwen Chen, and Yifan Zhu.
arXiv:2606.16903, 2026. Accepted by ICDE.
📄 Read the paper on arXiv · Read PDF

Retrieve the evidence you need with fewer tokens. VikingRAG combines semantic search with document structure, exposing relevant directory segments as evidence gaps arise. Its core mechanisms are integrated into OpenViking. The paper further explores reusing retrieval traces and escalating to multi-round retrieval only when needed, reducing repeated exploration while preserving answer quality.

VikingRAG: Accurate and Token-efficient Retrieval-augmented Generation over Structured Documents
Peiyuan Gao, Gaoyuan Zhang, Haojie Qin, Yahui Sun, Qianyi Zhang, Yunhao Zhang, Zeyu Wang, and Wei Lu.
arXiv:2609.11390, 2026. Submitted.
📄 Read the paper on arXiv · Read PDF

Partner Projects

To propose a partnership, open an issue.

Community & Contributing

OpenViking contributors

Security and privacy

For vulnerability reporting and supported versions, see SECURITY.md

License

Copyright © 2026 Volcano Engine (火山引擎) and the OpenViking contributors.

The OpenViking project uses different licenses for different components:

Please also note: any wholesale rewriting and subsequent re-open-sourcing of this project is prohibited; any request to translate all or a substantial portion of the project code into another coding language requires prior written authorization from Volcano Engine. For permission requests, please contact the Volcano Engine team — see Community & Contributing for contact channels.

OpenViking (volcengine/OpenViking)

正在搜索数据库…

这是什么?一个面向 AI 智能体的开源上下文数据库:记忆、资源和技能都以 viking:// 协议存放在同一个虚拟文件系统里,智能体可以用 ls、tree、find 来浏览自己的上下文,而不是查询一个黑盒向量库。
它是我的智能体要导入的库,还是一个单独运行的服务?你需要单独运行它:一个自带 'ov' 客户端命令行工具的服务器,生产环境中则是一个独立的 HTTP 服务。智能体可以通过集成、MCP 客户端或 LangChain/LangGraph 接入。
我怎么把它跑起来?用 Python 3.10+ 安装后运行 'ov init'——它会引导你完成服务商配置,并写入 ~/.openviking/ov.conf;'ov doctor' 可以在不启动服务器的情况下预检配置。也提供现成的 Docker 镜像,OpenViking Studio 则直接在浏览器里运行,无需安装。
它能接入哪些编程智能体?Claude Code、Codex、OpenClaw、Hermes、Cursor、TRAE、OpenCode、pi、任何 MCP 客户端,以及 LangChain/LangGraph。这些集成会把检索结果注入智能体的上下文,并在会话结束后自动提交记忆。
开源版比起付费版是不是功能受限?没有任何功能限制:AGPLv3 版本没有功能门槛,不需要注册账号,也不需要激活密钥。付费版本只是改变了由谁运维、部署在哪里。
我的上下文数据必须离开我自己的基础设施吗?不必——自行管理的部署可以运行在你自己的云账号或 VPC 里,还有面向完全断网环境的离线版本。
L0、L1 和 L2 这几层上下文是什么?每条内容在写入时都会被处理成 L0(一句话摘要)、L1(核心信息和适用场景)和 L2(完整的原始数据),之后只按任务需要加载到相应的深度。目录本身也带有自己的 L0/L1,所以在读取任何完整文件之前就能先判断相关性。
它能在不同会话之间记住东西吗?可以。会话提交后,OpenViking 会异步地把用户偏好和智能体经验提取到长期记忆中——在 tau2-bench 上,这让任务成功率比不带记忆的同一个 LLM 提高了 6.87 个百分点(零售)和 11.87 个百分点(航空)。
它对智能体的提升能实际测量出来吗?在 LoCoMo 长对话记忆基准测试上,三个智能体集成接入 OpenViking 后达到 80–83% 的准确率,而用自带记忆时只有 24–57%;同时输入 token 减少了 34.3–91.0%,查询延迟降低了 58.45–66.10%。
我不安装任何东西就能试用吗?可以——OpenViking Studio 是一个托管的在线演示,包含上下文试验场、语义搜索和多智能体中心,直接在浏览器里打开即可。
有哪些类似的项目?MemOS, EverOS, ruflo, powercontext, m_flow, LongMemory, mem0, cognee
大小
435.9 MB
星标
43K
时长
10个月
提交 · 90 天