TKGMR Route Injection

Thin OpenClaw TKGMR plugin for bounded route hint injection and feedback submission.

Install

openclaw plugins install clawhub:openclaw-tkgmr

openclaw-tkgmr

openclaw-tkgmr 是一个 OpenClaw 原生插件,用于在 before_prompt_build 阶段注入有界的 TKGMR route hints,并在 agent_end 阶段安全提交 feedback。

这个插件保持“薄插件”边界:

  • 插件负责生命周期接入、HTTP 请求、响应校验和 fail-open
  • tkgmr-service 负责 temporal memory routing、feedback learning 和 GUI

安装

发布到 ClawHub 或 npm 后,可直接通过 OpenClaw 安装:

openclaw plugins install openclaw-tkgmr

如果要从本地源码包安装:

npm run package:plugin
openclaw plugins install ./release/openclaw-tkgmr-0.1.3.tgz

基础配置

openclaw config set plugins.entries.openclaw-tkgmr.enabled true --strict-json
openclaw config set plugins.entries.openclaw-tkgmr.config.baseUrl http://127.0.0.1:8089
openclaw config set plugins.entries.openclaw-tkgmr.config.routeTopK 5 --strict-json
openclaw config set plugins.entries.openclaw-tkgmr.config.maxSelectedMemories 5 --strict-json
openclaw config validate
openclaw gateway restart

常用参数

  • routeTopK:route candidate 数
  • maxSelectedMemories:最终注入的 selected memory 数
  • maxMemoryExcerptChars:每条 excerpt 长度上限
  • maxInjectedChars:总注入字符预算
  • maxRecentTurns:发送给 sidecar 的 recent context 轮数

查看 TKG 图

  • GUI:http://127.0.0.1:8089/gui
  • 面板:Graph
  • 原始图接口:http://127.0.0.1:8089/gui-api/graph?limit=120

架构约束

  • 不是 kind: "memory" 插件
  • 推荐与 openclaw-mem0 共存
  • sidecar 不可用时 fail-open,不阻断主 agent 流程