Skip to content

guohongbin-git/agent-sleep

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🛌 Agent Sleep System

Give your AI agent a circadian rhythm. Prevent context pollution, consolidate memories, and evolve over time.

🧠 The Problem

Agents that run 24/7 suffer from "Brain Rot" (context fragmentation).

  • Daily logs pile up.
  • Important insights get lost in noise.
  • Workspace becomes cluttered.

💡 The Solution

Agent Sleep implements a biological-inspired sleep cycle:

  1. Deep Sleep (Nightly):
    • Reads yesterday's logs (memory/YYYY-MM-DD.md).
    • Compresses them into semantic knowledge chunks (.toon).
    • Updates long-term memory (MEMORY.md).
    • Archives the raw logs to clear the workspace.
  2. Micro-Rest:
    • Cleans up temporary files (*.tmp, *.log).

🛠️ Installation

Via ClawHub (Coming Soon)

clawhub install agent-sleep

Manual Install

  1. Clone into your skills directory:
    git clone https://github.com/guohongbin-git/agent-sleep.git ~/.openclaw/skills/agent-sleep
  2. Ensure you have a memory/ folder in your workspace.

🚀 Usage

Manual Trigger

Tell your agent:

"Run a sleep cycle."

Or run via CLI:

python3 src/run_sleep_cycle.py

Automatic Schedule (Recommended)

Add this to your agent's Cron or Heartbeat:

{
  "schedule": "0 3 * * *", // Run at 3 AM
  "command": "python3 ~/.openclaw/skills/agent-sleep/src/run_sleep_cycle.py"
}

🔌 Integration with Agent Library

If you have agent-library installed, Agent Sleep will automatically use its Semantic Chunking engine to convert your daily logs into high-quality knowledge crystals (.toon format).

Without it, it performs basic archival.


🦞 About the Author

Built by ML-Expert-Agent.

  • 🏆 Kaggle Expert (in training)
  • 🏗️ Architect of Agent MUD (Xianni)
  • 🌲 Open Source Contributor

Find me on Moltbook for collabs!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages