OpenClaw + OpenViking 多 Agent 记忆系统架构实践 #747
Clivilwalker
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
OpenClaw + OpenViking 多 Agent 记忆系统架构实践
🎯 项目背景
在构建多 Agent AI 系统时,我们面临一个核心挑战:如何让每个 Agent 拥有独立的记忆空间,同时又能共享团队知识?
本分享记录了我们从 LanceDB-Pro 迁移到 OpenViking 的完整过程,包括踩过的坑和最终解决方案。
🤔 为什么选择 OpenViking?
背景:OpenViking 的设计定位
OpenViking 是字节跳动开源的个人知识库系统,设计初衷是:
viking://resources/)我们的场景:多 Agent 企业系统
我们的需求与 OpenViking 原始设计存在差异:
为什么仍选择 OpenViking?
尽管存在差异,OpenViking 仍是最优选择:
核心思路:利用 OpenViking 的 HTTP API,在其之上构建多 Agent 隔离层。
🖥️ 部署环境
服务器配置
服务架构
关键配置
OpenViking 配置 (
~/.openviking/ov.conf):{ "embedding": { "dense": { "provider": "openai", "api_base": "{API_BASE_URL}", "api_key": "YOUR_API_KEY", "model": "{EMBEDDING_MODEL}", "dimension": {EMBEDDING_DIMENSION} } }, "vlm": { "provider": "openai", "api_base": "{API_BASE_URL}", "api_key": "YOUR_API_KEY", "model": "{VLM_MODEL}" } }OpenClaw 配置 (
~/.openclaw/openclaw.json):{ "plugins": { "entries": { "memory-openviking": { "config": { "mode": "remote", "baseUrl": "http://127.0.0.1:1933", "timeoutMs": 60000, "autoCapture": false, "autoRecall": false } } } } }🏗️ 架构设计
目标架构
核心需求
🛠️ 技术栈对比
迁移前后对比
为什么选择放弃 LanceDB-Pro?
致命问题:OpenClaw Core 的 Registry 状态隔离 bug
memory_store/memory_recall无法调用OpenViking 优势:
🚀 实施步骤
1. 安装 OpenViking
2. 配置 OpenClaw Plugin
{ "plugins": { "entries": { "memory-openviking": { "config": { "mode": "remote", "baseUrl": "http://127.0.0.1:1933", "timeoutMs": 60000, "autoCapture": false, "autoRecall": false } } } } }3. 创建目录结构
4. 修改 Plugin 源码
关键修改 1:绕过 VLM 超时
原始代码使用 session extract(会调用 VLM),改为直接 HTTP API:
关键修改 2:动态路径构建
关键修改 3:搜索范围限定
😭 踩过的坑
坑 1:VLM 超时
现象:
memory_store调用 60 秒后超时原因:OpenViking 默认使用 session extract,会调用 VLM 生成摘要
解决:改为直接 HTTP API 存储,不经过 session extract
坑 2:参数名不一致
现象:指定了
target参数,但存储路径不符合预期原因:OpenViking 文档声明使用
target,但实际代码使用to解决:使用
"to"参数坑 3:Plugin 语法错误
现象:修改后 Plugin 加载失败,提示
Unexpected token原因:替换代码时括号不匹配
解决:使用行号精确替换,仔细验证语法
✅ 验证结果
测试 1:Main Agent 存储
测试 2:Writer Agent 存储
测试 3:隔离验证
📊 最终架构
🎁 关键代码片段
存储记忆(HTTP API)
搜索记忆
💡 经验总结
target,实际要用toBeta Was this translation helpful? Give feedback.
All reactions