返回顶部
m

memory-referee记忆仲裁层

Memory hygiene and adjudication layer for OpenClaw agent workflows. Deduplicates entities, resolves naming conflicts, separates facts from goals from speculation, archives stale records, enforces consistent schemas, detects contradictions, and preserves provenance. Complements ontology and Proactive Agent.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 0.1.0
安全检测
已通过
118
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

memory-referee

memory-referee

本体论主动代理赋予智能体更强的记忆能力。memory-referee旨在与本体论和主动代理等技能协同工作,为记忆提供更清晰的基础——去重实体、解决命名冲突、将事实、目标与推测分离、归档过期记录,并强制执行一致的架构。



基于Saturnday构建——专为AI生成代码设计的AI治理方案。

在治理memory-referee构建过程中,Saturnday捕获了AI编码人员常犯的错误:可能暴露API密钥的.env模式、可能静默丢失记忆记录的去重逻辑、通过验证但几乎未检测任何内容的虚假测试,以及会让格式错误的记录破坏下游决策的运行时验证漏洞。

这就是AI生成代码与受治理的AI生成代码之间的区别。

www.saturnday.dev




使用时机

当智能体的记忆存储可能累积以下内容时,调用此技能:

  • - 重复或近似重复的记录——应合并为单一规范条目
  • 命名冲突——同一实体以多个别名出现
  • 混合分类——事实、目标和推测交织在一起,缺乏明确标签
  • 过期记录——已超过有效期限,应归档
  • 架构漂移——不再符合预期结构的记录
  • 矛盾记录——两个记录对同一实体断言了不相容的事实

在运行本体论或主动代理后使用,以清理累积的记忆,然后再传递给下游。

输入

raw_records中的每条记录必须是包含以下字段的JSON对象:

字段类型必填描述
idstring记录的唯一标识符
kind
string | 是 | 取值为fact、goal或speculation之一 |
| entity | string | 是 | 该记录所涉及的实体 |
| content | string | 是 | 记录的内容 |
| timestamp | string | 是 | ISO 8601日期字符串 |
| provenance | object | 是 | 单一来源对象:{ sourceId, sourceLabel, capturedAt }。该技能内部将其包装为数组,以支持具有多个来源的合并记录。 |
| tags | string[] | 否 | 可选标签 |

输出

字段类型描述
reportstringMarkdown格式的裁决报告,总结所有决策
result
object | 结构化JSON,包含去重、分类和验证后的记录 |

使用方法

CLI

sh
echo [{id:r1,kind:fact,entity:Alice,content:Alice prefers dark mode,timestamp:2026-03-27T00:00:00Z,provenance:{sourceId:s1,sourceLabel:pref-log,capturedAt:2026-03-27T00:00:00Z}}] | node dist/index.js

typescript
import { main } from memory-referee;

const records = [
{
id: r1,
kind: fact,
entity: Alice,
content: Alice prefers dark mode,
timestamp: 2026-03-27T00:00:00Z,
provenance: { sourceId: s1, sourceLabel: pref-log, capturedAt: 2026-03-27T00:00:00Z }
}
];

const { markdown, json, report } = main(JSON.stringify(records));

console.log(markdown); // 人类可读的裁决报告
console.log(json); // 结构化JSON输出

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 memory-referee-1775995162 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 memory-referee-1775995162 技能

通过命令行安装

skillhub install memory-referee-1775995162

下载

⬇ 下载 memory-referee v0.1.0(免费)

文件大小: 34.65 KB | 发布时间: 2026-4-13 11:00

v0.1.0 最新 2026-4-13 11:00
Initial release of memory-referee: a robust memory adjudication layer for OpenClaw agent workflows.

- Deduplicates memory entities and resolves naming conflicts
- Separates facts, goals, and speculation; assigns clear classification
- Detects contradictions, archives stale records, and enforces schema consistency
- Preserves full provenance for each record after deduplication/merging
- Produces a human-readable adjudication report and structured JSON output

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部