/install agent-migrate
Agent Migration
Migrate OpenClaw agents across servers and platforms while preserving identity, memory, and configuration.
When to Use
✅ USE this skill when:
- Moving agent from local machine to remote server
- Cloning agent configuration to multiple environments
- Backing up complete agent state for disaster recovery
- Syncing workspace changes between dev/prod
- Upgrading OpenClaw with full rollback capability
❌ DON'T use when:
- Simple file copy operations → use
cp/rsyncdirectly - Database migrations → use database-specific tools
- Non-OpenClaw application deployment
Core Concepts
Agent State Components
Agent State = Identity + Memory + Config + Skills + Extensions
├── workspace/ # Core identity files
│ ├── IDENTITY.md # Who the agent is
│ ├── USER.md # Who they serve
│ ├── SOUL.md # Personality
│ ├── MEMORY.md # Long-term memory
│ ├── AGENTS.md # Operational rules
│ ├── TOOLS.md # Environment notes
│ └── memory/ # Daily logs
├── .openclaw/
│ ├── openclaw.json # Gateway config
│ ├── agents/ # Session data
│ └── extensions/ # Custom plugins
└── skills/ # Custom skills (if any)
Migration Workflows
1. Export (Source Machine)
# Full agent export
./scripts/export-agent.sh [export-name]
# Creates:
# /tmp/agent-export-[name]/
# ├── manifest.json # Export metadata
# ├── workspace.tar.gz # Core files
# ├── config.tar.gz # OpenClaw config
# └── restore.sh # Self-contained restore
2. Transfer
# Via SSH
scp -r /tmp/agent-export-[name] user@new-server:/tmp/
# Via GitHub (recommended for versioned deployments)
# Push to repo, clone on target
3. Import (Target Machine)
# Run self-contained restore
cd /tmp/agent-export-[name] && ./restore.sh
# Or manual:
./scripts/import-agent.sh /tmp/agent-export-[name]
Scripts
Export Agent
scripts/export-agent.sh [name] [--full]
Options:
name- Export identifier (default: timestamp)--full- Include session history and logs
Import Agent
scripts/import-agent.sh \x3Cexport-path> [--merge|--replace]
Options:
--merge- Merge with existing agent (default)--replace- Wipe existing, clean install
Sync to GitHub
scripts/sync-github.sh \x3Crepo-url> [--push|--pull]
Syncs agent state to GitHub for versioned deployment.
Platform-Specific Notes
Linux → Linux
Direct transfer, no conversion needed.
macOS → Linux
- Check for macOS-specific paths in scripts
- Update file watchers if used
Windows WSL → Native Linux
- Line endings auto-handled
- Verify executable permissions
Docker Deployment
See references/docker-deploy.md for containerized deployment.
Security Checklist
- Sanitize
openclaw.json(remove sensitive tokens before export) - Verify target machine permissions
- Rotate any exposed credentials post-migration
- Test agent functionality before production cutover
Rollback
Exports are immutable snapshots. To rollback:
# Re-import previous export
./scripts/import-agent.sh /path/to/previous-export --replace
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install agent-migrate - 安装完成后,直接呼叫该 Skill 的名称或使用
/agent-migrate触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
Agent Migrate 是什么?
Cross-platform agent migration and deployment. Use when: (1) migrating OpenClaw agent to new servers, (2) backing up and restoring agent state, (3) deploying... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 345 次。
如何安装 Agent Migrate?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install agent-migrate」即可一键安装,无需额外配置。
Agent Migrate 是免费的吗?
是的,Agent Migrate 完全免费(开源免费),可自由下载、安装和使用。
Agent Migrate 支持哪些平台?
Agent Migrate 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Agent Migrate?
由 haha8d(@haha8d)开发并维护,当前版本 v1.0.0。