OpenClaw to Hermes Migration (3/13) — What Moves to Hermes, What Gets Dropped: 4-Category
Subtitle: The criteria for sorting 30 scripts into ✅ ๐ง ๐ ๐ four buckets
ํต์ฌ ์์ฝ
- When mapping existing assets against a target platform's built-in capabilities, a Replace / Partial-Replace / Preserve / Drop four-category framework is the practical choice.
- Hermes's core design point is the Pluggable MemoryProvider in
agent/memory_provider.py— external memory is treated as a first-class citizen. - Applying this framework to the OpenClaw → Hermes case yields: ~15 Replace, ~12 Partial-Replace, 10 Preserve (port), 8 Drop. The Preserve bucket determines whether the migration is justified.
Classification Criteria — Why Four Categories
Agent migrations fail when treated as a binary "port everything vs. rewrite everything." Real assets are distributed across a continuous spectrum. The four categories are a simplification of a 2×2 matrix: whether the target platform exposes a matching interface × whether domain-specific logic exists.
| Symbol | Meaning | Decision Condition |
|---|---|---|
| ✅ Replace | Target platform built-in is equivalent or superior | Built-in covers the need; no domain logic required |
| ๐ง Partial-Replace | Interface exists; only decision logic must be ported | Built-in hook/provider present; judgment criteria are domain-specific |
| ๐ Preserve (Port) | Not in target platform; unique asset | No built-in; domain logic is the core value |
| ๐ Drop | Source-platform-specific; meaningless after migration | Tied to source framework; cannot or should not be ported |
A. Memory Layer — Separating Container from Content
Memory-related assets typically intermix "storage/retrieval mechanisms" with "judgment logic." The Pluggable MemoryProvider architecture forces these two apart.
| OpenClaw | Hermes Equivalent | Category |
|---|---|---|
| bank/ 4-tier structure | MemoryProvider plugin wrapping | ๐ง |
| recall-tree / recall-match | MemoryProvider.prefetch(query) |
๐ง |
| retain-extract / retain-merge | on_session_end / on_pre_compress hook |
๐ง |
| memory-micro-cycle | cron + sync_turn | ✅ |
| confidence-decay | Not present | ๐ |
| topics-validate / topics-expand | Not present | ๐ |
| user-pattern-stage (U-tag dialectic) | Not present | ๐ |
| bank-lint / bank-size-watch | Not present | ๐ |
| entity-audit | Not present | ๐ |
| Topic-Cued Recall (full) | prefetch + system_prompt_block | ๐ง |
Principle: The container for retrieval and storage is provided by the platform. The judgment logic — what to surface, what to evict, how to decay confidence — remains a domain-specific asset. This separation is enforced by the MemoryProvider interface signature: prefetch(query) -> list[Memory] delegates storage to the provider, while selection, ranking, and decay of entries in that list belong to the implementation.
B. Model / Routing / Context — Almost Entirely Replaced
| OpenClaw | Hermes Equivalent | Category |
|---|---|---|
| Router_Control proxy (port 3939) | smart_model_routing.py |
✅ |
| context compaction (safeguard) | context_compressor.py |
✅ |
| manual prompt cache management | prompt_caching.py |
✅ |
| auth-profiles.json | credential_pool.py |
✅ |
| model fallback | native fallback | ✅ |
This area is common infrastructure. Model routing, prompt caching, credential pooling, and context compaction are independent of agent domain. The only justification for keeping a custom implementation is when the built-in fails to meet a specific requirement. Otherwise, ✅ Replace is the rational choice.
C. Heartbeat / Self-Review — Half Preserved
| OpenClaw | Category | Notes |
|---|---|---|
| heartbeat-router/tick/health | ✅ | Absorbed by cron + on_turn_start |
| heartbeat 11 escalation reasons | ๐ | Decision criteria are domain assets |
| self-review-prescan/apply/fix | ✅ | Upgraded via hermes-agent-self-evolution (DSPy+GEPA) |
| daily-audit Phase A (docs-snapshot) | ๐ | Not present in Hermes |
| proactive-exception-alerts | ๐ | 11-reason judgment preserved |
Pattern: "When to check" (heartbeat timing, self-review trigger) can be delegated to the platform. Conversely, "what counts as a problem" (11 escalation reasons, docs-snapshot criteria) is domain-specific knowledge derived from operational history. Self-Review's DSPy+GEPA-based upgrade is a ✅ case — the built-in implementation is functionally superior, so there is no reason to retain the custom logic.
D. External Integrations
| OpenClaw | Category |
|---|---|
| scrape.py (Scrapling + playwright + curl_cffi) | ๐ง |
| researcher Deep Mode (5-round AutoSearch) | ๐ |
| gws-wrapper / gws-check | ๐ง |
| Telegram Forum 6-topic routing | ✅ |
| Discord main channel | ✅ |
| oMLX integration | ✅ |
Deep Mode's 5-round AutoSearch is the canonical ๐ example. The search protocol itself — query expansion → result collection → cross-reference → gap identification → re-search — is domain logic that does not exist in the platform.
E. Workspaces → Profiles
The 11 workspace abstractions are absorbed into Hermes's profiles feature. Structurally, roughly half of the workspaces expressed role differences as model differences, so the functional set collapses to 5–6 profiles. This is a case where a custom abstraction maps naturally onto a platform-native concept.
F. Skills
General workflow skills (brainstorming, verification, code-review, etc. — 9 total) are classified ๐ → ported to optional-skills/. They have no OpenClaw dependency and are generically reusable. The oc-* series (8 total) are ๐ — once the platform is replaced, their invocation preconditions disappear.
G. Hooks
PostToolUse (JSON validation, Linter, DOC_SYNC), PreToolUse (git commit gate), and SessionStart/End/PreCompact are all ๐ง Partial-Replace. They are ported to Hermes's profile/gateway hook interface, with gate logic — what passes and what is blocked — carried over intact. Hooks are a textbook case of separable "when to run" and "what to do."
Classification Summary
- ✅ Replace: ~15 items → estimated ~30% reduction in scripts/configuration
- ๐ง Partial-Replace: ~12 items
- ๐ Preserve (Port): ~10 items — the migration's justification hinges on this bucket
- ๐ Drop: ~8 items
If the ๐ count approaches zero, the migration is unnecessary — built-ins alone provide sufficient coverage. Conversely, if ๐ items are a majority, retaining the current platform may be more rational than switching. At 10/45 ≈ 22%, "platform replacement + core logic port" falls within the typical range that justifies migration.
Conclusion — Applicability Conditions
This classification framework is reusable under the following conditions:
- Source and target platforms are clearly distinct (here: OpenClaw → Hermes)
- Interface signatures on both sides can be directly compared
- The boundary between "domain-specific logic" and "common infrastructure" is identifiable at the code level
It is a poor fit when: the abstraction levels of the two platforms differ significantly, or when the value of an asset resides not in individual code but in data (learned embeddings, accumulated interactions).
Open question: what does quantifying the porting cost of the ๐ 10 items actually yield? Measuring LOC, test coverage, and dependency count provides an upper bound on "preservation value." The next post covers that measurement.
Series overview: Series index
๋๊ธ
๋๊ธ ์ฐ๊ธฐ