openviking-memory
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseOpenViking Memory Guide
OpenViking 记忆指南
How It Works
工作原理
- Auto-Capture: At the end of a conversation, automatically extracts memories from user messages
- mode: captures all qualifying user text, relying on OpenViking's extraction pipeline to filter
semantic - mode: only captures text matching trigger words (e.g. "remember", "preference", etc.)
keyword
- Auto-Recall: Before a conversation starts, automatically searches for relevant memories and injects them into context
- 自动捕获:对话结束时,自动从用户消息中提取记忆
- 模式:捕获所有符合条件的用户文本,依赖OpenViking的提取管道进行过滤
semantic - 模式:仅捕获匹配触发词的文本(例如"remember"、"preference"等)
keyword
- 自动调取:对话开始前,自动搜索相关记忆并将其注入上下文
Available Tools
可用工具
memory_recall — Search Memories
memory_recall — 搜索记忆
Searches long-term memories in OpenViking, returns relevant results.
| Parameter | Required | Description |
|---|---|---|
| Yes | Search query text |
| No | Maximum number of results (defaults to plugin config) |
| No | Minimum relevance score 0-1 (defaults to plugin config) |
| No | Search scope URI (defaults to plugin config) |
Example: User asks "What programming language did I say I like?"
在OpenViking中搜索长期记忆,返回相关结果。
| 参数 | 是否必填 | 描述 |
|---|---|---|
| 是 | 搜索查询文本 |
| 否 | 最大结果数(默认值为插件配置) |
| 否 | 最低相关度分数 0-1(默认值为插件配置) |
| 否 | 搜索范围URI(默认值为插件配置) |
示例:用户询问"我之前说过喜欢什么编程语言?"
memory_store — Manual Store
memory_store — 手动存储
Writes text to an OpenViking session and runs memory extraction.
| Parameter | Required | Description |
|---|---|---|
| Yes | Information text to store |
| No | Session role (default |
| No | Existing OpenViking session ID |
Example: User says "Remember my email is xxx@example.com"
将文本写入OpenViking会话并运行记忆提取。
| 参数 | 是否必填 | 描述 |
|---|---|---|
| 是 | 要存储的信息文本 |
| 否 | 会话角色(默认 |
| 否 | 现有OpenViking会话ID |
示例:用户说"记住我的邮箱是xxx@example.com"
memory_forget — Delete Memories
memory_forget — 删除记忆
Delete by exact URI, or search and delete.
| Parameter | Required | Description |
|---|---|---|
| No | Exact memory URI (direct delete) |
| No | Search query (find then delete) |
| No | Search scope URI |
| No | Search limit (default 5) |
| No | Minimum relevance score |
Example: User says "Forget my phone number"
通过精确URI删除,或搜索后删除。
| 参数 | 是否必填 | 描述 |
|---|---|---|
| 否 | 精确的记忆URI(直接删除) |
| 否 | 搜索查询(查找后删除) |
| 否 | 搜索范围URI |
| 否 | 搜索限制(默认5) |
| 否 | 最低相关度分数 |
示例:用户说"忘记我的电话号码"
Configuration
配置项
| Field | Default | Description |
|---|---|---|
| | |
| | OpenViking server URL (remote mode) |
| — | OpenViking API Key (optional) |
| | Identifies this agent (auto-generated, persisted to |
| | Config file path (local mode) |
| | Local server port (local mode) |
| | Default search scope |
| | Automatically capture memories |
| | Capture mode: |
| | Maximum text length per capture |
| | Automatically recall and inject context |
| | Maximum memories injected during auto-recall |
| | Minimum relevance score for recall |
| | Add reply guidance when detecting multi-party conversation text |
| 字段 | 默认值 | 描述 |
|---|---|---|
| | |
| | OpenViking服务器URL(远程模式) |
| — | OpenViking API密钥(可选) |
| | 标识此Agent(自动生成,持久化到 |
| | 配置文件路径(本地模式) |
| | 本地服务器端口(本地模式) |
| | 默认搜索范围 |
| | 自动捕获记忆 |
| | 捕获模式: |
| | 每次捕获的最大文本长度 |
| | 自动调取并注入上下文 |
| | 自动调取时注入的最大记忆数量 |
| | 调取的最低相关度分数 |
| | 检测到多方对话文本时添加回复指引 |
Daily Operations
日常操作
bash
undefinedbash
undefinedStart (local mode: source env first)
启动(本地模式:先加载环境变量)
source ~/.openclaw/openviking.env && openclaw gateway
source ~/.openclaw/openviking.env && openclaw gateway
Start (remote mode: no env needed)
启动(远程模式:无需环境变量)
openclaw gateway
openclaw gateway
Check status
检查状态
openclaw status
openclaw status
Disable memory
禁用记忆功能
openclaw config set plugins.slots.memory none
openclaw config set plugins.slots.memory none
Enable memory
启用记忆功能
openclaw config set plugins.slots.memory memory-openviking
Restart the gateway after changing the slot.openclaw config set plugins.slots.memory memory-openviking
修改插槽配置后需重启网关。Multi-Instance Support
多实例支持
If you have multiple OpenClaw instances, use to target a specific one:
--workdirbash
undefined如果您有多个OpenClaw实例,使用指定特定实例:
--workdirbash
undefinedInstall script
安装脚本
curl -fsSL ... | bash -s -- --workdir ~/.openclaw-openclaw-second
curl -fsSL ... | bash -s -- --workdir ~/.openclaw-openclaw-second
Setup helper
配置助手
npx ./examples/openclaw-memory-plugin/setup-helper --workdir ~/.openclaw-openclaw-second
npx ./examples/openclaw-memory-plugin/setup-helper --workdir ~/.openclaw-openclaw-second
Manual config (prefix openclaw commands)
手动配置(在openclaw命令前添加前缀)
OPENCLAW_STATE_DIR=~/.openclaw-openclaw-second openclaw config set ...
undefinedOPENCLAW_STATE_DIR=~/.openclaw-openclaw-second openclaw config set ...
undefinedTroubleshooting
故障排查
| Symptom | Cause | Fix |
|---|---|---|
| Wrong API Key or model name | Check |
| Port used by another process | Change port: |
| Plugin not loaded | Env file not sourced or slot not configured | Check |
| Inaccurate recall | recallScoreThreshold too low | Increase threshold or adjust recallLimit |
| 症状 | 原因 | 解决方法 |
|---|---|---|
| API密钥或模型名称错误 | 检查 |
| 端口被其他进程占用 | 修改端口: |
| 插件未加载 | 未加载环境文件或插槽未配置 | 检查 |
| 调取结果不准确 | recallScoreThreshold过低 | 提高阈值或调整recallLimit |