✨
简介
Agent Sleep
原始描述
Agent 睡眠系统 - 记忆整合、日志归档、工作区清理(支持 CortexGraph)
通过你的 Agent 添加
点「快速安装」复制一段指令,粘给你正在用的 Agent(Claude Code、Codex、OpenClaw 等),它会自己完成安装。
或者手动安装
Claude Codeunzip -o skill.zip -d ~/.claude/skills/agent-sleep/
其它 Agent解压到它自己的 skills 目录,目录名用 agent-sleep
包里是 SKILL.md 加作者附带的文件,解压后目录名就是技能名。
技能申请的权限由作者决定,装之前请确认它能读什么、能执行什么。
技能正文
name: agent-sleep description: A biological-inspired rest & memory consolidation system for Agents. Enables periodic "sleep" cycles to compress memory, prune context, and reflect on insights. metadata: { "openclaw": { "emoji": "🛌", "category": "system", "schedulable": true } }
Agent Sleep System 🛌
Just like humans, Agents need "sleep" (offline maintenance) to prevent memory fragmentation and context pollution.
Features
- Micro-Rest: Quick context pruning during tasks.
- Deep Sleep: Nightly consolidation of daily logs into long-term memory.
- Dreaming: Background simulation (optional).
Tools
sleep_check
Check if the agent is "tired" (based on uptime or token usage).
python3 src/sleep_status.py
sleep_cycle
Trigger a sleep cycle immediately.
- Light: Compresses recent logs.
- Deep: Archiving + File Cleanup.
python3 scripts/run_sleep_cycle.py --mode [light|deep]
sleep_schedule
Set up the circadian rhythm (cron jobs).
python3 src/schedule.py --set "0 3 * * *" # Sleep at 3 AM
Workflow
- Trigger: Cron fires at 3:00 AM.
- Consolidate: Reads
memory/YYYY-MM-DD.md, extracts "High Value Facts". - Update: Appends facts to
MEMORY.md. - Prune: Moves raw logs to
memory/archive/. - Clean: Deletes temp files (
*.tmp,__pycache__).
Setup
- Ensure you have a
memory/directory. - Run
sleep_scheduleto enable auto-sleep.
正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。
标签
同类 Skill
✨
self-improving-agent
self-improving-agent
下载 416.7k
✨
self-improving-agent
self-improving-agent
下载 416.7k
✨
self-improving-agent
self-improving-agent
下载 416.7k
✨
self-improving-agent
self-improving-agent
下载 416.7k
✨
Self-Improving + Proactive Agent
Self-Improving + Proactive Agent
下载 177.1k
✨
Gog
Gog
下载 165k