Skip to main content
OpenViking uses a dual-layer storage architecture that separates content storage from index storage, providing clear separation of concerns and enabling independent scaling.

Architecture Overview

Dual-Layer Design

AGFS - Content Storage

Stores all actual file content
  • L0/L1/L2 full content
  • Multimedia files
  • Relations and metadata
  • POSIX-style operations

Vector Index - Semantic Search

Stores only references and vectors
  • URIs (pointers to AGFS)
  • Dense/sparse vectors
  • Metadata fields
  • No file content

Design Benefits

  • Vector Index: Handles semantic retrieval and filtering
  • AGFS: Handles content storage and file operations
  • No overlap in responsibilities
  • Vector index doesn’t store file content, saving memory
  • Only URIs and vectors in index
  • Actual content read from AGFS on demand
  • All content read from AGFS (single source of truth)
  • Vector index only stores references
  • Eliminates data synchronization issues
  • Vector index can scale independently for search performance
  • AGFS can scale independently for storage capacity
  • Different backends for different needs

VikingFS: Virtual Filesystem

VikingFS is the unified URI abstraction layer that hides underlying storage details and provides a consistent interface.

URI Mapping

VikingFS maps virtual URIs to physical paths in the AGFS backend.

Core API

AGFS: Backend Storage

AGFS (Agent Filesystem) provides POSIX-style file operations with multiple backend support.

Backend Types

Local filesystem storage
  • Uses local disk for storage
  • Best for development and single-node deployment
  • Fast read/write performance

Directory Structure

Each context directory follows a unified structure in AGFS:
All these files are physically stored in AGFS. The vector index only stores references to them.

Vector Index

The vector index stores semantic indices, supporting vector search and scalar filtering.

Context Collection Schema

Index Strategy

The vector index uses hybrid search combining dense and sparse vectors for better retrieval accuracy.

Backend Support

Local persistence using embedded vector DB
  • Embedded vector database
  • Best for development and small deployments
  • No external dependencies

Vector Synchronization

VikingFS automatically maintains consistency between vector index and AGFS. Manual synchronization is not needed.

Delete Sync

When deleting from AGFS, vector index is automatically updated:

Move Sync

When moving/renaming in AGFS, vector index URIs are updated:

Write Sync

When writing new content, vector index is updated:

Data Flow Example

Adding a Resource

Searching and Reading

Implementation Example

Architecture

System architecture overview

Context Layers

L0/L1/L2 progressive loading

Viking URI

URI specification and operations

Retrieval

How vector index is used for search