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

๋Œ“๊ธ€

์ด ๋ธ”๋กœ๊ทธ์˜ ์ธ๊ธฐ ๊ฒŒ์‹œ๋ฌผ

Agent Memory Engine (2/10) — Building an AI Agent Memory System with SQLite Alone

"ML Foundations (9/9) — PyTorch vs TensorFlow, and the Road to Local LLMs"

"RAG Core Study (14/26) — Evaluation Sets with RAGAS & DeepEval"

"ML Foundations (8/9) — Deep Learning Architectures: CNN, RNN, Attention"

"ML Foundations (7/9) — Deep Learning Training: Optimizers, Regularization, Initialization"

OpenClaw to Hermes Migration (2/13) — What to Preserve, Partially Port, or Discard

AI Agents I Built (5/7) — Building an Automated Blogger API Publishing System