Token导航 LogoToken导航TokenDH.com
研究检索权限需确认clawhub未标认证来源可访问clear审计通过

clawhub-memory-tiersClawHub 记忆 tiers

Agent Skill

clawhub-memory-tiers 用于查找、检索和筛选相关信息,适合在 OpenClaw 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

4,916

周安装

209

GitHub Stars

公开资料未说明

下载量

1,722
OpenClaw

安装说明

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

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

ClawHubOpenClaw
openclaw skills install clawhub-memory-tiers

简介

ClawHub 记忆 tiers 为 OpenClaw 代理提供分层内存支持,通过状态快照和滚动上下文增强启动时的即时上下文能力。

  • 适用于需要快速恢复会话状态、维护短期记忆或多任务切换的代理场景。
  • 通过 L0 层记录关键操作快照,L1 层保留最近七天的对话上下文,实现高效记忆检索。
  • 安装命令:openclaw skills install clawhub-memory-tiers;需确认是否涉及文件读写或网络访问权限。
  • 建议在使用前检查技能维护状态及数据持久化边界,避免敏感信息泄露风险。

SKILL.md

name
agent-memory-tiers
version
1.0.0
description
Tiered memory system for OpenClaw agents. Gives agents instant context on startup with a 4-line state snapshot (L0) and 7-day rolling context (L1). Eliminates the cold-start problem where agents waste tokens re-reading old files to figure out where they left off. Battle-tested across a 20-agent production swarm. Saves 300-3700 tokens per activation.
metadata
openclaw
category
productivity
tags
["memory", "context", "multi-agent", "token-efficiency", "state-management"]

Agent Memory Tiers

Stop your agents from forgetting everything between runs.

OpenClaw agents start every activation with zero memory of what they did last time. They waste hundreds or thousands of tokens re-reading old files, parsing chat history, and reconstructing context. This skill fixes that.

Agent Memory Tiers is a structured, self-updating memory system that gives agents instant context on startup. Two files, updated automatically at the end of every run, so the next activation starts warm.

Tested in production across a 20-agent swarm running daily for 3+ weeks.

How It Works

Two memory layers sit in each agent's workspace:

LayerPurposeSizeLoaded
L0Instant state snapshot4 linesEvery activation
L17-day rolling context~20-40 linesEvery activation
L2+Historical memoryVariesOnly when needed

The agent reads L0 and L1 before doing anything else. Before finishing, it updates both files. Next activation picks up exactly where this one left off.

Token savings: 300-3700 tokens per activation depending on agent complexity. Over a week of daily runs, that adds up fast.

Setup

Step 1: Create L0.md in your agent's workspace

# L0 — [AGENT_NAME] Quick State

You are [AGENT_NAME]. [One sentence describing role and purpose.]
Current focus: [Top priority right now — what matters most this week.]
Last run: [Date and one-line summary of last activity, or "No runs yet."]
Flags: [Critical state warnings — cron status, credit limits, blockers. "None" if clear.]

Example — a content agent:

# L0 — WRITER Quick State

You are WRITER. Content engine for the company blog and social accounts.
Current focus: Draft 3 LinkedIn posts promoting the new pricing page.
Last run: 2026-03-15 — Generated 2 blog teasers and 1 thought leadership post.
Flags: Publishing queue has 8 posts loaded through Mar 22. No blockers.

Example — a monitoring agent:

# L0 — WATCHDOG Quick State

You are WATCHDOG. Security monitor for the production environment.
Current focus: Track error rates after the v2.4 deploy.
Last run: 2026-03-16 — Scanned logs, no anomalies. Alert threshold at 2% error rate.
Flags: Grafana dashboard unreachable intermittently. Investigate if persists.

Step 2: Create L1.md in your agent's workspace

# L1 — [AGENT_NAME] Rolling Context

## Last 7 Days
- YYYY-MM-DD: One-line summary of activity or state change.
- YYYY-MM-DD: Another entry.
(Keep exactly 7 most recent. Drop oldest when adding new.)

## Active Tasks (Top 3)
1. Task description — additional context, owner if relevant.
2. Second priority task.
3. Third priority task.

## Key State
- Important file paths, tracker values, config state.
- Anything that changed recently.
- Numbers the agent needs to know (queue sizes, deadlines, etc.).

## Blockers
- What is preventing progress. Root cause, not symptom.
- Remove resolved blockers. Add new ones.
- "None" if clear.

Example — a lead generation agent:

# L1 — SCOUT Rolling Context

## Last 7 Days
- 2026-03-16: Scanned LinkedIn for AI consulting leads. Found 4 warm prospects.
- 2026-03-15: Researched 3 companies posting AI job listings. Added to LEADS.md.
- 2026-03-14: First hunt run. Established search criteria and baseline.

