Top-tier memory plugin for Oh My Pi via OpenViking.
Auto-recall before every prompt · capture after every turn · viking:// filesystem · 11 tools · slash /ov
omp plugin marketplace add github:cortexc0de/omp-openviking-memory && omp plugin install omp-openviking-memory
Native port of pi-coding-agent-extension for OMP · runs as Extension (hooks) and ships mcp.json (servers/mcp-proxy.mjs) as fallback — no auto-recall without Extension.
Requires an OpenViking server — local
http://127.0.0.1:1933or remote.curl http://127.0.0.1:1933/healthshould returnok.
- Current-prompt recall, not stale prefetch.
before_agent_startqueues;contextawaitsmode="context"(15 s+45 sfused deadlines) for the prompt you just typed. - Prompt-cache stable.
~/.openviking/omp-recall-ledger/(0o700/0o600) reapplies the exact byte block to historical turns — keeps prefix caches hitting (#4137). - Full capture.
syncBranchafter each turn →pending-queuereplay on next boot (0o700dir /0o600files, atomicrename). viking://guard.read/bash/glob/greponviking://is intercepted and rerouted toviking_read/viking_search.
# from a clone
omp plugin marketplace add ./ --scope project
omp plugin install omp-openviking-memory@omp-openviking-memory-marketplace --scope project
omp plugin list # omp-openviking-memory@0.2.0From GitHub:
omp plugin marketplace add github:cortexc0de/omp-openviking-memory --scope project
omp plugin install omp-openviking-memory --scope projectDev link without publishing: omp plugin install --force ./ --scope project — Windows needs mklink /J (Developer Mode).
OPENVIKING_*env —OPENVIKING_URL,OPENVIKING_API_KEY/OPENVIKING_BEARER_TOKEN,OPENVIKING_ACCOUNT,OPENVIKING_USER,OPENVIKING_PEER_ID~/.openviking/ovcli.conf(url,api_key,account,user)~/.openviking/ov.conf(server.url/host+port,server.root_api_key)- Fallback
http://127.0.0.1:1933(loopbackhttp, remote requireshttpswhen a token is set)
Peer isolation: OPENVIKING_PEER_ID or cwd → workspace-peer. Disable: OPENVIKING_WORKSPACE_PEER=0. Scope: OPENVIKING_RECALL_PEER_SCOPE=actor|all.
curl http://127.0.0.1:1933/health
node scripts/setup.mjs # wizard for ovcli.conf{
"enabled": true,
"syncTurns": true,
"recallTokenBudget": 2000,
"scoreThreshold": 0.35,
"minQueryLength": 3,
"profileTokenBudget": 10000,
"resumeContextBudget": 32000,
"commitTokenThreshold": 20000,
"takeover": { "enabled": false, "tokenThreshold": 30000, "keepRecentTurns": 3, "overviewBudget": 3000, "overviewPollMs": 2000, "overviewPollMax": 15 }
}takeover.enabled:false by default — pi defaults to true. Keeps memory.backend intact.
| Event | What happens |
|---|---|
session_start |
health() → ensureSession(ov-…) → replayPending() → profile (10 k) + archive overview (32 k) |
before_agent_start |
queueSearch(prompt) — no I/O, zero UI latency |
context |
fetchAssembledContext + ledger injection |
turn_end |
syncBranch → OV, takeover.onTurnSynced, footer OV ✓/✗ · ↩ · ctx |
session_before_compact |
takeover or commit() + rehydration |
session_shutdown |
shutdown() (bounded 1.8 s replay) → commit() |
tool_call |
viking:// uri-guard intercept |
Tools (11) — viking_search · read · browse · remember · forget · add_resource (SSRF-guarded) · archive_expand · tree (≥0.4.14) · write · edit · health — optional degrade gracefully.
Guard — viking:// on read/bash/glob/grep → viking_read/viking_search.
Commands — /viking and /ov: status/health (default, shows systemStatus user/account), commit/flush (forced sync + commit).
Skill — skill://openviking-memory (skills/openviking-memory/SKILL.md + references/optional-tools.md) and commands/ov.md (slash /ov).
memory.backend |
OMP behavior | OV recommendation |
|---|---|---|
off (default) |
no built-in memory | takeover.enabled:true is fine if you want OV to own compaction |
local |
MEMORY.md guidance (~5 k) |
false (default) — both layers inject, no fight |
hindsight / mnemopi |
remote backend owns session_before_compact |
false — Extension does only commit(), no {compaction} |
add_resourceallows onlyhttp/https, blockslocalhost/private/169.254/*.localhostnames defense-in-depth.- Bearer token over
httpis refused for non-loopback hosts (usehttpsexternally). - Debug logs (
OV_DEBUG_LOG) are0o700/0o600and redact fullpayload→payloadBytes; never enable on shared machines. categoryforviking_rememberis allowlisted to^[a-z][a-z_-]{0,31}$.
mcp.json exposes servers/mcp-proxy.mjs (MAX_CONCURRENT=16, Mcp-Session-Id, hot-reload of ~/.openviking/ovcli.conf without restart). Auto-memory is off in pure MCP mode — only manual tool calls.
npm test # node --test — 23 cases (185 ms)
npm run typecheck # tsc --noEmit
node --check extensions/openviking.ts
node scripts/sync.mjs # refresh shared/ + servers/shared from upstream lib
node scripts/e2e-live.mjs # live: OPENVIKING_URL + E2E_LLM_API_KEY + omp
omp plugin doctor # 6 okVendored shared/ + lib/ mirror examples/memory-plugin-shared/lib with // GENERATED FROM headers (27 files). assets/social-preview.png is 1280×640 (GitHub og:image).
AGPL-3.0 — same as OpenViking.
Built on OpenViking · for Oh My Pi — banner: OpenViking × OMP warp (viking://)
