Skip to content

feat: add HermesClaw runtime adapter for Hermes Agent #10

@willamhou

Description

@willamhou

What

Add a HermesClaw runtime adapter to support deploying Hermes Agent (by Nous Research) on Kubernetes via k8s4claw.

Why

Hermes Agent is one of the fastest-growing open-source AI agent frameworks (40k+ GitHub stars). It features:

  • Self-improving learning loop — generates reusable skills from experience
  • Persistent memory — SQLite + FTS5 across sessions
  • Multi-platform — Slack, Discord, Telegram, WhatsApp, Signal, Email
  • 40+ built-in tools — code execution, web browsing, file management

Currently, Hermes Agent supports Docker and SSH backends but lacks native Kubernetes orchestration. k8s4claw can fill this gap — managing StatefulSets, PVCs (for memory persistence), channel sidecars, and auto-updates.

How

1. Runtime Adapter (internal/runtime/hermesclaw.go)

Implement RuntimeAdapter for Hermes Agent:

  • Image: ghcr.io/nousresearch/hermes-agent:latest (or k8s4claw-wrapped version)
  • Gateway port: TBD — Hermes uses a REST API gateway, need to check the port
  • Probes: HTTP health check at /health or /api/status
  • Config mode: DeepMerge — Hermes uses .env + JSON config
  • Resources: ~500m CPU / 1Gi RAM (similar to OpenClaw)
  • Shutdown: Graceful drain with skill save

2. IPC Bus Bridge

Hermes Agent has a built-in gateway process. Need to determine:

  • Does it expose a WebSocket/REST/SSE endpoint for message I/O?
  • Can we reuse an existing bridge (WebSocket or SSE)?
  • Or do we need a new bridge protocol?

3. Persistence

Critical for Hermes — its value comes from persistent memory:

  • Session PVC: SQLite database (~/.hermes/memory.db)
  • Workspace PVC: Skills directory (~/.hermes/skills/)
  • Both should use reclaimPolicy: Retain by default

4. Channel Integration

Hermes has its own multi-platform gateway (Slack, Discord, Telegram, etc.). Two approaches:

  • Option A: Use Hermes's built-in channel support, bypass k8s4claw's channel sidecars
  • Option B: Disable Hermes channels, use k8s4claw's IPC Bus + channel sidecars for consistency

Option A is simpler for v1. Option B provides unified channel management across runtimes.

5. Sample CR

apiVersion: claw.prismer.ai/v1alpha1
kind: Claw
metadata:
  name: hermes-assistant
spec:
  runtime: hermesclaw
  config:
    model: "nous-hermes-3"
    learningEnabled: true
  credentials:
    secretRef:
      name: hermes-api-keys  # LLM provider keys
  persistence:
    session:
      enabled: true
      size: 5Gi               # SQLite memory DB
      mountPath: /data/memory
    workspace:
      enabled: true
      size: 20Gi              # Skills + knowledge
      mountPath: /data/skills
  channels:
    - name: slack-team
      mode: bidirectional

Investigation Needed

  • Check Hermes Agent's gateway port and API protocol
  • Determine if existing bridge (WS/SSE/TCP) works or need a new one
  • Decide channel approach: native Hermes channels vs k8s4claw sidecars
  • Check Hermes Docker image structure (entrypoint, volumes, env vars)

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions