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

agent-state-backup

Auto-backs up core files (IDENTITY, SOUL, MEMORY, knowledge base) daily via cron, creates compressed .tgz archive, enables one-click restore in new environment. Solves context loss after restart/migration.

skill-install — Terminal

Install via CLI (Recommended)

clawhub install openclaw/skills/skills/benxiao2026/agent-state-backup
Or

What This Skill Does

The agent-state-backup skill provides a robust safety net for your OpenClaw AI agent by automating the preservation of its core identity, personality, and knowledge base. When an AI agent interacts and gathers information over time, losing that accumulated context during a restart or a migration to a new machine can be devastating. This skill snapshots critical files like IDENTITY.md, SOUL.md, MEMORY.md, and the entire knowledge folder into a compressed .tgz archive. By providing a standardized backup and restore workflow, it ensures that your agent’s unique characteristics remain consistent and portable across different environments.

Installation

To install this skill, run the following command in your terminal within the OpenClaw environment:

clawhub install openclaw/skills/skills/benxiao2026/agent-state-backup

Once installed, you can initialize the automated backup schedule by executing the setup script: ~/.openclaw/workspace/scripts/setup-backup-cron.sh. This ensures your agent state is captured daily at 2:00 AM, protecting your progress automatically.

Use Cases

This skill is essential for users who frequently migrate their OpenClaw agents between desktop and server environments. It is also a critical tool for developers who iterate on their agent’s personality and knowledge base, as it provides a 'save point' before making risky changes. Additionally, it serves as a disaster recovery solution, allowing users to restore the agent to a previous known-good state if recent memory updates result in unintended behavior.

Example Prompts

  1. "OpenClaw, please perform a manual backup of my current agent state now before I make changes to my personality settings."
  2. "I am moving to a new server, can you help me check the logs in ~/.openclaw/backups/ to confirm that my latest backups were successful?"
  3. "Restore the agent configuration from the latest backup file to reset my memory state."

Tips & Limitations

Always exercise caution when performing a restore operation, as it will overwrite your current working directory files; it is recommended to create a backup of your current state before triggering a restore. The default configuration retains the last 7 daily backups, but you can adjust this in the script if you require a longer retention period. Note that this skill requires local file system access, so ensure your OpenClaw environment has proper permissions to read/write in the workspace and backup directories. This skill is lightweight and efficient, typically consuming less than 50KB per backup, making it highly suitable for long-term tracking without significant disk overhead.

Metadata

Stars4473
Views1
Updated2026-05-01
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-benxiao2026-agent-state-backup": {
      "enabled": true,
      "auto_update": true
    }
  }
}

Tags(AI)

#backup#migration#agent-state#disaster-recovery#persistence
Safety Score: 4/5

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