Release date / 发布日期: 2026-05-27
Full Changelog / 完整变更记录: v0.3.20...v0.3.21
Compare range / 对比范围: v0.3.20..v0.3.21
Commits / 提交数: 23
中文
版本概览
v0.3.21 主要强化 Memory V2 的 agent trajectory/experience 链路、批量会话写入、OpenClaw 工具命名、资源解析与文件系统错误处理,并修复 pip/pipx 安装下 /studio 静态资源缺失的问题。这个版本也补充了 tau2/VikingBot 自改进评测链路和一批文档、测试与安全清理。
主要更新
- Trajectory 记忆更适合检索与复盘:trajectory schema 新增
retrieval_anchor和embedding_template,索引文本从完整内容收敛为trajectory_name + retrieval_anchor;experience 与 trajectory 之间改为系统维护的derived_fromStoredLink,写入正向links与反向backlinks,替代易丢失的source_trajectories元数据。 - 会话消息支持批量写入:REST API 新增
POST /api/v1/sessions/{session_id}/messages/batch,CLI 新增ov session add-messages,适合导入历史对话或一次写入多轮消息;ov add-memory也复用同一套严格 JSON 消息解析。 - OpenClaw 搜索工具改名为
ov_search:OpenViking OpenClaw 插件不再注册memory_search,避免与 OpenClaw 内置工具冲突;导入 resource/skill 后的检索闭环统一使用ov_search和/ov-search。 - 资源解析与二进制 URL 判断增强:HTTP accessor 扩展图片、音频、视频和 Office/EPUB/zip 文档类型识别;当
HEAD不可靠时会在GET后用响应头重新判断,减少签名 URL、无扩展名 URL 和二进制下载被误判为网页的情况。 - 文档转换不再阻塞事件循环:Word、PowerPoint、Excel、EPUB、legacy doc 等本地转换路径改为线程中执行,降低大文件解析对异步服务的影响;PDF XObject 图片提取也修正为按目标对象读取。
- 文件系统与 API 错误更稳定:AGFS typed exceptions 映射到更明确的 OpenViking error envelope;file URI reindex 的锁获取、单文件 grep、文件移动到目录 URI 的参数校验,以及
ov waittimeout 请求体传递都得到修复。 - Web Studio 与安装包体验改进:Python build/wheel 会构建并打包
web-studio静态资源,pip/pipx 安装后/studio可直接使用;Web Studio 预览 memory 文件时会读取 raw 内容并正确展示实际正文,而不是暴露内部MEMORY_FIELDS注释。 - LiteLLM VLM 增加 NVIDIA NIM 路由:模型名中包含
nvidia_nim或nemotron时可自动走 NVIDIA NIM 的 LiteLLM 前缀和NVIDIA_NIM_API_KEY环境变量。 - tau2/VikingBot 评测升级:新增
benchmark/tau2/vikingbot端到端 runner,支持 cold start、train trajectory commit、test 多次平均和跨 epoch 自改进评测;原 tau2 LLM harness 移到benchmark/tau2/llm。
新功能用法
批量写入会话消息:
ov session add-messages a1b2c3d4 '[{"role":"user","content":"Hello"},{"role":"assistant","content":"Hi"}]'
ov add-memory '[{"role":"user","content":"Hello"},{"role":"assistant","content":"Hi"}]'对应 REST API:
curl -X POST http://localhost:1933/api/v1/sessions/a1b2c3d4/messages/batch \
-H "Content-Type: application/json" \
-H "X-API-Key: your-key" \
-d '{"messages":[{"role":"user","content":"Hello"},{"role":"assistant","content":"Hi"}]}'OpenClaw 中检索已导入的资源或技能:
/ov-search "OpenViking install" --uri viking://resources/openviking-readme
/ov-search "memory install skill" --uri viking://agent/skills
读取 memory 文件的原始存储内容:
curl "http://localhost:1933/api/v1/content/read?uri=viking://agent/main/memories/experiences/demo.md&raw=true" \
-H "X-API-Key: your-key"NVIDIA NIM VLM 示例:
{
"vlm": {
"provider": "nvidia_nim",
"model": "nvidia/llama-3.1-nemotron-nano-vl-8b-v1",
"api_key": "{your-nvidia-nim-api-key}",
"temperature": 0.0
}
}体验与兼容性改进
- pip/pipx 和 Docker 构建链路现在统一通过 Python build 流程产出 Web Studio bundle;如果本地开发不希望构建 Studio,可使用
OV_SKIP_STUDIO_BUILD=1跳过。 Makefile新增build-studiotarget,clean会清理openviking/web_studio/dist/。content.read新增raw=true参数;默认行为仍会隐藏 memory 内部字段,兼容已有调用方。- OpenClaw 用户需要把旧的
/memory-search和memory_search调用迁移到/ov-search与ov_search。
修复
- 修复
role_id_memory_isolation开启时role_id处理导致的错误。 - 修复 file URI reindex 锁路径被当成目录导致的
Not a directory问题。 - 修复 pip/pipx 安装后
/studio不可用的问题。 - 修复 URL 导入二进制内容在
GET之后仍被当作网页的问题。 - 修复 PDF XObject 图片提取没有定位到目标 image object 的问题。
- 修复 Web Studio raw memory 预览无法按 agent 展示实际正文的问题。
- 修复
ov waittimeout 被放进 URL query 而不是请求体的问题。 - 修复 LiteLLM VLM 对 NVIDIA NIM model route 的 provider 识别问题。
文档、测试与安全
- 重写 agent integrations 文档结构,新增 MCP clients、Hermes、LangChain/LangGraph、community plugins 等页面。
- Prompt guide 补充
embedding_templatememory schema 字段说明。 - 新增 document parser threading、URL filename preservation、PDF bookmark/image extraction、file reindex lock、path lock、LiteLLM provider detection 等测试覆盖。
- 移除陈旧 dependency lock 文件,减少关键依赖锁定带来的安全噪声。
- README/README_CN 中修复 LangChain 文档链接和多处图片路径。
English
Overview
OpenViking v0.3.21 focuses on Memory V2 trajectory/experience quality, batch session ingestion, OpenClaw tool naming, parser and filesystem reliability, and a packaging fix that makes /studio available from pip and pipx installs. It also adds the tau2/VikingBot self-improvement benchmark runner plus documentation, tests, and security cleanup.
Highlights
- More retrievable trajectory memory: the trajectory schema now has
retrieval_anchorand anembedding_template, so vector indexing usestrajectory_name + retrieval_anchorinstead of the full operation contract. Experiences and trajectories are connected with system-managedderived_fromStoredLinkrecords written as forwardlinksand reversebacklinks, replacing fragilesource_trajectoriesmetadata. - Batch session message ingestion:
POST /api/v1/sessions/{session_id}/messages/batchandov session add-messagesadd multiple messages in one call, useful for history import and memory extraction workflows.ov add-memorynow uses the same stricter JSON message parser. - OpenClaw search is now
ov_search: the OpenViking OpenClaw plugin no longer registersmemory_search, avoiding collisions with OpenClaw built-ins. Useov_searchor/ov-searchafter importing resources or skills. - Stronger URL and document parsing: HTTP import detection now recognizes image, audio, video, Office, EPUB, and zip downloads. When
HEADcannot be trusted, the downloader re-checks headers afterGET, which helps signed URLs, extensionless URLs, and binary downloads route correctly. - Document conversion no longer blocks the event loop: local Word, PowerPoint, Excel, EPUB, and legacy document conversions now run in worker threads. PDF XObject image extraction now targets the actual image object.
- More precise filesystem/API failures: AGFS typed exceptions map to clearer OpenViking error envelopes; fixes cover file URI reindex locks, single-file grep, invalid file move destinations, and
ov waittimeout placement. - Web Studio ships with Python installs: setup/build now builds and bundles the Web Studio static assets, so
/studioworks from pip/pipx installs without Docker. The file preview reads raw memory files internally and displays user-facing content instead of exposingMEMORY_FIELDS. - NVIDIA NIM through LiteLLM VLM: model names containing
nvidia_nimornemotronnow route through the NVIDIA NIM LiteLLM prefix andNVIDIA_NIM_API_KEY. - tau2/VikingBot benchmark runner:
benchmark/tau2/vikingbotadds an end-to-end runner for cold start, train trajectory commits, repeated test averaging, and cross-epoch self-improvement. The previous tau2 LLM harness now lives underbenchmark/tau2/llm.
New Feature Usage
Batch-add session messages:
ov session add-messages a1b2c3d4 '[{"role":"user","content":"Hello"},{"role":"assistant","content":"Hi"}]'
ov add-memory '[{"role":"user","content":"Hello"},{"role":"assistant","content":"Hi"}]'REST API equivalent:
curl -X POST http://localhost:1933/api/v1/sessions/a1b2c3d4/messages/batch \
-H "Content-Type: application/json" \
-H "X-API-Key: your-key" \
-d '{"messages":[{"role":"user","content":"Hello"},{"role":"assistant","content":"Hi"}]}'Search imported resources or skills from OpenClaw:
/ov-search "OpenViking install" --uri viking://resources/openviking-readme
/ov-search "memory install skill" --uri viking://agent/skills
Read raw stored memory content:
curl "http://localhost:1933/api/v1/content/read?uri=viking://agent/main/memories/experiences/demo.md&raw=true" \
-H "X-API-Key: your-key"NVIDIA NIM VLM example:
{
"vlm": {
"provider": "nvidia_nim",
"model": "nvidia/llama-3.1-nemotron-nano-vl-8b-v1",
"api_key": "{your-nvidia-nim-api-key}",
"temperature": 0.0
}
}Improvements
- pip/pipx and Docker builds now produce the Web Studio bundle through the Python build path. Local developers can set
OV_SKIP_STUDIO_BUILD=1to skip the Studio build. Makefileadds abuild-studiotarget, andcleanremovesopenviking/web_studio/dist/.content.readaddsraw=true; default reads still hide memory internals for compatibility.- OpenClaw users should migrate
/memory-searchandmemory_searchcalls to/ov-searchandov_search.
Fixes
- Fixed
role_idhandling whenrole_id_memory_isolationis enabled. - Fixed file URI reindex lock acquisition that could fail with
Not a directory. - Fixed
/studioavailability for pip and pipx installs. - Fixed binary URL imports still being treated as webpages after
GET. - Fixed PDF XObject image extraction against the wrong image object.
- Fixed Web Studio memory previews so raw memory files render readable content by agent.
- Fixed
ov waitso timeout is sent in the request body instead of the URL query. - Fixed NVIDIA NIM provider detection in the LiteLLM VLM backend.
Docs, Tests, and Security
- Reworked agent integration docs and added MCP clients, Hermes, LangChain/LangGraph, and community plugin pages.
- Documented the
embedding_templatememory schema field in the prompt guide. - Added or expanded tests for parser threading, URL filename preservation, PDF bookmark/image extraction, file reindex locks, path locks, and LiteLLM provider detection.
- Removed stale dependency lock files to reduce critical dependency-lock security noise.
- Fixed broken LangChain links and image paths in README/README_CN and docs.