Skip to content
cccskills
FreePublished on GitHub

openclaw-memory-tencentdb-setup

Install and configure the memory-tencentdb plugin for OpenClaw to retain and retrieve conversation information. Verify the setup through logs and searches, adjust memory settings, and troubleshoot missing recall or vector search results.

OriginalShow the original description

用于在 OpenClaw 环境中安装、配置并验证 @tencentdb-agent-memory/memory-tencentdb 插件。当用户提到"安装记忆插件""配置 memory-tencentdb""开启长期记忆/召回"或出现相关报错时应触发。

See how to install

Good for

  • Enable long-term memory in OpenClaw
  • Adjust recall and retention settings
  • Investigate saved memories that cannot be retrieved
  • Verify vector search configuration

Files included (200)

  • SKILL.md5.5 KB
  • .dockerignore1.7 KB
  • .npmignore279 B
  • bin/export-tencent-vdb.mjs690 B
  • bin/migrate-sqlite-to-tcvdb.mjs460 B
  • bin/read-local-memory.mjs716 B
  • bin/seed-v2.mjs1.4 KB
  • docker-compose.local-mongo.yaml3.9 KB
  • Dockerfile7.9 KB
  • hermes-plugin/memory/memory_tencentdb/__init__.py37.1 KB
  • hermes-plugin/memory/memory_tencentdb/client.py11.0 KB
  • hermes-plugin/memory/memory_tencentdb/plugin.yaml458 B
  • hermes-plugin/memory/memory_tencentdb/README.md14.5 KB
  • hermes-plugin/memory/memory_tencentdb/supervisor.py16.8 KB
  • index.ts42.2 KB
  • kubb.config.ts993 B
  • openclaw-plugin/.gitignore31 B
  • openclaw-plugin/docs/architecture.md7.0 KB
  • openclaw-plugin/index.ts10.5 KB
  • openclaw-plugin/openclaw.plugin.json2.7 KB
  • openclaw-plugin/package.json818 B
  • openclaw-plugin/README_CN.md9.1 KB
  • openclaw-plugin/README.md9.4 KB
  • openclaw-plugin/src/format.ts3.2 KB
  • openclaw-plugin/src/hooks/capture.ts8.3 KB
  • openclaw-plugin/src/hooks/recall.ts1.8 KB
  • openclaw-plugin/src/sanitize.ts3.5 KB
  • openclaw-plugin/src/tools/conversation-search.ts1.9 KB
  • openclaw-plugin/src/tools/memory-search.ts1.6 KB
  • openclaw-plugin/src/tools/read-cos.ts1.3 KB
  • openclaw-plugin/tsconfig.json446 B
  • openclaw.plugin.json16.3 KB
  • package.json6.2 KB
  • pi-plugin/.gitignore26 B
  • pi-plugin/index.ts3.4 KB
  • pi-plugin/package.json664 B
  • pi-plugin/README.md3.8 KB
  • pi-plugin/tsconfig.json259 B
  • pi-plugin/vitest.config.ts162 B
  • pnpm-workspace.yaml351 B
  • README_CN.md12.3 KB
  • README.md10.7 KB
  • scripts/bench-checkpoint-lock.ts6.6 KB
  • scripts/bench-l0-mongo/bench.ts25.2 KB
  • scripts/bench-l0-mongo/build-compare.mjs19.7 KB
  • scripts/bench-l0-mongo/compare-8c32g.html31.6 KB
  • scripts/bench-l0-mongo/generate.ts12.6 KB
  • scripts/bench-l0-mongo/index.html27.2 KB
  • scripts/bench-l0-mongo/insert.ts7.2 KB
  • scripts/bench-l0-mongo/merge-reports.mjs3.5 KB
  • scripts/bench-l0-mongo/metrics.ts1.8 KB
  • scripts/bench-l0-mongo/parse-qps-log.mjs5.1 KB
  • scripts/bench-l0-mongo/probe-ceiling.ts8.8 KB
  • scripts/bench-l0-mongo/probe-query-ceiling.ts6.2 KB
  • scripts/bench-l0-mongo/query.ts6.5 KB
  • scripts/bench-l0-mongo/report.ts2.5 KB
  • scripts/bench-l0-mongo/view-report.html11.9 KB
  • scripts/ci/check-skill-queue-isolation.sh5.1 KB
  • scripts/cleanup-vdb-test-dbs.ts3.9 KB
  • scripts/db/mongodb-init.js4.0 KB
  • scripts/db/sqlite-init.sql8.1 KB
  • scripts/e2e-memory-prompt-vdb-cos.ts26.3 KB
  • scripts/export-tencent-vdb/export-tencent-vdb.ts19.4 KB
  • scripts/export-tencent-vdb/tsconfig.json468 B
  • scripts/import-opik-to-memory-core/index.ts34.0 KB
  • scripts/import-opik-to-memory-core/README.md8.1 KB
  • scripts/import-opik-to-memory-skill-py/import_opik.py41.0 KB
  • scripts/import-opik-to-memory-skill-py/README.md7.7 KB
  • scripts/install_hermes_memory_tencentdb.sh14.2 KB
  • scripts/install-hermes-plugin.sh5.5 KB
  • scripts/install-openclaw-plugin.sh16.4 KB
  • scripts/measure-mongo-fts-latency.ts2.9 KB
  • scripts/migrate-sqlite-to-tcvdb/cli-entry.ts392 B
  • scripts/migrate-sqlite-to-tcvdb/config-write.ts3.2 KB
  • scripts/migrate-sqlite-to-tcvdb/manifest-write.ts1.6 KB
  • scripts/migrate-sqlite-to-tcvdb/node-llama-cpp.d.ts370 B
  • scripts/migrate-sqlite-to-tcvdb/README.md8.1 KB
  • scripts/migrate-sqlite-to-tcvdb/sqlite-to-tcvdb.ts28.9 KB
  • scripts/migrate-sqlite-to-tcvdb/tsconfig.json546 B
  • scripts/migrate-v2-to-v3/README_CN.md3.0 KB
  • scripts/migrate-v2-to-v3/README.md3.0 KB
  • scripts/migrate-v2-to-v3/v2-to-v3-migrate.py18.4 KB
  • scripts/probe-vdb-capacity.ts2.3 KB
  • scripts/probe-vdb-reclaimable.ts4.1 KB
  • scripts/read-local-memory/read-local-memory.ts33.8 KB
  • scripts/read-local-memory/tsconfig.json459 B
  • scripts/start-e2e-gateway.ts2.8 KB
  • scripts/verify-clear-vs-archive.ts9.0 KB
  • scripts/verify-tcvdb-clear.ts10.8 KB
  • SKILL-DIAGNOSTIC-EXPORT.md6.6 KB
  • SKILL-MIGRATION.md7.8 KB
  • src/adapters/index.ts931 B
  • src/adapters/openclaw/host-adapter.ts3.4 KB
  • src/adapters/openclaw/index.ts325 B
  • src/adapters/openclaw/llm-runner.ts3.1 KB
  • src/adapters/standalone/host-adapter.ts2.5 KB
  • src/adapters/standalone/index.ts358 B
  • src/adapters/standalone/llm-provider-resolver.ts2.7 KB
  • src/adapters/standalone/llm-runner.ts20.3 KB
  • src/adapters/standalone/storage-tools.ts7.1 KB
  • src/api-trace/api-log-config.ts1.4 KB
  • src/api-trace/api-request-context.ts604 B
  • src/api-trace/api-sanitize.ts2.2 KB
  • src/api-trace/api-trace-logger.ts1.6 KB
  • src/api-trace/api-trace-policy.ts1.2 KB
  • src/api-trace/api-trace-stdout.ts1.1 KB
  • src/api-trace/api-traced-proxy.ts5.1 KB
  • src/api-trace/index.ts852 B
  • src/cli/commands/seed.ts10.2 KB
  • src/cli/index.ts1.8 KB
  • src/cli/README.md4.6 KB
  • src/config.ts36.9 KB
  • src/core/abstractions/index.ts796 B
  • src/core/abstractions/types.ts3.9 KB
  • src/core/backend-selection/index.ts522 B
  • src/core/backend-selection/local-resolver.ts4.1 KB
  • src/core/backend-selection/store-configs.ts1.1 KB
  • src/core/backend-selection/types.ts3.5 KB
  • src/core/backend-selection/validate.ts2.6 KB
  • src/core/conversation/l0-recorder.ts23.0 KB
  • src/core/decision/providers/jev/client.ts10.2 KB
  • src/core/decision/registry.ts2.3 KB
  • src/core/decision/types.ts3.9 KB
  • src/core/hooks/auto-capture.ts14.6 KB
  • src/core/hooks/auto-recall.ts40.7 KB
  • src/core/hooks/recall-errors.ts3.7 KB
  • src/core/index.ts1.9 KB
  • src/core/instance-config-provider.ts16.2 KB
  • src/core/memory-generation-log/best-effort.ts827 B
  • src/core/memory-generation-log/store.ts7.4 KB
  • src/core/memory-generation-log/types.ts2.4 KB
  • src/core/memory-prompt/composer.ts1.9 KB
  • src/core/memory-prompt/resolver.ts3.8 KB
  • src/core/memory-prompt/types.ts4.3 KB
  • src/core/persona/jev-diagnostics.ts1.8 KB
  • src/core/persona/jev-gate.ts20.6 KB
  • src/core/persona/persona-generator.ts14.1 KB
  • src/core/persona/persona-trigger.ts5.0 KB
  • src/core/profile/profile-scope.ts5.3 KB
  • src/core/profile/profile-sync.ts17.9 KB
  • src/core/prompts/l1-dedup.ts12.1 KB
  • src/core/prompts/l1-extraction.ts17.6 KB
  • src/core/prompts/persona-generation.ts14.7 KB
  • src/core/prompts/scene-extraction.ts29.9 KB
  • src/core/quota/credit-calculator.ts2.2 KB
  • src/core/quota/index.ts275 B
  • src/core/quota/noop-quota-reporter.ts894 B
  • src/core/quota/quota-manager.ts7.3 KB
  • src/core/record/l1-dedup.ts15.9 KB
  • src/core/record/l1-extractor.ts31.1 KB
  • src/core/record/l1-reader.ts7.6 KB
  • src/core/record/l1-writer.ts13.6 KB
  • src/core/report/clickhouse-exporter.ts27.4 KB
  • src/core/report/console-backend.ts8.6 KB
  • src/core/report/factory.ts4.3 KB
  • src/core/report/file-logger.ts5.0 KB
  • src/core/report/index.ts2.8 KB
  • src/core/report/kafka-metric-producer.ts3.5 KB
  • src/core/report/langfuse-span-processor.ts8.1 KB
  • src/core/report/log.ts2.6 KB
  • src/core/report/metric-tracking-l1-latency.ts2.2 KB
  • src/core/report/metric-tracking-l2-latency.ts4.5 KB
  • src/core/report/metric-tracking-l3-latency.ts5.0 KB
  • src/core/report/metric-tracking-recall.ts3.4 KB
  • src/core/report/metric-tracking-runner.ts13.1 KB
  • src/core/report/noop-backend.ts4.9 KB
  • src/core/report/obs-logger.ts2.5 KB
  • src/core/report/otel-context.ts1.8 KB
  • src/core/report/otel-sdk-init.ts15.3 KB
  • src/core/report/otlp-backend.ts20.5 KB
  • src/core/report/reporter.ts3.3 KB
  • src/core/report/trace-middleware.ts2.9 KB
  • src/core/report/trace-propagation.ts1.7 KB
  • src/core/report/trace.ts2.5 KB
  • src/core/report/traced-task-executor.ts5.7 KB
  • src/core/report/types.ts12.1 KB
  • src/core/scene/filename-normalizer.ts6.9 KB
  • src/core/scene/scene-derive.ts2.1 KB
  • src/core/scene/scene-extractor.ts28.1 KB
  • src/core/scene/scene-format.ts1.9 KB
  • src/core/scene/scene-index.ts5.1 KB
  • src/core/scene/scene-navigation.ts5.1 KB
  • src/core/seed/input.ts14.7 KB
  • src/core/seed/seed-runtime.ts14.3 KB
  • src/core/seed/types.ts3.6 KB
  • src/core/session/session-record.ts7.6 KB
  • src/core/skill/__contract__/skill-store.contract.ts7.6 KB
  • src/core/skill/conversation-add/add-handler.ts14.4 KB
  • src/core/skill/conversation-add/agent-task-queue.ts30.6 KB
  • src/core/skill/conversation-add/buffer-storage.ts12.2 KB
  • src/core/skill/conversation-add/extract-worker.ts29.3 KB
  • src/core/skill/conversation-add/index.ts1.9 KB
  • src/core/skill/conversation-add/message-compressor.ts3.3 KB
  • src/core/skill/conversation-add/oversize-strategy.ts4.2 KB
  • src/core/skill/conversation-add/prepare-archive.ts3.3 KB
  • src/core/skill/conversation-add/skill-core-sink.ts3.4 KB
  • src/core/skill/conversation-add/trigger-service.ts10.1 KB
  • src/core/skill/conversation-add/wire.ts4.2 KB
  • src/core/skill/conversation-add/worker-pool.ts15.8 KB
  • src/core/skill/index.ts3.5 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

