ClawKit Logo
ClawKitReliability Toolkit
Back to Registry
Official Verified productivity Safety 4/5

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.

skill-install — Terminal

Install via CLI (Recommended)

clawhub install openclaw/skills/skills/guohongbin-git/agent-sleep
Or

What 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

  1. "Check if the agent is feeling overwhelmed or requires a light sleep cycle right now."
  2. "Schedule a deep sleep cycle for every day at 2:00 AM to archive my current progress."
  3. "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_DAYS variable 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

Stars2387
Views0
Updated2026-03-09
View Author Profile
AI Skill Finder

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 skill
Add to Configuration

Paste this into your clawhub.json to enable this plugin.

{
  "plugins": {
    "official-guohongbin-git-agent-sleep": {
      "enabled": true,
      "auto_update": true
    }
  }
}

Tags(AI)

#memory-management#automation#cortexgraph#cognitive-architecture#agent-optimization
Safety Score: 4/5

Flags: file-write, file-read, code-execution