OpenClaw Knowledge Runtime
What This Skill Does
Use this skill to design or implement a standalone knowledge runtime that can:
- 1. Read layered memory and knowledge sources.
- Retrieve the most relevant knowledge for the current role, objective, and signals.
- Link knowledge to entities, genes, tasks, and prior events.
- Write stable findings back after successful runs.
Why Install It
This skill is useful when an agent already has memories, logs, tasks, and reusable assets, but they are still scattered across unrelated files or stores.
Use it to:
- - turn scattered memory into a layered runtime
- add typed links between knowledge, entities, events, and reusable assets
- return a compact retrieval bundle for prompts, ranking, and observability
- keep write-back strict so the store stays durable instead of noisy
Quick Start
Follow this default sequence:
- 1. Define the two-axis memory model with layers and scopes.
- Store
knowledge_entry, knowledge_link, and entity records. - Build a query from role, objective, direction, and recent signals.
- Rank candidates, expand one hop through typed links, and trim results.
- Expose a small output bundle to prompts, task ranking, and dashboards.
- Write back only stable findings after successful runs.
Memory Model
Use two axes.
- - Layers:
working, episodic, semantic, procedural, INLINECODE7 - Scopes:
session, shared, INLINECODE10
Default placement rules:
- -
gene, capsule, skill, and reusable playbooks belong to procedural. - Event logs, task outcomes, and run histories belong to
episodic. - Stable conclusions and research briefs belong to
semantic. - User constraints and system rules belong to
policy.
Core Records
The runtime should center on three record types:
- -
knowledge_entry: the main unit of stored knowledge - INLINECODE19 : a typed relationship between records
- INLINECODE20 : the canonical form of a repo, module, topic, paper, person, org, or asset
Storage
Default files:
- - INLINECODE21
- INLINECODE22
- INLINECODE23
- INLINECODE24
Retrieval Flow
When retrieval is needed:
- 1. Build the current query from role, objective, direction, query bundle, and signals.
- Retrieve candidate knowledge from layered sources.
- Expand one hop through typed links.
- Return a compact bundle with:
-
knowledge_hits
-
knowledge_bias_tags
-
linked_entities
-
linked_genes
-
memory_layers
- INLINECODE30
Typed Links
Recommended relations:
- - INLINECODE31
- INLINECODE32
- INLINECODE33
- INLINECODE34
- INLINECODE35
- INLINECODE36
- INLINECODE37
- INLINECODE38
- INLINECODE39
Write-Back Rule
Only write back stable, high-signal findings.
- - Good: validated findings, repeated problem patterns, reusable research summaries
- Bad: raw logs, speculative notes, temporary scratch content
Adapter Surfaces
Keep the runtime decoupled from any one agent loop. Plug it into host systems through generic adapters:
- -
query_builder: turns role, objective, and signals into a retrieval query - INLINECODE41 : ranks hits and prepares the runtime output bundle
- INLINECODE42 : adds knowledge relevance into task or action scoring
- INLINECODE43 : injects a compact knowledge block into prompts
- INLINECODE44 : records durable findings after successful runs
- INLINECODE45 : exposes hit counts, linked entities, and layer coverage to reports or dashboards
Additional Resources
Use these files:
- -
README.md: overview, use cases, and integration checklist - INLINECODE47 : example retrieval, ranking, and write-back flows
- INLINECODE48 : record schemas, output shape, and adapter details
OpenClaw 知识运行时
该技能的功能
使用此技能设计或实现一个独立的知识运行时,能够:
- 1. 读取分层内存和知识源。
- 检索与当前角色、目标和信号最相关的知识。
- 将知识与实体、基因、任务和先前事件关联。
- 在成功运行后将稳定发现写回。
为何安装
当智能体已拥有记忆、日志、任务和可复用资产,但这些内容仍分散在无关的文件或存储中时,此技能非常有用。
使用它来:
- - 将分散的记忆转化为分层运行时
- 在知识、实体、事件和可复用资产之间添加类型化链接
- 返回紧凑的检索包,用于提示、排序和可观测性
- 保持写回严格性,使存储持久稳定而非嘈杂
快速开始
遵循以下默认顺序:
- 1. 定义具有层和作用域的双轴记忆模型。
- 存储 knowledgeentry、knowledgelink 和 entity 记录。
- 根据角色、目标、方向和近期信号构建查询。
- 对候选结果排序,通过类型化链接扩展一跳,并修剪结果。
- 向提示、任务排序和仪表板输出小型结果包。
- 仅在成功运行后写回稳定的发现。
记忆模型
使用两个轴。
- - 层:working、episodic、semantic、procedural、policy
- 作用域:session、shared、published
默认放置规则:
- - gene、capsule、skill 和可复用剧本属于 procedural。
- 事件日志、任务结果和运行历史属于 episodic。
- 稳定结论和研究简报属于 semantic。
- 用户约束和系统规则属于 policy。
核心记录
运行时应围绕三种记录类型:
- - knowledgeentry:存储知识的主要单元
- knowledgelink:记录之间的类型化关系
- entity:仓库、模块、主题、论文、人员、组织或资产的规范形式
存储
默认文件:
- - memory/knowledge/knowledgestore.jsonl
- memory/knowledge/knowledgelinks.jsonl
- memory/knowledge/knowledgeindex.json
- memory/knowledge/entityindex.json
检索流程
当需要检索时:
- 1. 根据角色、目标、方向、查询包和信号构建当前查询。
- 从分层源中检索候选知识。
- 通过类型化链接扩展一跳。
- 返回包含以下内容的紧凑包:
- knowledge_hits
- knowledge
biastags
- linked_entities
- linked_genes
- memory_layers
- knowledge
contextpreview
类型化链接
推荐的关系:
- - mentionsentity
- supportsgene
- derivedfromevent
- abstractstask
- contradicts
- supersedes
- sametopicas
- evidencefor
- usedbycycle
写回规则
仅写回稳定、高信号的发现。
- - 好的:验证过的发现、重复的问题模式、可复用的研究摘要
- 差的:原始日志、推测性笔记、临时草稿内容
适配器接口
保持运行时与任何单一智能体循环解耦。通过通用适配器将其接入宿主系统:
- - querybuilder:将角色、目标和信号转化为检索查询
- retrievalselector:对命中结果排序并准备运行时输出包
- taskranker:将知识相关性加入任务或动作评分
- promptcontext:将紧凑的知识块注入提示
- write_back:在成功运行后记录持久发现
- observability:向报告或仪表板公开命中计数、链接实体和层覆盖情况
附加资源
使用以下文件:
- - README.md:概述、用例和集成清单
- examples.md:检索、排序和写回流程示例
- reference.md:记录模式、输出形状和适配器详情