目的

在不依赖外部托管记忆服务的前提下,为 OpenClaw 提供可持续的本地长期记忆能力(L0→L1→L2→L3),并完成从安装、配置到验收的一次性闭环。

适用场景

  • 用户要求在 OpenClaw 中安装或启用 memory-tencentdb
  • 用户需要配置召回、提取、画像、清理等参数
  • 用户反馈"插件已装但无记忆 / 无召回 / 无向量检索"

不适用场景

  • 用户只需要解释 memory 理念,不要求实际落地
  • 用户要接入非 OpenClaw 宿主(先确认目标框架)

标准工作流

1) 环境预检

先确认基础版本满足要求:

  • OpenClaw: >= 2026.3.13
  • Node.js: >= 22.16.0

执行:

openclaw --version
node -v

若版本不满足,先升级再继续。

2) 安装插件

执行安装命令:

openclaw plugins install @tencentdb-agent-memory/memory-tencentdb

如已安装则执行更新:

openclaw plugins update memory-tencentdb

3) 写入最小配置

编辑 ~/.openclaw/openclaw.json,确保存在:

{
  "memory-tencentdb": {
    "enabled": true
  }
}

说明:该插件支持零配置启动;不补充其它字段也能运行基础能力。

4) 按需追加推荐配置(生产常用)

