Token导航 LogoToken导航TokenDH.com
效率需要联网clawhub未标认证来源可访问clear审计提醒

fractal-memory分形记忆

Agent Skill

fractal-memory 用于补充效率相关能力,适合在 OpenClaw 中需要让 Agent 承接效率相关任务时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

23,887

周安装

957

GitHub Stars

公开资料未说明

下载量

7,733
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:fractal-memory(分形记忆)
来源仓库:https://github.com/bugmaker2/fractal-memory
安装命令:
openclaw skills install fractal-memory
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install fractal-memory

简介

fractal-memory 实施分层内存压缩防止上下文溢出,延长有效记忆周期。

  • 按日→周→月→核心四级递进压缩历史信息,保留关键节点。
  • 适用于长期对话或多轮复杂任务中的记忆管理需求。
  • 需设置压缩阈值与重要事件标记规则以平衡空间与精度。
  • 建议定期导出核心记忆快照用于审计与回溯验证。fractal-memory 属于效率类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

name
fractal-memory
description
Automated hierarchical memory compression system that prevents context overflow through daily→weekly→monthly→core compression. Use when you need (1) long-term memory management without manual curation, (2) token-efficient context loading with attention-optimized hierarchy, (3) preventing session bloat from accumulated history, (4) automated memory rollups via cron, or (5) migrating from flat daily files to structured memory. Activates for memory architecture questions, context overflow issues, or setting up persistent agent memory.

Fractal Memory System

Automated hierarchical memory compression that prevents context overflow. Like human sleep, compress raw experience into patterns, patterns into principles—keeping essence while managing scale.

Philosophy

Memory is not accumulation — it is compression with intention.

Each layer compresses the one below without losing essence:

Conversation → Daily → Weekly → Monthly → Core Memory
                ↓
         Timeless Facts (sticky-notes)

Quick Start

1. Set Up Directory Structure

mkdir -p memory/diary/{2026/{daily,weekly,monthly},sticky-notes/{workflows,apis,commands,facts}}

2. Initialize State Files

Copy templates from assets/:

cp assets/rollup-state.json memory/
cp assets/heartbeat-state.json memory/

3. Install Scripts

Copy all scripts from scripts/ to your workspace scripts/ directory:

cp scripts/*.py ~/.openclaw/workspace/scripts/
chmod +x ~/.openclaw/workspace/scripts/*.py

4. Set Up Cron Jobs

See references/cron-setup.md for detailed cron configuration.

Quick version:

  • Daily rollup: 23:59 every day
  • Weekly rollup: 23:59 every Sunday
  • Monthly rollup: 23:59 last day of month

5. Update Session Startup

Add to your AGENTS.md:

## Every Session

1. Read `SOUL.md`
2. Read `USER.md`
3. Read `memory/diary/YYYY/daily/YYYY-MM-DD.md` (today + yesterday)
4. **If in MAIN SESSION**: Also read `MEMORY.md`

**Context loading order:** TODAY → THIS WEEK → THIS MONTH → MEMORY.md

Core Scripts

ensure_daily_log.py

Creates today's daily log if it doesn't exist. Run this in heartbeats or at session start.

python3 scripts/ensure_daily_log.py

append_to_daily.py

Append events to today's daily log programmatically.

python3 scripts/append_to_daily.py "Event description"

rollup-daily.py

Compress today's diary into this week's summary. Runs automatically at 23:59 daily.

python3 scripts/rollup-daily.py

rollup-weekly.py

Compress this week's summary into this month's summary. Runs automatically at 23:59 every Sunday.

python3 scripts/rollup-weekly.py

rollup-monthly.py

Distill this month's summary into MEMORY.md. Runs automatically at 23:59 on the last day of each month.

python3 scripts/rollup-monthly.py

verify_memory_integrity.py

Check memory system integrity and detect anomalies.

python3 scripts/verify_memory_integrity.py

Information Flow

1. During Conversation (Real-time)

Write to memory/diary/YYYY/daily/YYYY-MM-DD.md immediately. Don't rely on memory—write it down.

2. Daily Rollup (23:59 every day)

Extract patterns, decisions, key events → append to memory/diary/YYYY/weekly/YYYY-Wnn.md

3. Weekly Rollup (23:59 every Sunday)

Compress to themes, trajectory, milestones → append to memory/diary/YYYY/monthly/YYYY-MM.md

4. Monthly Rollup (Last day of month)

Distill major themes, lessons learned → update MEMORY.md

5. Timeless Facts (Anytime)

Extract facts that recur 3+ times → store in memory/diary/sticky-notes/{category}/

Key Principles

1. Write Everything Immediately

"Mental notes" don't survive session restarts. Files do.

2. Compress, Don't Accumulate

Files that grow forever become unreadable. Extract patterns, discard noise.

3. Curate Ruthlessly

Not everything deserves to persist. Keep what defines you, release what doesn't.

4. Automate Discipline

Scripts handle rollups so you don't have to remember.

Context Loading Strategy

Load memory in this order for attention optimization:

  1. TODAY - memory/diary/YYYY/daily/YYYY-MM-DD.md
  2. THIS WEEK - memory/diary/YYYY/weekly/YYYY-Wnn.md
  3. THIS MONTH - memory/diary/YYYY/monthly/YYYY-MM.md
  4. MEMORY.md - Core index (main session only)
  5. Relevant sticky-notes - As needed

Why this order? Primacy + recency optimization. Most recent first, highest level early.

Security Considerations

Memory systems create attack surface. The system includes:

  1. Provenance tracking - Timestamps and metadata
  2. Integrity verification - verify_memory_integrity.py detects tampering
  3. Anomaly detection - Flags unusual patterns

Run integrity checks periodically:

python3 scripts/verify_memory_integrity.py

Migration

Migrating from existing memory systems? See references/migration-guide.md for:

  • Flat daily files → Fractal structure
  • Manual MEMORY.md only → Automated system
  • Other hierarchical systems → Fractal memory

Troubleshooting

Daily log not created

Run ensure_daily_log.py manually or add to heartbeat checks.

Rollup failed

Check cron job runs: cron(action="runs", jobId="<job-id>")

Context still overflowing

  • Verify rollups are running (check memory/rollup-state.json)
  • Manually run rollup scripts to catch up
  • Check MEMORY.md isn't growing too large (should be curated, not accumulated)

Scripts not executable

chmod +x scripts/*.py

Advanced Usage

Custom Rollup Schedule

Modify cron expressions in references/cron-setup.md

Sticky Notes Categories

Add custom categories in memory/diary/sticky-notes/:

mkdir memory/diary/sticky-notes/my-category

Manual Rollup

Run rollup scripts manually anytime:

python3 scripts/rollup-daily.py
python3 scripts/rollup-weekly.py
python3 scripts/rollup-monthly.py

Architecture Details

For deep dive into system design, philosophy, and implementation details, see references/architecture.md.

References

  • Deva's Fractal Memory v1.0.0 - Original inspiration
  • Arcturus's Memory is Resurrection - Philosophical foundation
  • Logi's Memory Architecture as Agency - Agency perspective

*"What grows from chaos is structure. What emerges from structure is memory. What persists through memory is self."* — Deva

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

87.59%
按下载量换算6,773

安全审计

VirusTotal

可疑

ClawScan

可疑

Static analysis

未展示

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills