hermes - 💡(How to fix) Fix OpenViking memory provider doesn't auto-start — you have to run `openviking-server` by hand [3 pull requests]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

def initialize(self, session_id: str, **kwargs) -> None: ... try: self._client = _VikingClient(self._endpoint, self._api_key, ...) if not self._client.health(): logger.warning("OpenViking server at %s is not reachable", self._endpoint) self._client = None # ← gives up except ImportError: logger.warning("httpx not installed — OpenViking plugin disabled") self._client = None

Root Cause

Root Cause: initialize() gives up when it can't reach the server

Fix Action

Fixed

Code Example

def initialize(self, session_id: str, **kwargs) -> None:
    ...
    try:
        self._client = _VikingClient(self._endpoint, self._api_key, ...)
        if not self._client.health():
            logger.warning("OpenViking server at %s is not reachable", self._endpoint)
            self._client = None          # ← gives up
    except ImportError:
        logger.warning("httpx not installed — OpenViking plugin disabled")
        self._client = None

---

if self._mode == "local_embedded":
    def _start_daemon():
        client = self._get_client()       # creates HindsightEmbedded instance
        client._ensure_started()          # ← spawns daemon if not running
    t = threading.Thread(target=_start_daemon, daemon=True, name="hindsight-daemon-start")
    t.start()
RAW_BUFFERClick to expand / collapse

OpenViking memory provider doesn't auto-start — you have to run openviking-server by hand

Problem

Set memory.provider: openviking in config.yaml, start Hermes, and the plugin silently nopes out if the server at OPENVIKING_ENDPOINT (default http://127.0.0.1:1933) isn't already running. No auto-start, no retry, no user-facing error — just a log warning.

Compare Hindsight: set mode: local_embedded and it spawns its own daemon automatically. No extra step. One config change and you're done. OpenViking needs a manual openviking-server that the setup wizard never mentions. UX asymmetry.

Root Cause: initialize() gives up when it can't reach the server

OpenViking (plugins/memory/openviking/__init__.py, line 469-488):

def initialize(self, session_id: str, **kwargs) -> None:
    ...
    try:
        self._client = _VikingClient(self._endpoint, self._api_key, ...)
        if not self._client.health():
            logger.warning("OpenViking server at %s is not reachable", self._endpoint)
            self._client = None          # ← gives up
    except ImportError:
        logger.warning("httpx not installed — OpenViking plugin disabled")
        self._client = None

/health fails or connection refused → self._client = None → plugin does nothing for the rest of the session.

Hindsight (plugins/memory/hindsight/__init__.py, line 1236-1277):

if self._mode == "local_embedded":
    def _start_daemon():
        client = self._get_client()       # creates HindsightEmbedded instance
        client._ensure_started()          # ← spawns daemon if not running
    t = threading.Thread(target=_start_daemon, daemon=True, name="hindsight-daemon-start")
    t.start()

_ensure_started() internally calls DaemonEmbedManager.ensure_running() — if the daemon isn't already running, it spawns it with subprocess.Popen(["hindsight-api", "--daemon", "--port", "<P>", "--idle-timeout", "<N>"], start_new_session=True), then polls /health for up to 180s until it's ready.

Why the plugin doesn't use the OpenViking SDK

The plugin deliberately avoids import openviking. The comment says it plainly:

# HTTP helper — uses httpx to avoid requiring the openviking SDK
from tools.lazy_deps import ensure as _lazy_ensure
from hindsight import HindsightEmbedded
[60 more lines]

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING