
How to migrate from OpenClaw to Hermes Agent without losing memory or skills
Short answer (60 seconds): the migration is preview → apply → verify → clean up. (1) Install and verify Hermes Agent on the same machine where OpenClaw already runs. (2) Preview with
hermes claw migrate --dry-runto see what it will import without touching anything. (3) Apply the migration withhermes claw migrate(or the opt-in varianthermes claw migrate --preset full --migrate-secrets --yesif you want a complete run that also carries API keys with no prompts). (4) Verify withhermes doctor,hermes status, andhermes config show, plus a new session that already sees the imported skills. (5) Review channels (including WhatsApp QR re-pairing) and archived files. (6) Only after validating everything, stop OpenClaw withopenclaw gateway stop, preview cleanup withhermes claw cleanup --dry-run, and only then runhermes claw cleanup. For a complete OpenClaw uninstall at the end, follow the uninstall guide.
If you've been running OpenClaw for a while and want to move to Hermes Agent without losing memory or skills, there's an official command: hermes claw migrate. It reads from ~/.openclaw/ (with fallbacks to ~/.clawdbot/ and ~/.moltbot/), imports everything compatible, and archives what has no direct equivalent. This guide is the short version of the official migration guide, focused on what gets carried automatically, what gets archived, and how to validate before touching anything important.
What migrates automatically
The table summarizes, by area, what hermes claw migrate takes from your OpenClaw install and where it puts it in Hermes. The key flags are --preset full (everything compatible) or --preset user-data (excludes infra). No preset imports secrets on its own: if you want API keys and tokens, add --migrate-secrets.
| Area | Source (OpenClaw) | Destination (Hermes) | Notes |
|---|---|---|---|
| Persona / instructions | workspace/SOUL.md | ~/.hermes/SOUL.md | Direct copy |
| Workspace instructions | workspace/AGENTS.md | AGENTS.md in --workspace-target | Requires --workspace-target |
| Long-term memory | workspace/MEMORY.md | ~/.hermes/memories/MEMORY.md | Parsed into entries, merge with dedupe, § delimiter |
| User profile | workspace/USER.md | ~/.hermes/memories/USER.md | Same entry-merge logic as memory |
| Daily memory | workspace/memory/*.md | ~/.hermes/memories/MEMORY.md | All daily files merged into main memory |
| Skills (4 sources) | workspace/skills/, ~/.openclaw/skills/, ~/.agents/skills/, workspace/.agents/skills/ | ~/.hermes/skills/openclaw-imports/ | Conflicts: --skill-conflict skip (default), overwrite, or rename |
| Default model | agents.defaults.model | config.yaml → model | Accepts string or {primary, fallbacks} object |
| Custom providers | models.providers.* | config.yaml → custom_providers (migrated to providers: on next hermes update) | Maps baseUrl, apiType/api, short or hyphenated names |
| Provider API keys | models.providers.*.apiKey | ~/.hermes/.env | Requires --migrate-secrets, strict allowlist |
| Agent behavior | agents.defaults.timeoutSeconds, verboseDefault, thinkingDefault, agents.defaults.compaction.mode, agents.defaults.compaction.model, humanDelay.*, userTimezone, tools.exec.timeoutSec, agents.defaults.sandbox.* | agent.*, compression.enabled, compression.summary_model, human_delay.*, timezone, terminal.* | Mappings with normalization (e.g. timeoutSeconds / 10, cap 200) |
| Session reset | session.reset.* (or fallback session.resetTriggers) | session_reset.* | daily / idle modes |
| MCP servers | mcp.servers.* | mcp_servers.* | Stdio and HTTP/SSE, with tools.include / tools.exclude |
| TTS | messages.tts.providers.* (canonical), talk.providers.* (fallback), old flat format | config.yaml → tts.*, assets in ~/.hermes/tts/ | Supports ElevenLabs, OpenAI, Edge/Microsoft |
| Channels (Telegram, Discord, Slack, etc.) | channels.<plat>.botToken / accounts.default.* | Variables in ~/.hermes/.env (TELEGRAM_BOT_TOKEN, DISCORD_BOT_TOKEN, SLACK_BOT_TOKEN/SLACK_APP_TOKEN, SIGNAL_ACCOUNT, SIGNAL_HTTP_URL, SIGNAL_ALLOWED_USERS, MATRIX_ACCESS_TOKEN, MATTERMOST_BOT_TOKEN) | Tokens can be string, ${VAR}, or SecretRef |
| Channel allowlist | channels.<plat>.allowFrom[] | <PLAT>_ALLOWED_USERS | Comma-joined list |
| Approvals / exec | approvals.exec.mode, exec-approvals.json | config.yaml → approvals.mode, command_allowlist | Modes mapped, patterns merged and deduped |
| Browser | browser.cdpUrl, browser.headless | config.yaml → browser.cdp_url, browser.headless | |
| Brave search | tools.web.search.brave.apiKey | .env → BRAVE_API_KEY | Requires --migrate-secrets |
| Gateway auth | gateway.auth.token | .env → HERMES_GATEWAY_TOKEN | Requires --migrate-secrets |
| Working dir | agents.defaults.workspace | config.yaml → terminal.cwd | Legacy may emit MESSAGING_CWD |
What does not migrate automatically
What follows is archived under ~/.hermes/migration/openclaw/<timestamp>/archive/ for manual review. These are pieces that in Hermes are built with other commands or have no direct equivalent.
| Does not migrate | Where it lands | How to recreate in Hermes |
|---|---|---|
IDENTITY.md | archive/workspace/IDENTITY.md | Manual merge into ~/.hermes/SOUL.md |
TOOLS.md | archive/workspace/TOOLS.md | Hermes ships built-in tool instructions |
HEARTBEAT.md | archive/workspace/HEARTBEAT.md | Use hermes cron create for periodic tasks |
BOOTSTRAP.md | archive/workspace/BOOTSTRAP.md | Use context files or skills |
| Cron jobs | archive/cron-config.json | Recreate with hermes cron create |
| Plugins | archive/plugins-config.json | See hooks guide |
| Hooks / webhooks | archive/hooks-config.json | Use hermes webhook or gateway hooks |
| Memory backend | archive/memory-backend-config.json | Configure with hermes honcho |
| Skills registry | archive/skills-registry-config.json | Use hermes skills config |
| UI / identity | archive/ui-identity-config.json | /skin command |
| Logging / diagnostics | archive/logging-diagnostics-config.json | logging section in config.yaml |
| Multi-agent list | archive/agents-list.json | Use Hermes profiles |
| Channel bindings | archive/bindings.json | Manual setup per platform |
| Channels with deep config | archive/channels-deep-config.json | Manual platform setup |
There are also two platforms that require manual action: WhatsApp (re-pair via QR with hermes whatsapp) and any token that in OpenClaw uses source: file or source: exec as SecretRef — the migration warns about these and leaves them unresolved.
Step 1 · Install and verify Hermes
Before moving anything, make sure Hermes Agent is running on the same machine with hermes --version green. The full installation guide (Linux, macOS, WSL2, Android, native Windows, no-sudo paths) is here:
~# After installing Hermes, confirm the binary and the Gateway hermes --version hermes doctor
If you already have it installed and updated, you can skip straight to the preview. If not, install Hermes Agent and come back. Having both running in parallel is exactly what you want during the transition.
Step 2 · Preview the migration
Before touching anything, see what the command will do. The preview reads all OpenClaw state, looks for skills, providers, channels, and memory, and prints the full plan without writing anything:
~# Preview the migration without modifying anything hermes claw migrate --dry-run
By default it reads from ~/.openclaw/. If your install lives elsewhere (e.g. a custom profile or a container), pass the explicit path:
~# Source on a custom path (e.g. profile or container) hermes claw migrate --dry-run --source /path/to/openclaw
The preview shows you: files to copy, skills to import, providers and channels detected, secrets that will not be copied (by default), and conflicts. Read it carefully: if anything looks off, adjust before applying.
Step 3 · Run the migration
Once the preview looks right, apply the migration:
~# Apply the migration (shows preview again and asks for confirmation) hermes claw migrate
If you want a complete run in one shot — including API keys and no prompts — use this opt-in variant. Caveat: it carries secrets, so read it twice before running:
~# Full opt-in path (includes API keys, no confirmation) # --preset full: imports everything compatible # --migrate-secrets: also API keys and tokens (strict allowlist) # --yes: skip the confirmation prompt hermes claw migrate --preset full --migrate-secrets --yes
Useful flags if your situation calls for them:
--workspace-target /path: whereAGENTS.mdgoes (required to copy workspace instructions).--overwrite: force overwriting Hermes files that conflict. Without this flag, the migration refuses to apply on conflicts.--no-backup: skip the pre-migration snapshot under~/.hermes/backups/pre-migration-*.zip. By default a restore point is always written before applying.--skill-conflict skip | overwrite | rename: how to resolve duplicate skills.renamekeeps the imported one with the-importedsuffix on the basename (e.g.my-skill→my-skill-imported).
Step 4 · Verify Hermes
After applying, the critical part is validating that Hermes is functional. Four commands, in this order:
~# 1) Full check of config and deps hermes doctor # 2) Authentication with the migrated providers hermes status # 3) Effective config: check session_reset, terminal.cwd, model, providers hermes config show
After the checks, start a new session (imported skills and memory entries take effect in new sessions, not the current one):
~# 4) New session: imported skills should appear here hermes
If anything is missing, hermes config show tells you which keys effectively got set. If an API key is missing, add it with hermes config set OPENROUTER_API_KEY your_key (or whichever variable applies). /skills lists the loaded skills.
Step 5 · Review channels and archived files
Channel tokens land in ~/.hermes/.env, but the Gateway doesn't reload them on its own. Restart it:
~# Restart the Gateway so it picks up the migrated tokens systemctl --user restart hermes-gateway
If you use WhatsApp, the migration cannot carry the session (WhatsApp uses QR pairing with Baileys, not a token). WHATSAPP_ALLOWED_USERS was saved so the allowlist is preserved, but the device must be re-paired:
~# Re-pair WhatsApp via QR after migrating hermes whatsapp
For everything that does not migrate automatically (cron, plugins, hooks, multi-agent, channel bindings, IDENTITY.md, TOOLS.md, HEARTBEAT.md, etc.), review the directory:
~# Archived files for manual review ls -la ~/.hermes/migration/openclaw/$(ls -t ~/.hermes/migration/openclaw/ | head -1)/archive/
Each folder inside (workspace/, cron-config.json, plugins-config.json, hooks-config.json, bindings.json, etc.) corresponds to the "How to recreate in Hermes" column in the table above. Recreate what you need using the matching column.
Step 6 · Clean up only after validating
Cleanup runs at the end, and only when everything above is green. The flow:
- Stop the OpenClaw Gateway so it stops processing:
openclaw gateway stop. - Preview what the Hermes cleanup will rename.
- Apply the cleanup: renames OpenClaw directories to
.pre-migration/to avoid state confusion between the two agents.
~# 1) Stop OpenClaw so it doesn't compete with Hermes openclaw gateway stop # 2) Preview what the Hermes cleanup will rename hermes claw cleanup --dry-run # 3) Apply cleanup (renames OpenClaw dirs to .pre-migration/) hermes claw cleanup
If you want to fully remove OpenClaw (CLI + Gateway + state + workspace + app), follow the OpenClaw uninstall guide after the cleanup. Do not remove OpenClaw before validating that Hermes is stable.
Troubleshooting
The four most common errors during a migration, with the exact fix.
| Problem | Cause | Fix |
|---|---|---|
| "OpenClaw directory not found" | The install isn't at ~/.openclaw/ | Pass --source /path/to/openclaw. The migration also searches ~/.clawdbot/ and ~/.moltbot/. |
| "No provider API keys found" | Keys live in a path the migration doesn't read, or they are SecretRefs with source: file / source: exec | Add the keys with hermes config set OPENAI_API_KEY your_key (etc.) after the migration. SecretRefs with source: file / source: exec cannot be resolved automatically. |
Conflicts on apply (--overwrite required) | Files that would be overwritten between existing Hermes config and the import | Reread the preview, decide what should stay, and add --overwrite if you want to force, or --skill-conflict rename for duplicate skills. |
| Imported skills don't appear | You're in the same session where you ran hermes claw migrate | Close the session and start a new one with hermes. Imported skills land in ~/.hermes/skills/openclaw-imports/ and are loaded in new sessions. If you want to see them now, run /skills. |
If your case is rarer (container install, Nix, Docker, multi-agent profile), the official migration guide has edge-case sections beyond this run.
Have a particular setup (multi-agent, custom providers, multiple channels) and want to validate the plan before running the migration? There's a CTA at the end with a free 30-minute call.
Frequently asked questions
Do I lose my memory and skills when migrating to Hermes?
No. `hermes claw migrate` imports `MEMORY.md`, `USER.md`, the daily files in `workspace/memory/`, the skills from `workspace/skills/`, `~/.openclaw/skills/`, `~/.agents/skills/`, and `workspace/.agents/skills/`, and merges them with dedupe by `§` delimiter. Imported skills land in `~/.hermes/skills/openclaw-imports/`.
What happens to my API keys and channel tokens?
By default, `hermes claw migrate` does **not** import secrets. If you want them migrated, add `--migrate-secrets`. It then copies provider API keys from `openclaw.json`, `~/.openclaw/.env`, the `env` sub-object, and `auth-profiles.json`, but only for Hermes's allowlist (`OPENROUTER_API_KEY`, `OPENAI_API_KEY`, `ANTHROPIC_API_KEY`, `DEEPSEEK_API_KEY`, `GEMINI_API_KEY`, `ZAI_API_KEY`, `MINIMAX_API_KEY`, `ELEVENLABS_API_KEY`, `TELEGRAM_BOT_TOKEN`, `VOICE_TOOLS_OPENAI_KEY`).
Does WhatsApp migrate automatically?
No. WhatsApp uses QR pairing (Baileys), not a token. The migration copies `allowFrom` as `WHATSAPP_ALLOWED_USERS`, but the session is invalidated. After migrating, run `hermes whatsapp` to re-pair the device.
What does `--preset full` do and not do?
`full` imports everything compatible in one shot, and `user-data` excludes infra (sandbox, exec, terminal). **No preset imports secrets on its own:** you always need to add `--migrate-secrets` explicitly to carry over API keys and tokens.
How do I handle an unresolvable SecretRef?
The migration understands three formats (plain string, `${VAR}` template, and SecretRef with `source: env`). For `source: env` it looks in `~/.openclaw/.env` and in the `env` sub-object of the config. If your token uses `source: file` or `source: exec`, the migration warns and leaves it unresolved: add it manually with `hermes config set` afterwards.
Will it overwrite anything if I already have Hermes config?
Not by default. On conflicts, the migration refuses to apply and shows you the full plan. To force overwrite, add `--overwrite`. For skills specifically, use `--skill-conflict skip`, `overwrite`, or `rename` (the latter creates a copy with the `<skill>-imported` suffix, e.g. `my-skill` → `my-skill-imported`).
When is it safe to run `hermes claw cleanup`?
Only after validating `hermes doctor`, `hermes status`, and re-pairing WhatsApp. `cleanup` renames OpenClaw directories to `.pre-migration/` to avoid state confusion between the two agents. Preview with `hermes claw cleanup --dry-run`.