OpenViking
Context filesystem for AI agent memory, resources, and skills
Replaces Mem0, Glean, Cloudflare Agent Memory, Shelf Io

Who it's for
Claude Code, Codex, Cursor, and similar coding agents lose context between sessions. OpenViking integrations inject project docs, past conversation summaries, and coding preferences into the agent context at session start and commit new learnings automatically at session end. Over time, the agent begins reflecting accumulated knowledge about the codebase and developer workflow.
Your agent already uses a managed memory service (Mem0 cloud, Zep, etc.) and you have no infrastructure capacity to maintain a self-hosted server. OpenViking requires an always-on server and a configured LLM provider.
OpenViking's `viking://` namespace is shared across agents. Multiple agents in a pipeline can read the same resources, contribute to the same memory namespace, and inherit each other's accumulated experience. This fits orchestration patterns where specialized sub-agents need access to a common knowledge pool.
Your agents are stateless by design and each invocation is fully independent with no need for shared state across runs.
Every OpenViking query records its directory traversal path. Teams that need to explain why an agent said something can review the retrieval trajectory rather than reconstructing it from embedding similarity scores alone. This is directly useful for compliance reviews, debugging, and structured agent evaluation workflows.
Your team has no requirement to audit or debug retrieval behavior, and a vector store with no trajectory logging meets your needs.
Ollama support is built in, and the `doctor` command validates hardware compatibility before the server starts. You can run a full OpenViking instance with local models on a developer machine with no cloud API keys required. Tiered loading reduces the memory footprint compared to loading full documents into context on each query.
You need a fully managed hosted service with no server to operate. The open-source edition is self-hosted only; the managed SaaS (Volcano Engine) is aimed at enterprise buyers.
The problem
AI agents have a context problem: session memory evaporates between conversations, retrieved documents are stored separately from agent skills, and retrieval from a vector store is a black box with no way to trace what path produced a result. Every agent integration ends up with a different memory mechanism, so agents that work well in one framework cannot carry their experience to another. Teams building production agents spend significant time wiring ad-hoc memory systems together: one database for conversation history, another for long-term preferences, another for knowledge bases, none of them connected. When retrieval goes wrong there is no trajectory to inspect and no way to understand why a result appeared. Agents that lack persistent experience memory start every session from scratch, repeating mistakes and failing to build on successful patterns from prior runs.
How it works
Agents address every piece of context with a `viking://` URI and navigate it using `ls`, `tree`, and `find`. Resources, memories, and skills each occupy a predictable path, so agent code that reads `viking://user/{id}/memories/preferences/` behaves exactly like code reading a directory tree.
Every indexed document is processed into L0 (one-sentence abstract, ~100 tokens), L1 (core overview, ~2k tokens), and L2 (full original content). Retrieval loads only the tier the task requires, reducing token consumption by 34-91% compared to loading full documents at query time, according to published benchmarks.
Each query preserves its directory-browsing path, so when a result looks wrong you can trace exactly which `viking://` directories were traversed to produce it. The retrieval path is a first-class inspectable artifact, not a hidden implementation detail.
After a session ends, OpenViking asynchronously extracts user preferences and agent experience from the conversation transcript and writes them to long-term memory. Agents accumulate knowledge across sessions without any explicit memory-write code in the agent itself.
Native integrations exist for Claude Code, Codex, Cursor, OpenCode, Hermes, TRAE, LangChain/LangGraph, and any MCP-compatible client. Each integration injects OpenViking recall into the agent context at session start and commits memory at session end without additional configuration on the agent side.
Features
- viking:// Filesystem Protocol
- Three-Tier Content Loading
- Observable Retrieval Trajectory
- Automatic Session Memory Extraction
- Wide Agent and Framework Integration
How to install
Self-hosting runs as a Python server; install with pip and use the interactive setup wizard.
pip install openviking --upgrade
openviking-server init
openviking-server doctor
openviking-serverRecommended for this setup
Strengths
- Benchmark-validated memory improvement: LoCoMo long-conversation memory accuracy reached 80-83% across all three tested agents (up from 24-57% on native memory), with input tokens dropping 34-91% and query latency dropping 58-66%. These results include reproduction scripts in the repository and were published alongside acceptance at VLDB 2026.
- AGPL-3.0 with no feature gates: The open-source edition is fully functional: no capability restrictions, no account requirement, no activation key. Commercial SaaS and self-managed enterprise tiers add operational support and distributed deployment, but every feature in the repository is available to self-hosters from day one.
- Filesystem metaphor lowers the debugging floor: Developers already know how to inspect file trees. OpenViking's `ov ls`, `ov tree`, and `ov grep` commands make context inspection a task any engineer can run without needing to understand vector embedding internals or write custom query code.
- Research-backed architecture: The underlying design derives from VikingMem, a memory management paper accepted at VLDB 2026. Architecture decisions are documented in the project blog rather than left as implementation details, and the benchmark methodology is fully reproducible.
Trade-offs
- AGPL-3.0 requires source distribution for network services: AGPL-3.0 requires distributing source modifications if you run a modified version as a network service. Teams embedding OpenViking in a product they offer to external users need to review their compliance obligations before shipping, unlike with MIT-licensed memory libraries.
- Self-hosting requires active configuration: You still need to configure an LLM provider (Volcengine, OpenAI, Kimi, GLM, or Ollama), allocate disk for the vector index, and maintain a running server. The `init` wizard helps, but OpenViking is not a drop-in library that works with no external dependencies.
- High open issue count on a young project: At 457 open issues on a repository created in January 2026, the project is moving fast with an accumulating backlog. Users who hit edge cases may find themselves on the frontier of reported-but-unresolved bugs, and some integration paths may still be rough.
Tech stack
FAQ
The open-source edition is AGPL-3.0 licensed and free to self-host with no feature gates, no account requirement, and no activation key. The managed SaaS on Volcano Engine has paid tiers; the self-managed enterprise edition requires a license key for distributed deployment and official support. For most individual and team use cases, self-hosting the open-source edition costs only server time.
Yes. The `openviking-server init` wizard detects a local Ollama installation, can pull compatible models suited to your hardware, and writes the configuration automatically. You can run a complete OpenViking instance with no cloud API keys, using only local Ollama models for embedding and generation steps.
Mem0 is a managed API service with no self-hosting option for the full feature set; OpenViking is a fully self-hosted open-source system. OpenViking also exposes the retrieval path as an inspectable trajectory so you can debug what the agent recalled and why, whereas Mem0's retrieval is a managed black box. The tradeoff is operational overhead: Mem0 requires no infrastructure, while OpenViking requires a running server and provider configuration.
OpenViking has documented integrations for Claude Code, Codex, Cursor, OpenCode, Hermes, TRAE, LangChain, LangGraph, and any MCP-compatible client. Agent Plugins 1.0 also provides a plugin interface for frameworks not covered by the official integrations.
Yes. The self-managed offline edition is designed for air-gapped environments in regulated industries. For the open-source edition, offline operation is also possible when you configure a local Ollama provider, since no cloud API calls are required in that setup. The `doctor` command validates the full configuration including provider connectivity before the server starts.