# Openclaw To Hermes

> Port OpenClaw Appie to Hermes Agent and spawn new instances. Clone appie-brain, configure identity files (SOUL.md, USER.md, IDENTITY.md, AGENTS.md), set up git sync, copy secrets, and start Hermes gateway.

- Skill: `s3yed/openclaw-to-hermes` (Agent Skill)
- Install (CLI): `npx skillmds@latest add s3yed/openclaw-to-hermes`
- Raw SKILL.md: https://api.skillmd.com/api/skills/s3yed/openclaw-to-hermes/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: S3YED (https://skillmd.com/u/s3yed)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/s3yed/openclaw-to-hermes

---


# OpenClaw to Hermes Agent Migration

Complete guide for migrating an Appie from OpenClaw to Hermes Agent.

## Quick Start

```bash
# 1. SSH key for GitHub (on new server)
ssh-keygen -t ed25519 -C "hermes-agent" -f ~/.ssh/id_ed25519 -N ""
# Add public key to github.com/settings/keys

# 2. Clone appie-brain
git clone git@github.com:S3YED/appie-brain.git ~/.hermes/appie-brain

# 3. Create identity files (SOUL.md, USER.md, IDENTITY.md, AGENTS.md)
# See full guide at ~/.hermes/docs/APPIE-PORT-GUIDE.md

# 4. Git setup
cd ~/.hermes
git init
git remote add origin git@github.com:S3YED/appie-brain.git
git config user.email "appieN@weblyfe.nl"
git config user.name "Appie-N"

# 5. Install deps
pip install pymupdf requests --break-system-packages

# 6. Create .env with secrets
# Copy from appie-brain/.env.secrets

# 7. Start Hermes
hermes-agent start
```

## Beta client Appie WhatsApp / wacli baseline

For every client Appie we spin up in beta, treat WhatsApp/wacli setup as part of the default onboarding checklist when the client expects WhatsApp communication or WhatsApp-history-aware work.

1. Use client-owned credentials only. Never copy Seyed's WhatsApp, OpenRouter, Notion, Google, or other private credentials into a client bot.
2. Install the current wacli package:
   - Homebrew: `brew install openclaw/tap/wacli` or `brew upgrade openclaw/tap/wacli`
   - Go fallback: `go install github.com/openclaw/wacli/cmd/wacli@latest`
3. Verify before pairing: `wacli version && wacli doctor && wacli auth status --json`.
4. If auth fails with `client outdated (405)` or WhatsApp closes the QR channel, upgrade wacli first, then retry. Do not keep retrying old QR auth.
5. Prefer phone-code pairing for remote beta onboarding:
   ```bash
   wacli auth --phone "+31..." --idle-exit 5m --events
   ```
   Tell the client: WhatsApp Settings -> Linked Devices -> Link a Device -> Link with phone number instead.
6. Keep the auth process alive until paired, then verify:
   ```bash
   wacli auth status --json
   wacli doctor
   ```
   Look for `authenticated: true`, linked JID, chats/messages counts, and recent `LAST_SYNC`.
7. For ongoing beta sync, bound local growth unless the client explicitly wants full-history ingestion:
   ```bash
   wacli sync --follow --max-messages 10000 --max-db-size 1GB --events
   ```
8. Privacy/default safety: no outbound WhatsApp sends without explicit recipient and message confirmation. For client Appies, make this a SOUL/AGENTS rule, not only a skill rule.

## Key Files to Create

### SOUL.md
Identity, role, values, communication style, boundaries.

### USER.md
Seyed's profile: name, timezone (Bangkok), company (Weblyfe), contact info.

### IDENTITY.md
Appie family roster: Appie-1 (Orchestrator), Appie-2 (CMO), Appie-3 (CTO).

### AGENTS.md
Session startup rules, memory discipline, red lines.

## Required API Keys (.env)

```
CUSTOM_OPENAI_API_KEY=
CUSTOM_OPENAI_BASE_URL=
CUSTOM_OPENAI_MODEL=
## Required API Keys (.env)

```
CUSTOM_OPENAI_API_KEY=...
CUSTOM_OPENAI_BASE_URL=http://localhost:11434/v1
CUSTOM_OPENAI_MODEL=gemma4:26b
TELEGRAM_BOT_TOKEN=...
TELEGRAM_ALLOWED_USERS=1817919454
HERMES_WORKING_DIR=/root/workspace
EXA_API_KEY=...
NOTION_API_KEY=ntn_...   # Required for Notion access
NOTION_CONTENT_FACTORY=124c3321-de60-8098-a0e0-f55416c5f95f  # Key DB ID
NOTION_TASK_LIST=538bdf7b-a506-4c9c-b451-5d2f78b4d544
NOTION_PROJECTS=60414e0a-cccc-480a-8800-eb3186da93a3
```

**Note:** Notion token variable name is `NOTION_API_KEY` (from Notion integration setup).

## Verify Setup

```bash
# GitHub SSH
ssh -T git@github.com

# Notion API test
curl -s "https://api.notion.com/v1/users/me" \
  -H "Authorization: Bearer $NOTION_API_KEY" \
  -H "Notion-Version: 2022-06-28" | python3 -c "import sys,json; print('✅', json.load(sys.stdin).get('name'))"

# Skills available
ls ~/.hermes/skills/

# Python packages
pip list | grep -i pymupdf
```

## Full Guide

See: `~/.hermes/docs/APPIE-PORT-GUIDE.md`

## Pitfalls

1. **SSH key not linked** - Add to github.com/settings/keys
2. **Missing .env.secrets** - Copy from source machine
3. **Git push fails with "fetch first"** - `git pull origin master --rebase` then push
4. **Git has unrelated histories** - `git pull origin master --allow-unrelated-histories`
5. **Bot not responding** - Check TELEGRAM_BOT_TOKEN in .env
6. **Notion token variable** - Must be `NOTION_API_KEY`, not `NOTION_TOKEN`
7. **Git conflicts on pull** - Use `git stash`, `git pull --rebase`, `git stash pop`

