← 返回
未分类 Key 中文

openclaw-siliconflow-memory

Configure OpenClaw semantic memory to use SiliconFlow embeddings through the OpenAI-compatible API, especially `BAAI/bge-m3`. Use when enabling or repairing...
配置OpenClaw语义记忆使用SiliconFlow嵌入,通过OpenAI兼容API调用BAAI/bge-m3模型。用于启用或修复时。
otweihan otweihan 来源
未分类 clawhub v1.0.0 1 版本 100000 Key: 需要
★ 0
Stars
📥 336
下载
💾 4
安装
1
版本
#latest

概述

OpenClaw SiliconFlow Memory

Goal

Configure OpenClaw memory_search to use SiliconFlow embeddings reliably, then verify indexing and retrieval.

Use this skill to:

  • switch memory embeddings to SiliconFlow
  • standardize on BAAI/bge-m3
  • set fallback: "none" for clearer debugging
  • add curated external Markdown paths to semantic memory
  • diagnose failed indexing or failed retrieval

Workflow

1. Inspect the memory config surface first

Before changing config, inspect the relevant schema paths:

  • agents.defaults.memorySearch
  • agents.defaults.memorySearch.remote
  • agents.defaults.memorySearch.extraPaths

Then inspect the current config with gateway config.get so the patch is based on the latest hash.

Important:

  • Configure memory under agents.defaults.memorySearch, not top-level memorySearch.
  • For OpenAI-compatible embedding endpoints, set remote.apiKey explicitly.

2. Apply the recommended memorySearch config

Use gateway config.patch and keep the configuration explicit.

Recommended baseline:

agents: {
  defaults: {
    memorySearch: {
      provider: "openai",
      model: "BAAI/bge-m3",
      fallback: "none",
      remote: {
        baseUrl: "https://api.siliconflow.cn/v1/",
        apiKey: "YOUR_SILICONFLOW_API_KEY"
      }
    }
  }
}

Why this baseline works well:

  • provider: "openai" matches SiliconFlow's OpenAI-compatible embeddings API
  • model: "BAAI/bge-m3" is a strong default for mixed Chinese/English Markdown recall
  • fallback: "none" avoids silently switching providers during debugging
  • explicit remote.baseUrl and remote.apiKey remove ambiguity

3. Add external knowledge paths conservatively

When indexing a local knowledge base, prefer curated paths instead of adding the entire repo at once.

Good first candidates:

  • source notes
  • concepts
  • project overviews
  • indexes
  • README-style top-level knowledge summaries

Avoid adding these in the first pass unless the user explicitly wants them indexed:

  • inbox or capture folders
  • daily journals
  • templates
  • archives
  • noisy exports or generated files

Example:

agents: {
  defaults: {
    memorySearch: {
      extraPaths: [
        "D:/Knowledge/README.md",
        "D:/Knowledge/Notes/02-Sources",
        "D:/Knowledge/Notes/03-Concepts",
        "D:/Knowledge/Notes/05-Projects",
        "D:/Knowledge/Notes/09-Indexes"
      ]
    }
  }
}

4. Validate in this order

After config reload/restart, validate in a fixed order:

  1. openclaw memory status --deep
  2. openclaw memory index --force
  3. openclaw memory search ""
  4. tool-layer memory_search with the same query

Success signs:

  • Embeddings: ready
  • Indexed: N/N files increases as expected
  • Dirty: no
  • retrieval returns snippets from the intended external paths

5. Use known text for verification

Do not validate with vague keywords only.

Prefer a phrase that appears verbatim in the indexed notes, such as:

  • a README opening sentence
  • a project title
  • a section heading
  • a unique domain phrase

This makes it easier to distinguish:

  • indexing failure
  • retrieval quality issues
  • query mismatch

Common failures

404 page not found

Interpret this as: the endpoint likely does not provide embeddings at the configured route.

Typical cause:

  • using a chat/completions proxy that does not expose /embeddings

Action:

  • switch to SiliconFlow's embeddings endpoint
  • confirm remote.baseUrl is https://api.siliconflow.cn/v1/
  • confirm the embedding model name is valid

fetch failed

Interpret this as: the request could not complete at all.

Typical causes:

  • bad API key
  • unreachable endpoint
  • transient network issue
  • provider auto-detection picked the wrong backend

Action:

  • make provider, model, remote.baseUrl, and remote.apiKey explicit
  • retry openclaw memory status --deep

EBUSY: resource busy or locked

Interpret this as: the SQLite memory store is locked during reindex.

Action order:

  1. retry the index once after current memory operations settle
  2. restart OpenClaw and retry
  3. if the lock persists, reboot the machine and retry

Do not assume config is wrong just because reindex failed with EBUSY.

Recommended operating style

  • keep the embedding provider explicit
  • keep fallback: "none" during setup and debugging
  • add knowledge paths in small batches
  • validate with both CLI and tool-layer retrieval
  • prefer high-signal Markdown sources over raw dumps

Completion checklist

Before declaring success, confirm all of the following:

  • SiliconFlow API key is configured
  • BAAI/bge-m3 is active
  • openclaw memory status --deep shows Embeddings: ready
  • reindex succeeds
  • indexed file count reflects the intended extra paths
  • at least one query returns a result from the external knowledge base

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-31 17:00 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

Knowledge-Base

otweihan
结构化 Markdown 知识库管理协议。在知识库中新增、整理、搜索笔记和项目。匹配:在知识库中记笔记/归档/整理/搜索/创建项目/写日报/写周报/记录外部来源/沉淀概念或问题模型/知识库体检。当用户提到知识库操作、笔记管理、知识库健康检查
★ 0 📥 455

portable-deployment-audit

otweihan
对OpenClaw部署、代码仓库和本地项目目录进行只读安全审计。扫描指定目标目录中的暴露凭据...
★ 0 📥 428

skill-retrieval-gate

otweihan
决定是否在执行其他技能或工作流前运行 `memory_search`,以便智能体减少 token 使用量,同时避免每个任务都强制检索。
★ 0 📥 386