agent-sleep
Agent 睡眠系统 - 记忆整合、日志归档、工作区清理(支持 CortexGraph)
Why use this skill?
Optimize your OpenClaw agent with the sleep skill. Automate memory consolidation, CortexGraph synchronization, and log archiving to maintain agent efficiency.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/guohongbin-git/agent-sleepWhat This Skill Does
The agent-sleep skill acts as the metabolic maintenance system for OpenClaw agents. Just as human cognition requires sleep to reorganize information and clear mental clutter, this system automates memory consolidation, log archiving, and workspace hygiene. By integrating with CortexGraph, it applies sophisticated cognitive models like the Ebbinghaus forgetting curve to decide which information is worth retaining, promoting high-value insights into long-term memory (LTM) and discarding ephemeral data. It essentially prevents context pollution, ensuring your agent remains efficient, focused, and intellectually organized over long periods of operation.
Installation
To integrate agent-sleep into your environment, use the ClawHub CLI tool:
clawhub install openclaw/skills/skills/guohongbin-git/agent-sleep
Ensure you have configured your environment variables, specifically the CORTEXGRAPH_STORAGE_PATH, to allow the agent to store and retrieve memory states effectively. Verify the installation by checking the scripts directory within the agent-sleep folder to ensure all Python dependencies are resolved.
Use Cases
- Daily Intellectual Hygiene: Automatically trigger deep sleep cycles at 3:00 AM to archive daily logs and summarize interactions into a clean MEMORY.md file.
- Optimized Knowledge Retention: Use the CortexGraph synchronization mode to apply decay models, ensuring the agent keeps important context relevant while allowing low-value information to fade.
- Resource Management: Periodically clean up workspace directories to prevent log accumulation and maintain system performance during long-running agent tasks.
- Automated Memory Upgrading: Transition daily insights into high-value LTM storage based on usage frequency and importance metrics.
Example Prompts
- "Check if the agent is feeling overwhelmed or requires a light sleep cycle right now."
- "Schedule a deep sleep cycle for every day at 2:00 AM to archive my current progress."
- "Trigger a manual synchronization with CortexGraph to ensure my recent insights are preserved and decayed correctly."
Tips & Limitations
- Tip: Always monitor the
memory/archive/folder to ensure that critical, non-automated data isn't being inadvertently swept during deep sleep routines. - Tip: Adjust your
CORTEXGRAPH_PL_HALFLIFE_DAYSvariable if you find the agent is forgetting important information too quickly. - Limitation: This skill requires continuous file system access. Ensure that your container or host environment has appropriate read/write permissions set for the memory directories.
- Limitation: The memory consolidation process is non-reversible once files are moved to the archive and original logs are purged.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-guohongbin-git-agent-sleep": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Flags: file-write, file-read, code-execution
Related Skills
sspai-hot-cn
少数派热门文章监控 | SSPAI Hot Articles Monitor. 获取少数派热门数码评测、应用推荐、效率工具 | Get SSPAI trending digital reviews, app recommendations, productivity tools. 触发词:少数派、sspai、数码评测、效率工具.
binance-pro-cn
币安专业版 | Binance Pro. 完整币安集成 | Complete Binance integration. 现货/合约交易、杠杆、质押 | Spot/futures trading, leverage, staking. 触发词:币安、Binance、交易、trading.
v2ex-hot-cn
V2EX 热门话题监控 | V2EX Hot Topics Monitor. 获取 V2EX 热门帖子、技术讨论、数码生活 | Get V2EX trending posts, tech discussions, digital life. 触发词:V2EX、v2、程序员社区.
xueqiu-hot-cn
雪球热门讨论监控 | Xueqiu Hot Discussions Monitor. 获取雪球热门股票讨论、投资观点、大V动态 | Get Xueqiu trending stock discussions, investment insights, top posts. 触发词:雪球、股票、投资、xueqiu.
tianyancha-cn
企业信息查询 - 天眼查/企查查/爱企查数据查询(Bloomberg 终端中国版)