概要
OpenViking は、viking:// 仮想ファイルシステムによりメモリ、リソース、スキルを統合的に保存し、コンテンツを L0/L1/L2 の3層に分割してオンデマンドで読み込みます。観測可能な検索トレースをサポートし、AIエージェントが長期記憶と知識を効率的に管理できるよう支援します。
README プレビュー
\n\n\n \n \n \n\n\n### OpenViking: The Context Database for AI Agents\n\nEnglish / [中文](README_CN.md) / [日本語](README_JA.md)\n\nWebsite · Live Demo · GitHub · Issues · Docs\n\n[](https://github.com/volcengine/OpenViking/releases)\n[](https://github.com/volcengine/OpenViking)\n[](https://github.com/volcengine/OpenViking/issues)\n[](https://github.com/volcengine/OpenViking/graphs/contributors)\n[](https://github.com/volcengine/OpenViking/blob/main/LICENSE)\n[](https://github.com/volcengine/OpenViking/commits/main)\n\n👋 Join our Community\n\n📱 Lark Group · WeChat · Discord · X\n\n\n\n\n\n***\n\n## What is OpenViking\n\nOpenViking is an open-source context database for AI agents. It stores memories, resources, and skills as one virtual filesystem under the `viking://` protocol, so an agent browses its own context with `ls`, `tree`, and `find` instead of querying a black-box vector store. Content is processed into three tiers — L0 abstract, L1 overview, L2 details — and loaded on demand. Every retrieval leaves a trajectory you can watch and debug. Full introduction: [Getting started](https://docs.openviking.ai/en/getting-started/01-introduction).\n\n[](https://openviking.ai/studio)\n\n*The [OpenViking Studio](https://openviking.ai/studio) playground — a live demo you can open in the browser, no installation required.*\n\n## Why OpenViking\n\n- **One filesystem for all context.** Memories, resources, and skills each get a `viking://` URI. Agents locate and manipulate context deterministically, like a developer working with files. → [Viking URI](https://docs.openviking.ai/en/concepts/04-viking-uri) · [Context types](https://docs.openviking.ai/en/concepts/02-context-types)\n- **Tiered loading cuts token spend.** Every entry is processed into L0 (abstract), L1 (overview), and L2 (details) on write, then loaded only as deep as the task requires. → [Context layers](https://docs.openviking.ai/en/concepts/03-context-layers)\n- **Directory recursive retrieval.** Vector sear
FAQ (5)
トラブル対応OpenViking ov compile で "complete_tool_result() got an unexpected keyword argument 'preserve_complete'" エラーを修正する方法
このエラーは OpenViking の main(コミット 54d4c0fac、v0.5.2.1+38 / 0.5.3.dev40)で発生します。ov compile が最終レビューステージを通知なくスキップし、「Final review incomplete; publishing original artifacts」という警告を result.warnings に報告します。
**根本原因:** PR #6364 で bot/vikingbot/agent/loop.py の AgentLoop が更新され、プレビューフックが新しいキーワード引数 preserve_complete 付きで呼び出されるようになりました。しかし、Compile パイプラインのカスタムフック(bot/vikingbot/compile/pipeline_agent.py、約55行目)は依然として古い2パラメータのシグネチャを使用しているため、すべてのプレビュー呼び出しで TypeError が発生し、それがパイプラインによって握りつぶされています。
**修正方法:** bot/vikingbot/compile/pipeline_agent.py を編集し、フックのシグネチャを更新して新しいフラグを受け入れるようにします(Compile は子ツールの結果を無条件で完全なまま保持するため、このフラグは無視して構いません):
async def complete_tool_result(result, session_key, preserve_complete: bool = False):
"""Compile keeps child tool results complete unconditionally; the flag is
accepted for signature parity with the AgentLoop preview hook."""
return result
その後、openviking-server を再起動し、ov compile を再実行してください。検証済みの結果: タスクは warnings: [] で完了し、最終レビューステージが正常に実行されます。
トラブル対応DSH memoryプラグインで commit_count が 0 と表示され、短いセッションがまったくアーカイブされない問題を修正する方法
プラグインは共有デフォルトの keep_recent_count: 10 を送信するため、メッセージ数が10件未満のセッションでは、最終的な dispose() コミット時にすべてのメッセージが直近の tail に保持され、アーカイブされることはありません。DSH のように独自でコンテキストを管理するハーネスでは、セッション終了時のコミットでこの値を 0 に設定してください。一時的な回避策: OPENVIKING_COMMIT_KEEP_RECENT_COUNT=0 を指定して実行してください。コードでは、examples/dsh-memory-plugin/runtime.mjs 内の DSH の最終コミットを keep_recent_count: 0 を送信するように変更してください。同じ修正は、Claude Code および Codex の auto-capture.mjs におけるトークン閾値コミットにも適用されます。OpenViking がコンテキストを管理するプラグインでは、設定可能な tail を維持してください。PR "fix(plugins): archive every message on session commit." を含むリリースに更新してください。
トラブル対応Web Studio の Compile ページがクラッシュする問題を修正する方法: "Cannot read properties of undefined (reading 'length')"
これは、オプションの --from フラグを指定せずにコンパイルタスクが作成された場合に、OpenViking 0.4.23 に影響します。Studio の行レンダラーは r?.from.length をチェックしますが、from 自体をガードしていないため、meta.request.from が欠落しているタスクがあると /studio/compile ルート全体がクラッシュします。
一時的な回避策:問題のタスクを除外するフィルターを付けて Compile ページを開きます。例:
/studio/compile?status=completed
壊れたタスク自体が completed の場合は、別のステータスフィルターか、何にもマッチしないクエリを使用してください:
/studio/compile?q=__no_match__
タスク API は正常です。障害は Studio のレンダリングでのみ発生しています。
恒久的な修正:PR fix(studio): normalize missing compile sources を含むリリースにアップグレードするか、Studio API 境界で欠落/null のソースリストを正規化してください:
const from = r?.from ?? [];
from.length ? from.map(/* render source */) : "—";
最小限のフロントエンド安全ガードは次のとおりです:
r?.from?.length ? r.from.map(/* render source */) : "—"トラブル対応OpenViking Hermes プラグインの「declared `on_session_end` hook is not registered」警告を修正する方法
これは、OpenViking が汎用フックレジストリではなく Hermes の memory-provider ライフサイクルを通じて登録される場合の誤検出です。OpenViking Hermes プラグインマニフェストで、宣言されている hooks リストから on_session_end を削除してください。OpenVikingMemoryProvider.on_session_end() を削除したり、ctx.register_memory_provider(OpenVikingMemoryProvider()) を変更したりしないでください。Hermes は引き続き MemoryProvider ライフサイクルを通じてセッション終了時のコミットを呼び出します。プラグインを再読み込み/再インストールしてから、hermes plugins doctor openviking を再度実行してください。OpenViking プラグイン 2.0.1 と Hermes 0.21.5 を使用している状態でセッションコミットが成功する場合、マニフェストの修正がインストールされるまで、この警告は安全に無視できます。
トラブル対応レスポンスボディがタイムアウトした場合や接続がリセットされた場合に、OpenVikingプラグインのHTTPクライアントがリトライせずに空の結果でHTTP 200を返す問題を修正するにはどうすればよいですか?
examples/memory-plugin-shared/lib/ov-http.mjs を修正するプラグイン PR #5661 と、openclaw および pi-experimental クライアント向けの関連修正を含むソースリビジョンまたはリリースにアップグレードしてください。コミット d9352f2a8bac78cbf4ed08b26543d22adcdd4c93 にピン留めしている場合は、これらの変更を cherry-pick してください。
欠陥は response.json() を囲む広範な catch にあります。これにより、ボディ読み取り時のトランスポート障害が無効/空の JSON としての処理に変換されてしまいます。修正では、abort/ネットワーク/ストリームエラーを再スローし、既存の外側のハンドラーが次を返すようにする必要があります:
{ ok: false, status: 0, result: null }
そして isRetryableFailure(result) が true を返すようにしなければなりません。自身が所有するタイムアウトについては、元のエラーが error.name === "AbortError" と error.aborted === true を維持する必要があります。
概念的には次のようなガードを使用してください:
try {
result = await response.json();
} catch (err) {
if (
err?.name === "AbortError" ||
err?.aborted === true ||
err?.cause?.code === "UND_ERR_SOCKET"
) {
throw err; // Let the outer transport handler classify and retry it.
}
// Keep existing handling only for a complete, malformed, or empty JSON body.
}
回避策として requireJsonBody: true を使用しないでください。strict モードでは、症状がリトライ不可能な HTTP 200 の empty or invalid JSON response 障害に変わってしまいます。パッチ適用後は、正常な成功レスポンス、HTTP エラー、および完全に受信されたが不正/空の JSON ボディは以前の動作を維持し、ボディ読み取り中のストール、リセット、アボート、破損したストリームのみがリトライ可能な status-0 のトランスポート障害となります。