Skip to content

feat(memos-local-openclaw): add LLM filter toggle for memory search#1464

Open
hijzy wants to merge 2 commits intoMemTensor:openclaw-local-plugin-20260408from
hijzy:feat/openclaw-llm-filter-toggle
Open

feat(memos-local-openclaw): add LLM filter toggle for memory search#1464
hijzy wants to merge 2 commits intoMemTensor:openclaw-local-plugin-20260408from
hijzy:feat/openclaw-llm-filter-toggle

Conversation

@hijzy
Copy link
Copy Markdown
Collaborator

@hijzy hijzy commented Apr 10, 2026

Summary

  • 在记忆面板 设置 → 通用设置 中新增「启用大模型过滤(记忆搜索)」开关
  • 默认开启(保持现有行为),关闭后 memory_search 工具和自动召回均跳过 summarizer.filterRelevant 调用,直接返回检索引擎候选结果
  • 支持中英文 i18n

Changes

文件 改动
src/types.ts recall 配置新增 llmFilterEnabled?: boolean 字段
src/config.ts resolveConfig 中默认值设为 true
src/viewer/html.ts 通用设置添加开关 UI、中英文 i18n、loadConfig/saveGeneralConfig 处理
src/viewer/server.ts handleSaveConfig 支持合并保存 recall 配置
index.ts memory_search 工具和 before_prompt_build 自动召回中根据配置跳过 LLM 过滤

Test plan

  • 开启开关(默认):memory_search 返回经 LLM 过滤的结果,行为与之前一致
  • 关闭开关:memory_search 直接返回检索引擎候选,响应更快,日志输出 "LLM filter disabled"
  • 自动召回同样受开关控制
  • 设置保存后重启,开关状态持久化正确
  • 中英文界面下开关文案显示正确

hijzy added 2 commits April 10, 2026 17:15
Add a new toggle in Settings > General to enable/disable LLM-based
relevance filtering for memory_search and auto-recall. The filter is
enabled by default (preserving existing behavior) but can be turned off
for faster results that skip the summarizer.filterRelevant call.

Changes:
- types.ts: add recall.llmFilterEnabled config field
- config.ts: default llmFilterEnabled to true
- html.ts: add toggle UI, i18n (en/zh), loadConfig & saveGeneralConfig
- server.ts: merge-save recall config in handleSaveConfig
- index.ts: guard filterRelevant calls behind llmFilterEnabled check
Add two new toggles in Settings > General:
- Enable Memory Search (memorySearchEnabled): controls whether
  memory_search tool and auto-recall retrieve memories. When off,
  the agent responds without any historical context.
- Enable Memory Capture (memoryAddEnabled): controls whether new
  conversations are captured and written to the database. When off,
  existing memories can still be retrieved but no new ones are stored.

Both default to enabled, preserving existing behavior.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant