openviking-memory by volcengine/openviking
npx skills add https://github.com/volcengine/openviking --skill openviking-memoryafterTurn(一个用户轮次运行结束时),自动从用户/助手消息中提取记忆
semantic 模式:捕获所有符合条件的用户文本,依赖 OpenViking 的提取管道进行过滤keyword 模式:仅捕获匹配触发词(例如“记住”、“偏好”等)的文本before_prompt_build 时,自动搜索相关记忆并将其注入上下文在 OpenViking 中搜索长期记忆,返回相关结果。
| 参数 | 必需 | 描述 |
|---|---|---|
query |
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
| 是 |
| 搜索查询文本 |
limit | 否 | 最大结果数(默认为插件配置) |
scoreThreshold | 否 | 最低相关性分数 0-1(默认为插件配置) |
targetUri | 否 | 搜索范围 URI(默认为插件配置) |
示例:用户询问“我说过我喜欢什么编程语言?”
将文本写入 OpenViking 会话并运行记忆提取。
| 参数 | 必需 | 描述 |
|---|---|---|
text | 是 | 要存储的信息文本 |
role | 否 | 会话角色(默认 user) |
sessionId | 否 | 现有的 OpenViking 会话 ID |
示例:用户说“记住我的邮箱是 xxx@example.com”
通过精确 URI 删除,或搜索后删除。
| 参数 | 必需 | 描述 |
|---|---|---|
uri | 否 | 精确的记忆 URI(直接删除) |
query | 否 | 搜索查询(查找后删除) |
targetUri | 否 | 搜索范围 URI |
limit | 否 | 搜索限制(默认 5) |
scoreThreshold | 否 | 最低相关性分数 |
示例:用户说“忘记我的电话号码”
| 字段 | 默认值 | 描述 |
|---|---|---|
mode | remote | local(启动本地服务器)或 remote(连接远程服务器) |
baseUrl | http://127.0.0.1:1933 | OpenViking 服务器 URL(远程模式) |
apiKey | — | OpenViking API 密钥(可选) |
agentId | default | 向 OpenViking 标识此代理 |
configPath | ~/.openviking/ov.conf | 配置文件路径(本地模式) |
port | 1933 | 本地服务器端口(本地模式) |
targetUri | viking://user/memories | 默认搜索范围 |
autoCapture | true | 自动捕获记忆 |
captureMode | semantic | 捕获模式:semantic / keyword |
captureMaxLength | 24000 | 每次捕获的最大文本长度 |
autoRecall | true | 自动回忆并注入上下文 |
recallLimit | 6 | 自动回忆期间注入的最大记忆数 |
recallScoreThreshold | 0.01 | 回忆的最低相关性分数 |
ingestReplyAssist | true | 检测到多方对话文本时添加回复指导 |
# 启动(本地模式:需先 source 环境变量)
source ~/.openclaw/openviking.env && openclaw gateway
# 启动(远程模式:无需环境变量)
openclaw gateway
# 检查状态
openclaw status
openclaw config get plugins.slots.contextEngine
# 禁用记忆功能
openclaw config set plugins.slots.contextEngine legacy
# 启用记忆功能
openclaw config set plugins.slots.contextEngine openviking
更改插槽配置后需重启网关。
如果您有多个 OpenClaw 实例,请使用 --workdir 来指定目标实例:
# 安装脚本
curl -fsSL ... | bash -s -- --workdir ~/.openclaw-openclaw-second
# 设置助手
npx ./examples/openclaw-plugin/setup-helper --workdir ~/.openclaw-openclaw-second
# 手动配置(在 openclaw 命令前添加前缀)
OPENCLAW_STATE_DIR=~/.openclaw-openclaw-second openclaw config set ...
| 症状 | 原因 | 解决方法 |
|---|---|---|
extracted 0 memories | API 密钥或模型名称错误 | 检查 ov.conf 中的 api_key 和 model |
port occupied | 端口被其他进程占用 | 更改端口:openclaw config set plugins.entries.openviking.config.port 1934 |
| 插件未加载 | 环境变量文件未 source 或插槽未配置 | 检查 openclaw status 输出 |
| 回忆不准确 | recallScoreThreshold 过低 | 提高阈值或调整 recallLimit |
每周安装数
135
仓库
GitHub 星标数
18.8K
首次出现
2026年3月9日
安全审计
安装于
gemini-cli134
codex134
kimi-cli134
github-copilot134
amp134
cline134
afterTurn (end of one user turn run), automatically extracts memories from user/assistant messages
semantic mode: captures all qualifying user text, relying on OpenViking's extraction pipeline to filterkeyword mode: only captures text matching trigger words (e.g. "remember", "preference", etc.)before_prompt_build, automatically searches for relevant memories and injects them into contextSearches long-term memories in OpenViking, returns relevant results.
| Parameter | Required | Description |
|---|---|---|
query | Yes | Search query text |
limit | No | Maximum number of results (defaults to plugin config) |
scoreThreshold | No | Minimum relevance score 0-1 (defaults to plugin config) |
targetUri | No | Search scope URI (defaults to plugin config) |
Example: User asks "What programming language did I say I like?"
Writes text to an OpenViking session and runs memory extraction.
| Parameter | Required | Description |
|---|---|---|
text | Yes | Information text to store |
role | No | Session role (default user) |
sessionId | No | Existing OpenViking session ID |
Example: User says "Remember my email is xxx@example.com"
Delete by exact URI, or search and delete.
| Parameter | Required | Description |
|---|---|---|
uri | No | Exact memory URI (direct delete) |
query | No | Search query (find then delete) |
targetUri | No | Search scope URI |
limit | No | Search limit (default 5) |
scoreThreshold | No | Minimum relevance score |
Example: User says "Forget my phone number"
| Field | Default | Description |
|---|---|---|
mode | remote | local (start local server) or remote (connect to remote) |
baseUrl | http://127.0.0.1:1933 | OpenViking server URL (remote mode) |
apiKey | — | OpenViking API Key (optional) |
# Start (local mode: source env first)
source ~/.openclaw/openviking.env && openclaw gateway
# Start (remote mode: no env needed)
openclaw gateway
# Check status
openclaw status
openclaw config get plugins.slots.contextEngine
# Disable memory
openclaw config set plugins.slots.contextEngine legacy
# Enable memory
openclaw config set plugins.slots.contextEngine openviking
Restart the gateway after changing the slot.
If you have multiple OpenClaw instances, use --workdir to target a specific one:
# Install script
curl -fsSL ... | bash -s -- --workdir ~/.openclaw-openclaw-second
# Setup helper
npx ./examples/openclaw-plugin/setup-helper --workdir ~/.openclaw-openclaw-second
# Manual config (prefix openclaw commands)
OPENCLAW_STATE_DIR=~/.openclaw-openclaw-second openclaw config set ...
| Symptom | Cause | Fix |
|---|---|---|
extracted 0 memories | Wrong API Key or model name | Check api_key and model in ov.conf |
port occupied | Port used by another process | Change port: openclaw config set plugins.entries.openviking.config.port 1934 |
| Plugin not loaded | Env file not sourced or slot not configured | Check openclaw status output |
Weekly Installs
135
Repository
GitHub Stars
18.8K
First Seen
Mar 9, 2026
Security Audits
Gen Agent Trust HubFailSocketWarnSnykPass
Installed on
gemini-cli134
codex134
kimi-cli134
github-copilot134
amp134
cline134
AI 代码实施计划编写技能 | 自动化开发任务分解与 TDD 流程规划工具
47,700 周安装
agentId | default | Identifies this agent to OpenViking |
configPath | ~/.openviking/ov.conf | Config file path (local mode) |
port | 1933 | Local server port (local mode) |
targetUri | viking://user/memories | Default search scope |
autoCapture | true | Automatically capture memories |
captureMode | semantic | Capture mode: semantic / keyword |
captureMaxLength | 24000 | Maximum text length per capture |
autoRecall | true | Automatically recall and inject context |
recallLimit | 6 | Maximum memories injected during auto-recall |
recallScoreThreshold | 0.01 | Minimum relevance score for recall |
ingestReplyAssist | true | Add reply guidance when detecting multi-party conversation text |
| Inaccurate recall | recallScoreThreshold too low | Increase threshold or adjust recallLimit |