hermes-agent/plugins/memory/openviking
kshitijk4poor 1153b42b24 Merge upstream/main into OpenViking setup-UX (salvage #32445)
Resolves conflicts from the OpenViking churn that merged after #32445 was
opened (#48042/#47662 session-switch + write hardening, #47311/#47973):

- plugins/memory/openviking/__init__.py: keep both __init__ field groups
  (the PR's _runtime_start_* alongside main's _prefetch_threads/_shutting_down).
- tests/plugins/memory/test_openviking_provider.py: keep BOTH the PR's new
  setup-validation tests and main's session-switch/concurrency tests (disjoint
  additions to the same region).

Two fixes layered while reconciling (contributor work otherwise preserved):

- Restore the merged tenant-header contract (#22414/#21232). The PR had changed
  _VikingClient defaults to '' and made empty account/user OMIT the tenant
  headers; main's contract is that empty falls back to 'default' and the
  X-OpenViking-Account/User headers are ALWAYS sent (ROOT API keys need them).
  Reverted the constructor to 'account or os.environ.get(..., "default")' and
  updated the two PR tests that asserted the omit-when-empty behavior.

- Close a secret-file TOCTOU in the setup writers. _write_env_vars and
  _write_ovcli_config wrote the api_key/root_api_key file and chmod 0600
  AFTERWARD, leaving a world-readable window on newly-created files. Added
  _precreate_secret_file() to create with 0600 before any secret bytes land.
2026-06-18 11:28:51 +05:30
..
__init__.py Merge upstream/main into OpenViking setup-UX (salvage #32445) 2026-06-18 11:28:51 +05:30
plugin.yaml feat(memory): improve OpenViking setup UX 2026-06-17 01:02:38 +08:00
README.md feat(memory): improve OpenViking setup UX 2026-06-17 01:02:38 +08:00

OpenViking Memory Provider

Context database by Volcengine (ByteDance) with filesystem-style knowledge hierarchy, tiered retrieval, and automatic memory extraction.

Requirements

  • pip install openviking
  • OpenViking server running (openviking-server)
  • Embedding + VLM model configured in ~/.openviking/ov.conf

Setup

hermes memory setup    # select "openviking"

The setup can link to an existing ~/.openviking/ovcli.conf, copy its current connection values into Hermes, or create a minimal ovcli.conf when one does not exist.

Or manually:

hermes config set memory.provider openviking
echo "OPENVIKING_ENDPOINT=http://localhost:1933" >> ~/.hermes/.env

Config

All config via environment variables in .env:

Env Var Default Description
OPENVIKING_ENDPOINT http://127.0.0.1:1933 Server URL
OPENVIKING_API_KEY (none) API key (optional)
OPENVIKING_ACCOUNT (none) Tenant account override
OPENVIKING_USER (none) Tenant user override
OPENVIKING_AGENT hermes Tenant agent namespace

Tools

Tool Description
viking_search Semantic search with fast/deep/auto modes
viking_read Read content at a viking:// URI (abstract/overview/full)
viking_browse Filesystem-style navigation (list/tree/stat)
viking_remember Store a fact for extraction on session commit
viking_add_resource Ingest URLs/docs into the knowledge base