根据用户需求补充如下分组:

  • capture: 对话捕获与保留策略
  • extraction: L1 提取与去重
  • pipeline: L1→L2→L3 调度
  • recall: 召回数量、阈值、策略
  • persona: 场景与画像触发参数
  • embedding: 向量检索配置(远端 OpenAI 兼容)

推荐模板:

{
  "memory-tencentdb": {
    "capture": {
      "enabled": true,
      "excludeAgents": [],
      "l0l1RetentionDays": 90,
      "cleanTime": "03:00"
    },
    "extraction": {
      "enabled": true,
      "enableDedup": true,
      "maxMemoriesPerSession": 10,
      "model": "provider/model"
    },
    "pipeline": {
      "everyNConversations": 5,
      "enableWarmup": true,
      "l1IdleTimeoutSeconds": 600,
      "l2DelayAfterL1Seconds": 10,
      "l2MinIntervalSeconds": 900,
      "l2MaxIntervalSeconds": 3600,
      "sessionActiveWindowHours": 24
    },
    "recall": {
      "enabled": true,
      "maxResults": 5,
      "scoreThreshold": 0.3,
      "strategy": "hybrid"
    },
    "persona": {
      "triggerEveryN": 50,
      "maxScenes": 15,
      "backupCount": 3,
      "sceneBackupCount": 10,
      "model": "provider/model"
    },
    "embedding": {
      "enabled": true,
      "provider": "openai",
      "baseUrl": "https://api.openai.com/v1",
      "apiKey": "${EMBEDDING_API_KEY}",
      "model": "text-embedding-3-small",
      "dimensions": 1536,
      "conflictRecallTopK": 5
    }
  }
}

