-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Bug Description
Issue: OpenViking 插件在单实例多 Agent 场景下存在 Bug
环境
- OpenClaw: 2026.3.13
- OpenViking 插件: remote 模式
- Agent: main / codenu / shegmei(同一实例内)
Bug 描述
单 OpenClaw 实例配置了多个 agent,共用 OpenViking 作为 context engine。期望每个 agent 的会话独立保存,但实际只有主 agent 的数据被写入 OV。
Bug 根因
-
全局
agentId无法区分多 agent:plugins.entries.openviking.config.agentId只能配一个值,所有 agent 调用 OV 时使用同一个身份。 -
钩子触发异常:虽然
before_prompt_build和afterTurn的runtimeContext中包含agentId,但 OV API 调用时仍使用全局配置的agentId("main"),导致只有主 agent 的会话被写入。
建议修复方向
插件应在 before_prompt_build / afterTurn 钩子中,优先使用 runtimeContext.agentId(而非全局配置的 agentId)作为 OV API 的身份标识,实现单实例多 agent 的会话隔离。
Steps to Reproduce
复现步骤
- 单 OpenClaw 实例,配置 3 个 agent(main / codenu / shegmei)
- 设置
plugins.slots.contextEngine = openviking,remote 模式,agentId = main - 3 个 agent 均正常收发消息
- 向 codenu 发消息 → OV 中无新数据
- 向 main 发消息 → OV 中 main session 有数据
Expected Behavior
- codenu 的消息 → OV 中
agent:codenu:*session 有记录 - shegmei 的消息 → OV 中
agent:shegmei:*session 有记录
Actual Behavior
- 只有 main 的消息被写入 OV,其他 agent 完全忽略
Minimal Reproducible Example
Error Logs
OpenViking Version
2026.3.13
Python Version
3.13.3
Operating System
Linux
Model Backend
None
Additional Context
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
Type
Projects
Status
Backlog