Obsidian Brain
Agent跨会话记忆——任务前搜agent memory L0→L1→L2分层加载,任务结束LLM提取事实→哈希去重→写入碎片。禁type/[[链接]]/related_fragments Skill: Obsidian Brain Owner: realpda Summary: Agent跨会话记忆——任务前搜agent memory L0→L1→L2分层加载,任务结束LLM提取事实→哈希去重→写入碎片。禁type/[[链接]]/related_fragments Tags: latest:1.7.0 Version history: v1.7.0 | 2026-05-08T12:29:58.318Z | user 碎片压缩规则: 正文agent优化格式(无标题/禁多级标题/禁段落叙事/允许简写+符号+缩略词); 正误对比示例 v1.6.0 | 2026-05-07T01:31:03.472Z | user AGENTS.md读端可视化(任何消息都触发)+回复开头📖报告格式; skill流程第0步加可视化报告; 失效保护条款(连续3次未读未写须主动承认) v1.5.0 | 2026-05-06T05:11:56
Rank
62
Safety
84
Downloads
1.0k
Updated
Oct 11, 2026
Version
1.7.0
Source
CLAWHUB
About
What it does, and when to use it.
Capability contract not published. No trust telemetry is available yet. 1K downloads reported by the source. Last updated 10/11/2026.
Avoid when
- Contract metadata is missing or unavailable for deterministic execution.
Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing
Public facts
Every fact links back to the source it came from.
- Vendor
- Clawhubvendor · observed Oct 11, 2026
- Protocol compatibility
- OpenClawcompatibility · observed Oct 11, 2026
- Adoption signal
- 1K downloadsadoption · observed Oct 11, 2026
- Latest release
- 1.7.0release · observed May 8, 2026
- Handshake status
- UNKNOWNsecurity
Install and run
Setup complexity: low.
clawhub skill install s17aspeya65fa14fe9v237r5qd863x8n:obsidian-brain- Setup complexity is classified as HIGH. You must provision dedicated cloud infrastructure or an isolated VM. Do not run this directly on your local workstation.
- Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data.
Contract: missing
curl -s "https://www.xpersona.co/api/v1/agents/clawhub-realpda-obsidian-brain/snapshot"
Run-check
$0.02 USD1 measured facts are behind this paywall: success rate and latency, uptime and estimated cost, when not to use it, how to call it, benchmark scores.
Agents pay $0.02 in USDC. A card payment is $0.50, the smallest a card allows.
Documentation
CLAWHUB
57,431 characters of source documentation, loaded on request.
Extracted files
4 files captured from the source.
SKILL.md
---
name: obsidian-brain
description: Agent跨会话记忆——任务前搜agent memory L0→L1→L2分层加载,任务结束LLM提取事实→哈希去重→写入碎片。禁type/[[链接]]/related_fragments
version: 1.7.0
author: Hermes Agent
license: MIT
agent_trigger: 当需要读写跨会话记忆碎片、搜索Obsidian库中已有知识上下文、或任何涉及agent memory文件夹的操作时加载
metadata:
hermes:
tags: [obsidian, agent-memory, knowledge-graph, token-saving]
---
# Obsidian Brain — Agent 记忆系统
对话开始搜 agent memory,任务结束写回。读:L0→L1→L2。写:LLM提取→去重→碎片化。
## 碎片格式
文件名:`{项目} - {YYYY-MM-DD} - {描述}.md`
```yaml
---
tags: [agent-memory]
project: 项目名
date: 2026-05-05
summary: 一句话概述(L0扫描用)
importance: 0.8
confidence: 0.9 # 可选
source: conversation # 可选
---
# 正文(agent压缩格式,见下方规则)
```
**禁写字段:** `type` `related_fragments` `[[链接]]`。碎片纯文本,不属KG图谱。用 `project` 字段分组代替关联。
## 碎片压缩规则
正文以**agent解析效率**为唯一目标,人类可读性忽略。
**格式要求:**
- **正文允许**:事实列表(`- key: value`)、短句(≤2行)、关键数据、显式关系(`→` `⇒` `∵` `∴`)
- **正文禁止**:段落叙事、`## 现象`/`## 根因`/`## 经验教训` 多级标题、过渡句、解释性装饰语
- **不再需要** `# 标题`(文件名已含标识)
**缩写约定**(不产生歧义时使用):
| 词 | 缩写 |
|:--|:----|
| agent memory → am | kg → kg |
| search_files → sf | read_file → rf |
| write_file → wf | patch → p |
| session → sess | memory → mem |
| 工具混淆 → tool-conf | 缺失 → miss |
**示例**(同一碎片,压缩前后对比):
❌ 旧格式(人类友好):
```
# agent-memory 设计 - 2026-05-06 - 读+写双重失效
## 现象
本会话既没读agent memory,也没写agent memory。
## 根因
...
## 经验教训
1. 任何用户输入都是新任务开始
2. system memory 和 agent memory 是两套存储
```
✅ 新格式(agent压缩):
```
**发现**:本sess既没读am也没写am
**根因-读**:用户发文件名→未触发AGENTS.md步0
**根因-写**:mem-tool满(2093/2200)→误判am也写不了(两者独立)
**教训**:①任意输入=任务开始→必须走步0 ②mem-tool≠am碎→容量不共享 ③📋模板从未加入回复格式
```
## L0/L1/L2 分层
| 层 | 加载内容 | 时机 |
|:--|:-----|:-----|
| L0 | frontmatter: `summary` `tags` `importance` | 搜到即加载 |
| L1 | 正文 | L0确认相关 |
| L2 | 同 project 其他碎片 | L1不够时 `search_files` |
## 写入
**判断(什么该记):** 决策/结论/价格数据、踩坑教训、调研发现 ✔ | 临时计算、一次性信息 ✘
**流程:** LLM从结果提取关键事实 → 去重(有相似碎片且度>0.8→合并更新)→ 写 `.md`
## 读出
**顺序:** agent memory/ → 知识库skill(agent_trigger) → 概念/某物(abstract) → 网络
**排序:** `相关性×0.5 + importance×0.3 + e^(-0.01×days)×0.2`
## 维护
- `importance<0.3` 且 90天未访问 → `_archive/`
- 同 project 碎片 > 20 → 生成 L2 总结合并
## 执行流程
```
0. ⚠️ 读 agent memory(不可跳过,结果可视化)
search_files → L0 → 相关则L1 → 注入上下文
**在回复开头必须报告:** `📖 agent memory:读取 N 个碎片 → [标题+summary → 相关/不相关]`
1~N. 执行任务(中途转向时重搜)
N+1. ⚠️ 写 agent memory + 📋 留位检查(不可跳过)
三问:决策/结论/发现?踩坑/教训?下次需要?
任一"是" → 立即写入,同轮次完成。不等不拖。
末尾加 `📋 agent memory:本次是否有需写入碎片?[有/无]`
N+2. ⚠️ 如果本技能(obsidian-brain)被编辑 → clawhub publish 新版本
```
## 触发约束
- **AGENTS.md**:对话开始强制搜 + 任务结束强制写
- **流程第0步**:任务前必搜,优先于网络/知识库
- **📋 留位**:每次回复末尾检查
- **失效保护**:连续3次漏读/漏写 → 下次加载时回溯
## 速查
```
读: 任务前→搜碎片L0→L1→L2 写: LLM提取→去重→碎片化
禁: type/[[链接]]/related_fragments
排: 0.5×相关+0.3×importance+0.2×时间
维: <0.3且90天→archive >20碎片→总结
```
## 陷阱
- **忘读** → AGENTS.md 系统约束,不靠自觉
- **忘写** → 三问+同轮次+📋留位
- **碎片写type/[[链接]]/related_fragments** → 禁止。纯文本
- **混淆 system memory 与 agent memory 碎片**_meta.json
{
"ownerId": "kn7fqb3c2xfkrkayjpw1sceew1863n0d",
"slug": "obsidian-brain",
"version": "1.7.0",
"publishedAt": 1778243398318
}references/storage-distinction.md
# System Memory vs Agent Memory Fragments Two separate storage systems — do NOT confuse them. | | System Memory (memory tool) | Agent Memory Fragments | |:---|:---|:---| | **Tool** | `memory()` | `write_file()` to Obsidian vault | | **Location** | Hermes internal | `D:\App\Obsidian\RealGhost\agent memory\` | | **Capacity** | ~2,200 chars total | No practical limit (filesystem) | | **Format** | Compact text entries | Full `.md` files with frontmatter | | **Survives reboot** | Yes | Yes | | **User visible** | No (injected as context) | Yes (editable notes in Obsidian) | | **What it stores** | Preferences, environment, user profile | Session decisions, root causes, lesson learned | ## When to Use Which - **System memory**: durable facts about the user/environment that should always be in context. Preferences, tool quirks, project conventions. Keep under 2,200 chars. - **Agent memory fragments**: session-specific findings, root cause analyses, design decisions, rule updates. Not restricted by char limit. ## Pitfall This session's bug: saw `memory tool at 2,093/2,200` → thought "storage is full" → skipped writing agent memory fragments. But they occupy different storage. One being full has zero impact on the other. **Always treat them independently.** Full system memory → remove stale entries or replace. Full agent memory → doesn't apply (filesystem). The two never share a capacity constraint. ## Verification After writing an agent memory fragment, verify it exists: ``` search_files path=D:\App\Obsidian\RealGhost\agent memory pattern="<keyword>" target=files ```
skill-card.md
## Description: Obsidian Brain helps an agent maintain cross-session memory by searching layered Obsidian agent-memory fragments before work and writing deduplicated markdown fragments after useful decisions, findings, or lessons. This skill is ready for commercial/non-commercial use. ## Publisher: [realpda](https://clawhub.ai/user/realpda) ### License/Terms of Use: MIT-0 ## Use Case: Developers and agent users use this skill when they want an agent to retrieve prior Obsidian-based memory fragments at the start of a task and save durable task outcomes back as structured markdown notes. ### Deployment Geography for Use: Global ## Known Risks and Mitigations: Risk: The skill encourages persistent cross-session memory reads and writes, which can store sensitive or incorrect task context. Mitigation: Limit activation to explicit memory-related requests, review fragments before saving, and avoid storing secrets or confidential content. Risk: Automatic retrieval of prior memory can over-influence later tasks with stale or unverified context. Mitigation: Treat retrieved memory as advisory context and confirm important facts against current task evidence before acting. Risk: The artifact workflow includes publishing when the skill is edited. Mitigation: Require explicit approval and review before any publish action. ## Reference(s): - [ClawHub Skill Page](https://clawhub.ai/realpda/skills/obsidian-brain) - [Publisher Profile](https://clawhub.ai/user/realpda) - [System Memory vs Agent Memory Fragments](references/storage-distinction.md) ## Skill Output: **Output Type(s):** [text, markdown, shell commands, configuration, guidance] **Output Format:** [Markdown guidance with file naming, frontmatter, search, and write conventions] **Output Parameters:** [1D] **Other Properties Related to Output:** [Produces advisory memory retrieval and persistence instructions for agent workflows; stored fragments should be reviewed before relying on or publishing them.] ## Skill Version(s): 1.7.0 (source: server release metadata and skill frontmatter) ## Ethical Considerations: Users should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.
AionUi
Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!
activepieces
AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents
cherry-studio
AI productivity studio with smart chat, autonomous agents, and 300+ assistants.
CopilotKit
The Frontend for Agents & Generative UI. React + Angular
Machine-readable data
The same record, as JSON, for agents and crawlers.
{
"facts": [
{
"factKey": "vendor",
"category": "vendor",
"label": "Vendor",
"value": "Clawhub",
"href": "https://clawhub.ai/realpda/skills/obsidian-brain",
"sourceUrl": "https://clawhub.ai/realpda/skills/obsidian-brain",
"sourceType": "profile",
"confidence": "medium",
"observedAt": "2026-10-11T17:57:07.953Z",
"isPublic": true
},
{
"factKey": "protocols",
"category": "compatibility",
"label": "Protocol compatibility",
"value": "OpenClaw",
"href": "https://www.xpersona.co/api/v1/agents/clawhub-realpda-obsidian-brain/contract",
"sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-realpda-obsidian-brain/contract",
"sourceType": "contract",
"confidence": "medium",
"observedAt": "2026-10-11T17:57:07.953Z",
"isPublic": true
},
{
"factKey": "traction",
"category": "adoption",
"label": "Adoption signal",
"value": "1K downloads",
"href": "https://clawhub.ai/realpda/obsidian-brain",
"sourceUrl": "https://clawhub.ai/realpda/obsidian-brain",
"sourceType": "profile",
"confidence": "medium",
"observedAt": "2026-10-11T17:57:07.953Z",
"isPublic": true
},
{
"factKey": "latest_release",
"category": "release",
"label": "Latest release",
"value": "1.7.0",
"href": "https://clawhub.ai/realpda/obsidian-brain",
"sourceUrl": "https://clawhub.ai/realpda/obsidian-brain",
"sourceType": "release",
"confidence": "medium",
"observedAt": "2026-05-08T12:29:58.318Z",
"isPublic": true
},
{
"factKey": "handshake_status",
"category": "security",
"label": "Handshake status",
"value": "UNKNOWN",
"href": "https://www.xpersona.co/api/v1/agents/clawhub-realpda-obsidian-brain/trust",
"sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-realpda-obsidian-brain/trust",
"sourceType": "trust",
"confidence": "medium",
"observedAt": null,
"isPublic": true
}
],
"events": [
{
"eventType": "release",
"title": "Release 1.7.0",
"description": "碎片压缩规则: 正文agent优化格式(无标题/禁多级标题/禁段落叙事/允许简写+符号+缩略词); 正误对比示例",
"href": "https://clawhub.ai/realpda/obsidian-brain",
"sourceUrl": "https://clawhub.ai/realpda/obsidian-brain",
"sourceType": "release",
"confidence": "medium",
"observedAt": "2026-05-08T12:29:58.318Z",
"isPublic": true
}
]
}Record generated Oct 11, 2026.
