mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-06-19 10:02:16 +00:00
OpenVikingMemoryProvider only overrides on_session_end and inherits the base-class no-op for on_session_switch. When the agent rotates session_id (via /new, /branch, /reset, /resume, or context compression), the provider's cached _session_id stays at the value initialize() captured. All subsequent sync_turn writes then land in the already-closed old session, and on_session_end tries to commit it a second time — the new session never accumulates messages and never triggers memory extraction. The fix mirrors the pattern Hindsight uses (#17508): 1. Wait for any in-flight sync thread to drain under the OLD _session_id before we mutate it, otherwise the commit below races the last message write. 2. Commit the old session if it accumulated turns — same extraction semantics as on_session_end. Skip if empty (nothing to extract). 3. Drain in-flight prefetch from the old session and clear its cached result so the new session doesn't see stale recall. 4. Rotate _session_id to the new value and reset _turn_count. Commit failures are swallowed (logged at WARN) so a flaky server can't strand the provider on the old session forever — same posture as the existing on_session_end commit. |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| plugin.yaml | ||
| README.md | ||
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"
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) |
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 |