| name | onezion-agent-sync |
| description | Central agent migration orchestrator. Auto-discovers all agents on the machine, calls those with APIs to export their data, generates manual guides for the rest, and merges everything into one migration package.
|
| version | 0.3.0 |
onezion-agent-sync
Central agent migration orchestrator. One skill, one command, full migration.
Core Concept
When installed on a central agent (Claude Code, OpenClaw, Hermes, etc.),
this skill auto-discovers ALL other agents on the machine and orchestrates export:
- Has API/MCP/CLI → central agent calls it to export automatically
- No API → generates a step-by-step guide telling the user what to copy
- Merges everything into one migration data package
Commands
discover — Scan for all agents
python3 -m agentsync.cli discover
Shows which agents are installed, which have auto-export APIs, which need manual work.
orchestrate — Full auto-export
python3 -m agentsync.cli orchestrate -o ~/Desktop/agent-migration
Runs the complete flow:
- Exports all secrets (24+ keys from Keychain/Shell/.env/Config)
- Calls agents with APIs (Hermes:
hermes backup, OpenClaw: openclaw backup create)
- Generates MANUAL_EXPORT_GUIDE.md for agents without APIs
- Saves discovery-report.json with full status
Individual commands
python3 -m agentsync.cli scan
python3 -m agentsync.cli export-secrets -o out.json
python3 -m agentsync.cli import secrets.json
python3 -m agentsync.cli docs --all
Orchestration Flow (for the central agent)
When user says "migrate my agent setup" or "backup everything":
Step 1: python3 -m agentsync.cli discover
→ Read the report: which agents have API, which need manual
Step 2: python3 -m agentsync.cli orchestrate -o ~/Desktop/agent-migration
→ Auto-exports from Hermes, OpenClaw, etc.
→ Exports all secrets
→ Generates manual guide
Step 3: For agents marked [MANUAL]:
→ Show the user the MANUAL_EXPORT_GUIDE.md
→ Guide them through each copy/paste step
Step 4: The migration package is ready at ~/Desktop/agent-migration/
→ Zip it up for transfer to new machine
Registered agents and their export methods
| Agent | Install Check | Auto-Export | Command |
|---|
| Hermes Agent | which hermes | Yes | hermes backup -o {output} |
| OpenClaw | which openclaw | Yes | openclaw backup create --output {output} |
| Claude Code | which claude | No | Copy ~/.claude/ |
| Claude Desktop | App exists | No | Copy ~/Library/Application Support/Claude/ |
| Gemini CLI | which gemini | No | Copy ~/.gemini/ (re-auth OAuth) |
| OpenAI Codex | which codex | No | Copy ~/.codex/ (re-auth) |
| WorkBuddy | App exists | No | Use OneZion-Migrate skill |
| Goose | which goose | No | Copy ~/.config/goose/ |
| OpenCode | which opencode | No | Copy ~/.config/opencode/ |
| Casdoor | HTTP health check | No | Export from admin UI |
Add more agents in agentsync/registry.py.
Adding a new agent
In registry.py, add to KNOWN_AGENTS:
"my-agent": AgentInfo(
name="My Agent",
github="org/repo",
config_paths=[".my-agent/config.json"],
api=AgentAPI(
type="cli",
cli_command="my-agent",
export_command="my-agent export --to {output}",
check_command="which my-agent",
),
manual_export_hint="Copy ~/.my-agent/ directory",
),
For central agents (Claude Code, OpenClaw, Hermes)
When the user asks to migrate/backup/transfer agent setup:
- Run
discover first to see what's available
- Run
orchestrate to auto-export everything possible
- Show the user the manual guide for remaining agents
- Offer to zip the migration package for transfer