Hermes import agent is one command, hermes import-agent, that copies your Claude Code or Codex CLI setup into Hermes. It reads your ~/.claude or ~/.codex folder and brings across your instructions, your skills, your MCP servers and your terminal permission rules. You see a full preview before anything is written, and your API keys are never touched.
📺 Watch: New Hermes + Claude Plugin Update is AWESOME!
🔥 Get the Agent OS as a free bonus: AI Profit Boardroom members get the full Agent OS zip, prompt libraries, daily tutorials and weekly live coaching calls. → Get inside
So if you have spent months tuning Claude Code or Codex, you do not start from zero in Hermes. You run one command and keep going.
I run Hermes every day inside my Agent OS, with a profile per model, right next to Claude Code and Codex. This is the command that lets them share the same brain. Here is exactly what it moves, how to run it, and how to keep it in sync.
If you want the guided version with full Hermes courses, the AI Profit Boardroom is $69/mo and includes daily updates, the Agent OS zip and four coaching calls a week.
What the Hermes import agent command does
Per the Hermes docs, hermes import-agent imports an existing Claude Code (~/.claude) or OpenAI Codex CLI (~/.codex) setup into Hermes. It works preview-first, the same pattern as hermes claw migrate for OpenClaw users. You always get a per-item plan before anything changes, and a dry run never touches disk.
It does four main jobs:
- Turns your CLAUDE.md or AGENTS.md instructions into Hermes memory entries.
- Maps your Bash permission allow and deny rules into the Hermes allowlist and deny list.
- Moves your MCP servers into the mcp_servers block of Hermes config.yaml.
- Copies skill folders that contain a SKILL.md into your Hermes skills directory.
That is the stuff that takes the longest to build. Rules, tools, habits. Now it moves in one go.
What gets imported and where it lands
Here is the mapping from the docs, for both Claude Code and Codex CLI.
| What | Where it comes from | Where it goes in Hermes |
|---|---|---|
| Global instructions | CLAUDE.md (Claude Code) or AGENTS.md (Codex) | Memory entries in ~/.hermes/memories/MEMORY.md |
| Allowed terminal commands | settings.json permissions.allow Bash rules | command_allowlist in config.yaml |
| Denied terminal commands | settings.json permissions.deny Bash rules | approvals.deny in config.yaml |
| MCP servers (Claude Code) | mcpServers in ~/.claude.json and settings.json | mcp_servers in config.yaml |
| MCP servers (Codex) | mcp_servers entries in config.toml | mcp_servers in config.yaml |
| Codex memories | memories folder markdown files | Memory entries in ~/.hermes/memories/MEMORY.md |
| Skills (Claude Code) | skills folders with a SKILL.md | ~/.hermes/skills/claude-code-imports/ |
| Skills (Codex) | skills folders with a SKILL.md | ~/.hermes/skills/codex-imports/ |
| Slash commands | commands folder markdown files | Skipped with a note, convert them into skills |
One small detail I like. A Claude prefix rule like Bash(npm run test:*) becomes an npm run test* glob in Hermes. So your permissions behave the way you expect.
If MCP is a big part of your setup, my guide to Hermes Agent MCP servers shows what you can do with them once they are inside Hermes.
📺 Watch: Hermes3D Is INSANE: AI Agents Now Have a 3D Office
Syntax and options
The CLI reference gives the shape as hermes import-agent, then an optional agent name (claude-code or codex), then options. Leave the name off and Hermes auto-detects ~/.claude or ~/.codex.
- claude-code or codex. Pick the source. Default is auto-detect.
- --source path. Use a custom folder instead of ~/.claude or ~/.codex.
- --dry-run. Preview only. Writes nothing.
- --overwrite. Replace MCP servers or skills that already exist in Hermes. Default is skip.
- --yes or -y. Skip the confirmation prompts.
- --sync. Re-import every source you imported before whose files have changed.
The common runs look like this, typed as plain commands:
- hermes import-agent claude-code --dry-run to preview a Claude Code import.
- hermes import-agent codex --source /path/to/.codex for a custom Codex folder.
- hermes import-agent claude-code --overwrite --yes to replace conflicts with no prompts.
Step by step: your first import
- Preview it. Run hermes import-agent claude-code --dry-run (or codex). Read the plan. Nothing is written.
- Check conflicts. Any MCP server or skill that already exists in Hermes shows up as a conflict. Decide if you want to keep yours or replace it.
- Run the real import. Run hermes import-agent claude-code and confirm when it asks. Add --overwrite only if you want to replace conflicts.
- Read the report. It lists anything unmapped, any per-item errors, and any secrets it stripped.
- Re-add your keys. Run hermes setup to connect providers, or add secrets to ~/.hermes/.env.
- Test it. Start a chat and ask Hermes what it remembers about your rules. Then call one of your MCP tools.
Even easier: ask your agent to do it. Paste "run hermes import-agent with --dry-run, show me the plan, then run it for real if nothing looks off" and let Hermes walk through it with you.
Stuck on a messy setup? Book a free AI strategy session and we can map out how your agents should fit together.
📺 Watch: Hermes AI Agents Just Went Portable
Keep it updated with --sync
This is the part that makes it more than a one-off copy. Every successful import registers its source in ~/.hermes/import-sync.json, along with a digest of everything it read.
When your Claude Code or Codex setup changes later, with new skills, an edited CLAUDE.md or AGENTS.md, or added MCP servers, you run hermes import-agent --sync. Add --dry-run to preview what a sync would do first.
The docs set a few clear rules for sync:
- It is prompt-free and cheap. Unchanged sources are skipped by digest.
- Memory and config merges stay deduplicated, so you never get double entries.
- Skills that import-agent brought in are refreshed in place when the source changes.
- Skills you created or edited yourself under the import category are never clobbered.
- Credential files never trigger a sync, and secrets are still stripped.
Because it is safe and cheap, the docs call it cron-friendly. Set a daily cron job in Hermes that runs hermes import-agent --sync and your Hermes setup tracks your Claude Code setup without you thinking about it.
Using it with profiles
I keep a profile per model, so this matters to me. The sync manifest is per profile.
A normal clone, hermes profile create work --clone, copies your skills and memories once and stops there. The manifest stays behind. Add --sync-imports and the manifest comes with it:
- hermes profile create work --clone --sync-imports
- hermes -p work import-agent --sync
That second command pulls changes from the same ~/.claude or ~/.codex into the work profile. Per the docs, this is opt-in and one-directional. It links the clone to the external agent folders only, never to the source profile. Edit the source profile later and the clone does not change. A full --clone-all copy also carries the manifest.
Want to see how I lay out profiles across a whole system? The Agent OS guide walks through it.
What does not come across
Be clear on the gaps so nothing surprises you.
- API keys and credentials. Never imported. Files like ~/.claude/.credentials.json and ~/.codex/auth.json are never read.
- Secret-looking MCP values. Environment variables or headers with names like *_TOKEN, *_API_KEY or Authorization are stripped and listed in the report so you can add them back on purpose.
- Slash commands. Claude Code commands are skipped with a note. Turn them into skills.
- Non-Bash permission rules. Rules like Read or WebFetch gate Claude-only tools, so they are reported as unmapped.
A broken settings.json or config.toml does not stop the run. It shows up as a per-item error and everything else still imports. Coming from OpenClaw instead? That route is hermes claw migrate.
Should you move everything into Hermes?
You do not have to pick one. Plenty of people keep Claude Code for coding and use Hermes for scheduled jobs, messaging and memory. Import-agent just means both agents follow the same rules.
If you are still weighing them up, read Hermes Agent vs Claude Code and Hermes Agent vs Codex. And if you want to see how different models handle real agent work, check Goldie Bench.
Inside the AI Profit Boardroom ($69/mo) I show my own Hermes profiles, skills and cron jobs, with daily updates as Hermes ships.
FAQ
Does hermes import-agent copy my API keys?
No. Credential files are never read, and secret-looking MCP environment variables and headers are stripped and listed in the report. Add keys with hermes setup or in ~/.hermes/.env.
Will it overwrite my existing Hermes skills?
Not by default. Existing MCP servers and skills are reported as conflicts and skipped. Pass --overwrite only when you want to replace them.
How do I keep Hermes in step with Claude Code?
Run hermes import-agent --sync. It re-imports only the sources whose files changed, so it is safe to run on a daily cron job.
Can I import into a specific profile?
Yes. Use hermes -p work import-agent. To carry the sync link into a clone, create it with hermes profile create work --clone --sync-imports.
Want help setting up Hermes next to the agents you already use? Grab a free AI strategy session, or book a free AI strategy session once your import is done and we will plan the next step. The Hermes import agent command gets your setup across in minutes.











