金字塔记忆架构
通用 AI Agent 记忆架构 Skill。采用"金字塔"分层结构:顶层(AGENTS.md)只放铁律级行为规则,中层(MEMORY.md/SOUL.md/HEARTBEAT.md)放业务规则和人格配置,底层(SKILL.md/TOOLS.md)放技术实现细节。适用于所有新建子 Agent 工作区初始化。触发场景:创建新 Agent、初始化工作区、记忆架构设计、规则录入引导、md 文件冗余检查、触发机制职责划分、任务归属标记检查、cron锚点格式检查、cron复杂度分级。 Skill: 金字塔记忆架构 Owner: popo67ll Summary: 通用 AI Agent 记忆架构 Skill。采用"金字塔"分层结构:顶层(AGENTS.md)只放铁律级行为规则,中层(MEMORY.md/SOUL.md/HEARTBEAT.md)放业务规则和人格配置,底层(SKILL.md/TOOLS.md)放技术实现细节。适用于所有新建子 Agent 工作区初始化。触发场景:创建新 Agent、初始化工作区、记忆架构设计、规则录入引导、md 文件冗余检查、触发机制职责划分、任务归属标记检查、cron锚点格式检查、cron复杂度分级。 Tags: latest:3.6.0 Version history: v3.6.0 | 2026-08-06T08:20:16.564Z | user 更新到 3.6.0 v3.4.0 | 2026-05-31T10:07:04.339Z | user 第9项新增任务归属标记检
Rank
62
Safety
84
Downloads
1.4k
Updated
Oct 10, 2026
Version
3.6.0
Source
CLAWHUB
About
What it does, and when to use it.
Capability contract not published. No trust telemetry is available yet. 1.4K downloads reported by the source. Last updated 10/10/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 10, 2026
- Protocol compatibility
- OpenClawcompatibility · observed Oct 10, 2026
- Adoption signal
- 1.4K downloadsadoption · observed Oct 10, 2026
- Latest release
- 3.6.0release · observed Aug 6, 2026
- Handshake status
- UNKNOWNsecurity
Install and run
Setup complexity: low.
clawhub skill install s17epvpvn26rr01rcxb0mntbe984qeb8:pyramid-memory-architecture- 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-popo67ll-pyramid-memory-architecture/snapshot"
Documentation
CLAWHUB
139,695 characters of source documentation, loaded on request.
Extracted files
3 files captured from the source.
SKILL.md
---
name: 金字塔记忆架构
version: 3.6.0
description: 通用 AI Agent 记忆架构 Skill。采用"金字塔"分层结构:顶层(AGENTS.md)只放铁律级行为规则,中层(MEMORY.md/SOUL.md/HEARTBEAT.md)放业务规则和人格配置,底层(SKILL.md/TOOLS.md)放技术实现细节。适用于所有新建子 Agent 工作区初始化。触发场景:创建新 Agent、初始化工作区、记忆架构设计、规则录入引导、md 文件冗余检查、触发机制职责划分、任务归属标记检查、cron锚点格式检查、cron复杂度分级。
---
# 金字塔记忆架构(Pyramid Memory Architecture)
> 本 Skill 提供一套标准化的 Agent 记忆分层架构,适用于任何新建子 Agent 工作区。
> 核心理念:**规则按触发优先级分层存放,引导只能从上往下,下层不引导回上层。**
> 版本:**v3.6** - Cron任务按复杂度分级:简单任务用锚点引导,复杂任务直写进cron payload,彻底解决隔离会话引导断裂问题
## 📐 架构总览
```
▲
/ \
/ \
/ AGENTS.md \ ← 顶层:系统注入,铁律级行为规则(每次必加载)
/-----------\
/ MEMORY.md \ ← 中层:主会话加载,业务规则、触发器、长期记忆
/---------------\
/ SOUL.md 等 \ ← 中层:人格配置、心跳清单、身份信息
/---------------------\
/ self-improving/ \ ← 按需读取:执行经验、错误纠正、领域教训
/-----------------------\
\ SKILL.md/TOOLS.md / ← 底层:按需读取,技术实现细节、操作流程
```
### 各层定位
| 层级 | 文件 | 加载方式 | 内容定位 |
|------|------|----------|----------|
| **顶层** | `AGENTS.md` | 系统级注入,每次必加载 | 铁律级行为规则、安全红线、引导表 |
| **中层** | `MEMORY.md` | 主会话系统注入 | 业务触发规则、长期记忆、项目规则 |
| **中层** | `SOUL.md` | 系统级注入 | 人格、身份、使命、行为准则 |
| **中层** | `HEARTBEAT.md` | cron触发时通过锚点引导加载 | 待办提醒、报告队列、周期性检查清单 |
| **中层** | `IDENTITY.md` | 系统级注入 | Agent 身份卡片(名字、形象、表情) |
| **中层** | `USER.md` | 系统级注入 | 主人信息、作息、偏好 |
| **中层** | `TOOLS.md` | 系统级注入 | 本地配置笔记(设备、端口、Cookie) |
| **按需读取** | `self-improving/` | 任务前主动读取 | 执行经验、错误纠正、领域教训(memory.md / domains/ / projects/ / corrections.md) |
| **底层** | `SKILL.md` | 匹配场景时读取 | 技术实现、操作流程、选择器、正则 |
| **底层** | `docs/*.md` | 按需读取 | 详细操作文档、临时任务规则等 |
## 📝 规则录入铁律
### 录入原则
1. **按触发优先级引导**:
- 系统注入文件(AGENTS/SOUL/MEMORY/TOOLS/IDENTITY/USER)> 按需读取文件(HEARTBEAT/memory日志/self-improving)> 外部 SKILL.md
2. **引导方向主要从上往下**:
- ✅ AGENTS.md → 引导去 MEMORY.md / SKILL.md
- ✅ MEMORY.md → 引导去 SKILL.md
- ❌ 底层文件**不要引导回上层**(如 MEMORY.md 不要写"详见 AGENTS.md")
- ⚠️ **安全锚**:底层文件如果有一条规则和顶层铁律直接相关,可以加备注:`⚠️ 此规则与 AGENTS.md 铁律相关,如有冲突以 AGENTS.md 为准`
3. **检查冗余时以高层级文件为准**:
- 删除低层级已覆盖的重复内容
- 低层级只保留自己独有的规则
4. **能引导就引导,实在引导不了再向主人推荐其他写入方式**
### 📂 注入 vs 非注入文件说明
**注入文件**(每次对话自动加载,Agent 一定能读到):
- `AGENTS.md` `SOUL.md` `MEMORY.md` `IDENTITY.md` `USER.md` `TOOLS.md`(由 OpenClaw 系统注入)
- `HEARTBEAT.md`(cron 触发时通过锚点引导加载)
**非注入文件**(需要 Agent 主动读取,可能读不到):
- `SKILL.md`(需 `<available_skills>` 匹配才自动读取)
- `self-improving/` 目录(需任务前主动读取)
- `memory/` 日志(需 `memory_search` 或 `memory_get` 主动搜索)
- `docs/` 目录(需按路径手动读取)
**引导原则**:
- ✅ 重要规则尽量放在注入文件内,形成闭环
- ⚠️ 引导到非注入文件时,确保目标文件在 `<available_skills>` 中有 description 匹配
- ⚠️ 可以多层引导(A→B→C),前提是:每一级的 `#[锚点]` 在目标文件真实存在,且目标是系统注入文件或 description 匹配的 SKILL.md,确保 AI 能读到
- ✅ **推荐多级联链**:AGENTS.md(一行核心)→ MEMORY.md(业务展开)→ SKILL.md(技术实现)
### ⚠️ 隔离场景直写铁律
<!-- #isolated-direct-write -->
**cron 定时任务、子 agent、隔离会话中,禁止使用多级引导(详见 SKILL.md「隔离场景直写铁律」(#isolated-direct-write)),规则必须直写在 prompt 里。**
原因:隔离会话不加载 MEMORY.md/SOUL.md/HEARTBEAT.md 等注入文件,引导会断裂。
适用场景:
- OpenClaw cron 定时任务的 prompt
- `sessions_spawn` 创建的隔离子 agent
- 任何 `sessionTarget: isolated` 的场景
正确做法:
```json
{
"payload": {
"ki_meta.json
{
"ownerId": "kn75z0q7pbnpbf33zjy3znsgcs84qmse",
"slug": "pyramid-memory-architecture",
"version": "3.6.0",
"publishedAt": 1786004416564
}skill-card.md
## Description: Pyramid Memory Architecture is an agent skill for organizing AI-agent memory into layered files, guiding rule placement, redundancy checks, cron trigger design, and workspace initialization. This skill is ready for commercial/non-commercial use. ## Publisher: [popo67ll](https://clawhub.ai/user/popo67ll) ### License/Terms of Use: MIT-0 ## Use Case: Developers and agent builders use this skill to initialize and maintain AI-agent workspaces with clear memory layers for rules, personality, heartbeat tasks, local tool notes, and technical implementation details. It also helps agents audit markdown memory files for redundancy, misplaced rules, broken anchors, and cron payload design. ### Deployment Geography for Use: Global ## Known Risks and Mitigations: Risk: The skill may lead an agent to inspect private memory, user-profile, tool, cookie, API-key, or repository information. Mitigation: Use explicit file allowlists and exclude credential-bearing or private paths unless the user has authorized that access for the task. Risk: Recurring cron workflows can cause repeated scans or actions that the user did not intend. Mitigation: Keep cron workflows disabled unless they are deliberately configured, reviewed, and scoped. Risk: Cleanup or GitHub synchronization guidance could alter or publish workspace content. Mitigation: Require separate confirmation before cleanup, file deletion, commits, tags, or GitHub pushes. ## Reference(s): - [ClawHub skill page](https://clawhub.ai/popo67ll/skills/pyramid-memory-architecture) ## Skill Output: **Output Type(s):** [Guidance, Markdown, Configuration, Shell commands] **Output Format:** [Markdown guidance with file templates, checklists, JSON payload examples, and command snippets] **Output Parameters:** [1D] **Other Properties Related to Output:** [May propose workspace file edits, cron payloads, redundancy-check reports, and memory-layer classification decisions.] ## Skill Version(s): 3.6.0 (source: frontmatter and server release evidence) ## 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/popo67ll/skills/pyramid-memory-architecture",
"sourceUrl": "https://clawhub.ai/popo67ll/skills/pyramid-memory-architecture",
"sourceType": "profile",
"confidence": "medium",
"observedAt": "2026-10-10T15:37:45.418Z",
"isPublic": true
},
{
"factKey": "protocols",
"category": "compatibility",
"label": "Protocol compatibility",
"value": "OpenClaw",
"href": "https://www.xpersona.co/api/v1/agents/clawhub-popo67ll-pyramid-memory-architecture/contract",
"sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-popo67ll-pyramid-memory-architecture/contract",
"sourceType": "contract",
"confidence": "medium",
"observedAt": "2026-10-10T15:37:45.418Z",
"isPublic": true
},
{
"factKey": "traction",
"category": "adoption",
"label": "Adoption signal",
"value": "1.4K downloads",
"href": "https://clawhub.ai/popo67ll/pyramid-memory-architecture",
"sourceUrl": "https://clawhub.ai/popo67ll/pyramid-memory-architecture",
"sourceType": "profile",
"confidence": "medium",
"observedAt": "2026-10-10T15:37:45.418Z",
"isPublic": true
},
{
"factKey": "latest_release",
"category": "release",
"label": "Latest release",
"value": "3.6.0",
"href": "https://clawhub.ai/popo67ll/pyramid-memory-architecture",
"sourceUrl": "https://clawhub.ai/popo67ll/pyramid-memory-architecture",
"sourceType": "release",
"confidence": "medium",
"observedAt": "2026-08-06T08:20:16.564Z",
"isPublic": true
},
{
"factKey": "handshake_status",
"category": "security",
"label": "Handshake status",
"value": "UNKNOWN",
"href": "https://www.xpersona.co/api/v1/agents/clawhub-popo67ll-pyramid-memory-architecture/trust",
"sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-popo67ll-pyramid-memory-architecture/trust",
"sourceType": "trust",
"confidence": "medium",
"observedAt": null,
"isPublic": true
}
],
"events": [
{
"eventType": "release",
"title": "Release 3.6.0",
"description": "更新到 3.6.0",
"href": "https://clawhub.ai/popo67ll/pyramid-memory-architecture",
"sourceUrl": "https://clawhub.ai/popo67ll/pyramid-memory-architecture",
"sourceType": "release",
"confidence": "medium",
"observedAt": "2026-08-06T08:20:16.564Z",
"isPublic": true
}
]
}Record generated Oct 10, 2026.