5) 关键配置规则(避免隐性失败)

  • embedding.provider = "none" 时,向量能力会禁用,仅保留关键词路径。
  • 若配置远端 provider(如 openai / deepseek),必须同时提供:
    • apiKey
    • baseUrl
    • model
    • dimensions
  • 上述任一缺失时,插件会继续运行,但自动降级为非向量模式。
  • l0l1RetentionDays:
    • 0 表示不清理
    • 非 0 时建议 >=3
    • 若设为 1~2,需显式开启 allowAggressiveCleanup

6) 重启并验证生效

执行:

openclaw gateway restart

检查项:

  • Gateway 日志中出现 [memory-tdai] 前缀
  • 数据目录已创建:~/.openclaw/state/memory-tdai/
  • 至少包含:conversations/、records/、scene_blocks/、vectors.db

7) 功能冒烟测试

执行一次最小对话回路并验证:

  1. 连续对话 2~3 轮,提供可记忆信息(偏好、约束、背景)。
  2. 发起新一轮对话,观察是否出现召回上下文注入。
  3. 在 Agent 中调用:
    • tdai_memory_search
    • tdai_conversation_search
  4. 确认能检索到刚刚产生的内容。

故障排查速查

  • 插件无日志:检查 openclaw.json 中 memory-tencentdb.enabled 是否为 true,并确认已重启 Gateway。
  • 有记录无召回:检查 recall.enabled、scoreThreshold 是否过高。
  • 无向量结果:检查 embedding 四元组(apiKey/baseUrl/model/dimensions)是否齐全。
  • 清理过猛导致历史过少:检查 l0l1RetentionDays 与 allowAggressiveCleanup。
  • 配置已改但行为不变:确认修改的是 ~/.openclaw/openclaw.json,并再次重启 Gateway。

