# OpenClaw → Hermes Migration Notes

Specific lessons from migrating users from OpenClaw to Hermes Agent.

## Architecture Differences

| OpenClaw | Hermes (Kiwi) |
|----------|---------------|
| Often runs as root via Docker/CasaOS | Runs as user (`az-a`) via systemd |
| Uses Supervisor for process management | Uses systemd (`hermes-gateway.service`) |
| Config at `/DATA/.casaos/apps/openclaw/docker-compose.yml` | Config at `/DATA/AppData/hermes/config.yaml` |
| `.secrets/*.env` referenced in docs | `.env` at `~/.hermes/.env` or `/DATA/AppData/hermes/.env` |
| Custom gateway URL (`127.0.0.1:18789`) | Telegram gateway via systemd, no custom URL |
| `ae oe ue ss` instead of umlauts | Standard German `ä ö ü ß` (unless user overrides) |
| Rigid persona with fixed greeting ratios | Natural, adaptive communication |

## Common Migration Tasks

### 1. Verify predecessor is still running

```bash
ps aux | grep openclaw-gateway | grep -v grep
# If found, ask user: stop, migrate data, or run parallel?
```

### 2. Find predecessor data

```bash
# Backups
ls -la /DATA/openclaw-backup.json
ls -la /var/lib/casaos_data/openclaw-backup.json
ls -la /tmp/openclaw.json

# Config
find /DATA/.casaos/apps/openclaw -name '*.yml' -o -name '*.env'

# Migration script (if Hermes has it)
ls /DATA/AppData/hermes-agent/optional-skills/migration/openclaw-migration/
```

### 3. What transfers cleanly

- **User profile** (name, family, preferences) → `memory` target=`user`
- **Active projects** (YouTube videos, study deadlines) → `memory` target=`user`
- **External service configs** (Notion, Email, etc.) → validate and re-store in Hermes `.env`
- **Recurring tasks** → migrate to Hermes cron (`hermes cron create`)

### 4. What does NOT transfer

- **OpenClaw's identity** — Hermes is Kiwi, not Monti
- **Infrastructure configs** — Docker compose, Supervisor, gateway URLs
- **Style quirks** — unless user explicitly requests them
- **"Replace me" mission** — parallel bots are valid; never assume replacement

## Permission Barriers

OpenClaw running as root means:
- `/proc/4030129/environ` — unreadable by user agent
- `/DATA/AppData/openclaw/` — may be `chmod` protected
- Backup JSONs — may be root-owned

**Solution:** Ask user to either:
1. `chmod 644` the relevant files temporarily
2. Copy them to a user-readable location
3. Or accept that some data is unreachable

## Validation: Test Each External Service

After storing a credential:

```bash
# Notion
curl -s https://api.notion.com/v1/users/me \
  -H "Authorization: Bearer $NOTION_API_KEY" \
  -H "Notion-Version: 2022-06-28"

# Tavily (if used)
curl -s https://api.tavily.com/health ...

# Google (if OAuth)
# Requires token refresh flow — more complex
```

## CasaOS App Confusion

Users often manage apps via CasaOS UI but don't realize:
- Each app is a Docker container
- CasaOS generates random names (`optimistic_jaime`, `flamboyant_lauren`)
- `openclaw` and `hermes` may both exist as CasaOS apps
- The Hermes agent may run OUTSIDE CasaOS (native systemd install)

Always clarify: *"Läuft dein Hermes als CasaOS-App oder als native Installation?"*
