Skip to main content
OpenViking provides three ways to interact with the context database: Embedded mode for local development, HTTP API for remote server access, and CLI for shell scripting and agent tool-use.

Connection Modes

Embedded

Run locally with local data storage for development and testing

HTTP API

Connect to a remote OpenViking server via REST API

CLI

Command-line interface for scripting and automation

Quick Start

Embedded Mode (Python SDK)

Use the embedded client for local development with direct database access:
Embedded mode requires ov.conf to configure embedding, VLM, and storage modules. Default location: ~/.openviking/ov.conf

HTTP Mode (Python SDK)

Connect to a remote OpenViking server:
When url is not provided, connection info is loaded from ovcli.conf (default: ~/.openviking/ovcli.conf):

Direct HTTP API (curl)

Access endpoints directly using HTTP:

CLI Mode

The CLI provides shell commands for all operations:

Authentication

OpenViking supports two authentication methods via HTTP headers:
The /health and /ready endpoints never require authentication. If no API key is configured on the server, all authentication is skipped.

Base URL and Endpoints

All API endpoints are prefixed with /api/v1/ and follow RESTful conventions: Base URL: http://localhost:1933 (default) API Version: v1

Response Format

All HTTP API responses follow a unified structure for consistency:

Success Response

Error Response

Error Codes

OpenViking uses semantic error codes mapped to standard HTTP status codes:

API Endpoint Categories

System

Health checks, system status, and operational endpoints

Resources

Add and manage resources, skills, and import/export packs

File System

List, read, create, move, and delete resources in Viking URIs

Content

Read full content (L2), abstracts (L0), and overviews (L1)

Search

Semantic search, pattern matching, and context-aware retrieval

Skills

List and call agent skills and capabilities

Sessions

Create and manage conversation sessions with message history

Admin

Multi-tenant workspace and user management (ROOT/ADMIN only)

Quick Reference

System Endpoints

Resource Management

File System Operations

Content Access

Search Operations

Relations

Sessions

Example: Adding a Resource

Rate Limiting

OpenViking currently does not enforce rate limiting by default. The RESOURCE_EXHAUSTED error code (HTTP 429) is reserved for future rate limiting implementations.

CLI Output Formats

The CLI supports multiple output formats via the --output or -o flag:

Table Mode (default)

JSON Mode

Set the default output format in ovcli.conf:

Configuration Files

ov.conf (Embedded Mode)

Default location: ~/.openviking/ov.conf

ovcli.conf (HTTP/CLI Mode)

Default location: ~/.openviking/ovcli.conf

Next Steps

Resources API

Learn how to add and manage resources

Search API

Explore semantic search and retrieval

Sessions API

Build conversation-aware applications

Configuration Guide

Complete configuration reference