安全与合规约束

  • 将 apiKey 视为敏感信息;不在聊天、日志、截图中明文扩散。
  • 优先使用环境变量注入密钥;配置示例中仅保留占位符。
  • 仅修改 memory-tencentdb 对应配置段,避免覆盖用户其它插件配置。

完成定义(Definition of Done)

在结束任务前,必须同时满足:

  • 插件安装/更新命令执行成功
  • openclaw.json 已存在有效 memory-tencentdb 配置
  • Gateway 已重启
  • [memory-tdai] 日志可见
  • 数据目录与关键文件已生成
  • 至少 1 次检索工具调用成功返回结果

交付话术模板

可在完成后向用户输出:

  • 已完成 memory-tencentdb 安装与配置,并重启 Gateway。
  • 已验证日志与数据目录生效,记忆链路可用。
  • 如需下一步优化,可继续调优 recall.scoreThreshold、pipeline.everyNConversations、persona.triggerEveryN 与 embedding 模型参数。

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

setup-proxy

FreeSummary

Connect an AI agent client to Memory Proxy, which adds team memory, skills, and knowledge to model requests. The guided workflow checks existing settings, tests connectivity, and writes the appropriate client configuration.

  • Connect an AI agent to team memory
  • Reuse an existing proxy configuration
  • Test connectivity before writing settings
TencentCloud/TencentDB-Agent-Memory29.6KUpdated Oct 15, 2026

See all skills by TencentCloud

Report a problem with this skill