## Active Tasks (Top 3)
1. Find 5 qualified leads per week — businesses publicly struggling with AI adoption.
2. Score leads by budget signals (hiring, funding rounds, public complaints).
3. Pass top leads to PITCH agent for proposal drafting.

## Key State
- LEADS.md: 7 prospects, 2 qualified, 0 contacted.
- Search channels: LinkedIn, Twitter, Hacker News, industry forums.
- Services offered: $2k-$6k setup + $500-$2k/month management.

## Blockers
- None.

Step 3: Add the Quick Context header to your SOUL.md

Paste this at the top of your agent's SOUL.md file, right after the role description:

## Quick Context (read these FIRST, before anything else)
1. Read `L0.md` — your current state in 4 lines.
2. Read `L1.md` — your last 7 days, active tasks, and blockers.
3. Only read files from `memory/` if your current task requires older history.
4. Before finishing: update L0.md and L1.md (see End-of-Run section at bottom).

Step 4: Add the End-of-Run footer to your SOUL.md

Paste this at the bottom of your agent's SOUL.md file:

## End-of-Run Memory Update (MANDATORY — do this before finishing every activation)

1. **Update L0.md** with exactly 4 lines:
   - Line 1: One-sentence identity reminder.
   - Line 2: Current top priority (what matters most RIGHT NOW after this run).
   - Line 3: What you just did this run (date + one line).
   - Line 4: State flags (cron status, credit warnings, blockers, or "None").

2. **Update L1.md:**
   - Add today's date + one-line summary to "Last 7 Days" (keep only 7 most recent entries — drop the oldest).
   - Update "Active Tasks" with current top 3 after this run.
   - Update "Key State" with any changed numbers, files, or dates.
   - Update "Blockers" — remove resolved ones, add new ones.

Why This Structure

L0 is for speed. Four lines. The agent reads it in under 50 tokens and immediately knows: who am I, what should I focus on, what did I do last, and is anything broken. No digging through files.

L1 is for context. Seven days of history, three active tasks, key numbers, and blockers. Enough to make informed decisions without loading the full memory archive. Stays under 200 tokens for most agents.

L2+ is on-demand. Historical memory files in a memory/ folder. Only loaded when the task explicitly requires older context. This keeps routine activations fast and cheap.

Self-updating is critical. The agent writes its own L0/L1 before finishing. No external process needed. No sync scripts. The agent that did the work is the one that records what happened.

Multi-Agent Coordination

When running multiple agents, any orchestrator agent can read another agent's L0.md to get instant status without interrupting it or parsing logs.

## Orchestrator Pattern

Before assigning a task to another agent:
1. Read their L0.md to check current focus and flags.
2. Read their L1.md "Blockers" section to confirm they are not stuck.
3. If blocked, route the task to a backup agent or flag for human review.

This eliminates the "is this agent available?" guessing game and prevents task collisions in multi-agent setups.

Common Mistakes

MistakeFix
L0 grows beyond 4 linesRuthlessly compress. If it does not fit in 4 lines, it belongs in L1.
L1 "Last 7 Days" keeps growingHard cap at 7 entries. Drop the oldest every time you add a new one.
Agent skips the end-of-run updatePut "MANDATORY" in the SOUL.md footer. Bold it. Agents follow strong directives.
L1 blockers pile upRemove blockers the moment they are resolved. Stale blockers cause confusion.
Storing detailed logs in L1L1 is summaries only. One line per day. Details go in dedicated log files.
Using relative dates ("yesterday")Always use absolute dates (YYYY-MM-DD). The agent does not know when it last ran.

Error Handling

Agent does not read L0/L1 on startup: The "Quick Context" header in SOUL.md must be near the top. If it is buried below other instructions, the agent may skip it. Move it directly after the role description.

Agent overwrites L0/L1 with garbage: This usually means the SOUL.md footer instructions are too vague. Use the exact template above with explicit line counts and section names. Agents follow precise structure better than general guidance.

L1 file grows too large (over 50 lines): Your "Key State" section is probably accumulating instead of updating. Each run should replace old state values, not append. Restructure: state is current values, not a changelog.

Multiple agents writing to the same L0/L1: Each agent must have its own L0.md and L1.md in its own workspace. Never share these files between agents. The orchestrator reads them, but only the owning agent writes them.

Permissions

This skill requires:

  • File read/write in the agent's workspace directory — to read and update L0.md and L1.md.
  • No network access required.
  • No external API access required.
  • No sensitive data access required.

Credits

Built and battle-tested by the Megaport swarm team. Inspired by the OpenViking tiered memory architecture.

License

MIT — use it, modify it, share it.

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

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

04

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

能力 5

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

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

平台分布

OpenClaw

89.76%
按下载量换算1,546

安全审计

VirusTotal

通过

ClawScan

通过

Static analysis

通过

权限和风险

权限需确认

当前来源未能明确判断权限范围,默认进入异常复核队列。

安装前确认

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

来源信息

继续浏览同类 Skills