OpenViking: The Open-Source Context Database Your Agents Have Been Waiting For

I saw this on Fireship and immediately went down the rabbit hole. OpenViking is one of those tools where you read the README and think: this is how it was always supposed to work.

The Problem With Context Today

If you've been building AI agents for more than five minutes, you've hit the same wall:

  • Memories live in one place (usually a janky file or a vector DB)
  • Resources (docs, repos, web pages) live somewhere else
  • Skills and instructions are scattered across prompts
  • RAG retrieval is a black box β€” when it fails, you have no idea why
  • You either stuff everything into the context window (expensive, noisy) or lose information (broken agent)

It's fragmented. Ugly. And it gets worse at scale.

What OpenViking Does Differently

OpenViking β€” built by Volcengine (ByteDance's cloud arm) and Apache 2.0 licensed β€” throws out the flat vector storage model entirely. Instead, it treats all agent context like a filesystem.

viking://
β”œβ”€β”€ resources/    # docs, repos, web pages
β”œβ”€β”€ user/         # preferences, memories, habits
β”‚   └── memories/
└── agent/        # skills, instructions, task memory
    β”œβ”€β”€ skills/
    └── memories/

Everything gets a URI. You navigate it with ls, find, tree. Deterministic, traceable, debuggable. No more black box.

The L0/L1/L2 Tiering Is Clever

When you write anything to OpenViking, it auto-processes it into three layers:

  • L0 β€” one sentence. "What is this, quickly?"
  • L1 β€” ~2k tokens. Enough to plan and decide.
  • L2 β€” full content. Only pulled when absolutely necessary.

The agent loads what it needs, when it needs it. This isn't just smart β€” it's why the benchmarks are wild.

The Numbers

On the LoCoMo10 long-range dialogue benchmark (1,540 cases):

SetupTask CompletionToken Cost
OpenClaw baseline35.65%24.6M tokens
OpenClaw + LanceDB44.55%51.6M tokens
OpenClaw + OpenViking52.08%4.3M tokens

52% task completion vs 35% baseline. 83% fewer tokens. LanceDB somehow made things worse cost-wise. OpenViking beats both on every axis.

How I'd Use This

I've been thinking about this since I first read the README. Here's where it fits in my stack:

ME.md as a first-class context source

I built ME.md as a portable human context protocol β€” one file that describes who I am, my agent fleet, my stack, my anti-patterns. Any AI can fetch it and know who they're talking to.

OpenViking makes this even more powerful:

ov add-resource https://loooom.xyz/me/mager/raw

That's it. OpenViking ingests it, auto-tiers it into L0/L1/L2, and any agent backed by OpenViking gets my context β€” not from a prompt injection, but from a structured, queryable context database. The retrieval is semantic and structural. ME.md was basically designed for this.

Replacing the manual MEMORY.md layer

Right now I manage a hand-curated MEMORY.md + daily log files for my agents. It works, but it's manual compression. OpenViking's self-evolution loop β€” where it extracts long-term memory at the end of each session automatically β€” is the automated version of what I'm doing by hand. Feed it sessions, it updates viking://user/memories/ and viking://agent/memories/ on its own.

Project context for big codebases

When I'm working on prxps or loooom.xyz, agents currently read whole files to get context. With OpenViking:

ov add-resource ~/Code/loooom

Now agents query viking://resources/loooom/ and get exactly the depth they need. No more dumping entire codebases into context windows.

Getting Started

pip install openviking --upgrade
curl -fsSL https://raw.githubusercontent.com/volcengine/OpenViking/main/crates/ov_cli/install.sh | bash

You'll need an embedding model + VLM. It supports OpenAI, Anthropic (via LiteLLM), Ollama for local β€” the usual suspects. Configure ~/.openviking/ov.conf, spin up openviking-server, and you're talking to it via ov CLI.

There's also VikingBot β€” an agent framework built on top of it β€” if you want the full batteries-included experience:

pip install "openviking[bot]"
openviking-server --with-bot
ov chat

The Bigger Picture

The interesting bet OpenViking is making: context management is a database problem, not a prompt engineering problem. Structured storage, tiered retrieval, observable query traces. The filesystem metaphor is brilliant because it maps to mental models developers already have.

I've been building ME.md as a human-context primitive, and I've been building ACP as an agent-context handoff protocol. OpenViking is the storage layer that sits underneath both. It's the missing piece.

Star the repo: volcengine/OpenViking. It's early (v0.1.x) but the architecture is solid and the benchmarks are real.

This is the kind of open-source that makes the whole ecosystem better.

Tags

aiagentscontextopen-sourcememory