OpenViking

A Context Database for AI Agents -- Explained Like You're Five

agent37.club

The Problem: AI Agents Have Terrible Memory

Imagine you had a brilliant assistant, but every morning they forgot everything from yesterday.

Without OpenViking

  • Agent forgets past conversations
  • Docs scattered across 5 different tools
  • Skills learned once, lost forever
  • Every task starts from scratch

With OpenViking

  • Agent remembers everything important
  • All knowledge in one organized place
  • Skills grow over time
  • Gets smarter with every session

Think of It Like a Filing Cabinet

Instead of throwing papers in a pile, OpenViking gives your AI agent a well-organized filing cabinet with labeled drawers and folders.

viking://resources/Project docs, repos, web pages
viking://user/Your preferences and habits
viking://agent/Skills and task memories

Key Insight

Every piece of context gets a unique address (URI), just like every file on your computer has a path. Agents browse context the same way you browse files: ls, find, tree.

Three Levels of Detail: L0 / L1 / L2

You don't read an entire encyclopedia to answer a simple question. OpenViking works the same way.

L0 -- The Post-it Note

A one-sentence summary. ~100 tokens.
"This is a Python web scraper for news sites."

L1 -- The Executive Summary

Core info and usage scenarios. ~2,000 tokens.
Key functions, inputs, outputs, when to use it.

L2 -- The Full Document

Complete original data. Loaded only when needed.
Every line of code, every page of docs.

Why This Matters

LLMs charge by the token. Loading everything every time is like driving a semi truck to buy milk. L0/L1/L2 lets the agent grab only what it needs.

Finding Stuff: Directory Recursive Retrieval

Traditional RAG is like searching a messy desk. OpenViking is like navigating a well-organized library.

Step by Step

  • 1. Agent asks: "How do I deploy to K8s?"
  • 2. OpenViking finds the right "shelf" (directory)
  • 3. Drills into the right "folder" inside that shelf
  • 4. Pulls the exact "page" that answers the question
  • 5. Shows its work -- you can see the full search path
# Like navigating a library:
Library
  |-- Technology        # floor
       |-- DevOps      # section
            |-- K8s Guide # book
                 |-- Ch.3  # page

Memory That Grows Over Time

After each conversation, OpenViking automatically extracts and saves what the agent learned.

What Gets Remembered

  • Tool usage tips -- "This API needs auth headers"
  • User preferences -- "User likes concise answers"
  • Operational tricks -- "Retry with backoff on rate limits"
  • Successful patterns -- "This deploy script works well"

The Analogy

Like a new employee who keeps a notebook. After each day, they write down what worked, what didn't, and tricks they discovered. Over time, they become an expert -- not by memorizing everything, but by remembering what matters.

Does It Actually Work? Yes.

Benchmark: OpenClaw plugin evaluation (1,540 test cases)

Task completion rate:

Baseline
35.7%
+ LanceDB (RAG)
44.6%
+ OpenViking
52.1%

Token cost (lower is better):

LanceDB (RAG)
51.6M tokens
OpenViking + memory
2.1M tokens

96% fewer tokens than RAG, while being 43% more accurate than baseline.

Getting Started in 5 Lines

# Install
pip install openviking

# Start the server
openviking-server

# Add your project docs
ov add-resource https://github.com/your/repo

# Browse what got indexed
ov tree viking://resources/your/repo -L 2

# Ask a question
ov find "how does authentication work"

Works with OpenAI, Anthropic, DeepSeek, Ollama, and more via LiteLLM.

Who Is This For?

Great Fit

  • Building AI agents that need persistent memory
  • Projects with lots of docs/repos the agent should know about
  • Teams tired of agents forgetting context between sessions
  • Anyone spending too many tokens stuffing context into prompts

Good to Know

  • Open source, Apache 2.0 license
  • 17.3k GitHub stars (and growing)
  • By Volcengine (ByteDance cloud)
  • Python 3.10+, optional Rust CLI
  • Supports local models via Ollama

OpenViking = Filing Cabinet
for Your AI Agent's Brain

Organized context. Tiered loading. Self-growing memory.

github.com/volcengine/OpenViking

agent37.club