Skip to content

feat: add Hermes and Crush AI agent backend support - #1605

Open
im47cn wants to merge 1 commit into
slopus:mainfrom
im47cn:feat/hermes-crush-support-monorepo
Open

feat: add Hermes and Crush AI agent backend support#1605
im47cn wants to merge 1 commit into
slopus:mainfrom
im47cn:feat/hermes-crush-support-monorepo

Conversation

@im47cn

@im47cn im47cn commented Jul 28, 2026

Copy link
Copy Markdown

Summary

Adds support for two new AI coding agents:

  • Hermes (NousResearch) — ACP-based agent, spawned via hermes acp
  • Crush (Charmbracelet) — HTTP server agent, spawned via crush server

Changes

happy-cli (packages/happy-cli/)

Hermes (ACP — minimal changes):

  • Added hermes to KNOWN_ACP_AGENTS in acpAgentConfig.tshermes acp
  • Added hermes case to daemon agent spawning (routes through happy acp hermes)
  • CLI subcommand happy hermes delegates to the generic runAcp() runner
  • Added 'hermes' to resolveSessionFlavor() and BackendFlavor

Crush (custom backend — follows Agy pattern):

  • src/crush/CrushBackend.tsAgentBackend impl that spawns crush server with a Unix socket, communicates via REST API + SSE
  • src/crush/runCrush.ts — Session runner following the runAgy.ts pattern
  • Static mapEvent() method for testable event-to-AgentMessage mapping
  • CLI subcommand happy crush and daemon spawn case

Shared:

  • AgentId type includes 'hermes' | 'crush'
  • SpawnSessionOptions.agent includes new types
  • BackendFlavor includes new types

happy-app (packages/happy-app/)

  • agentDefaults.ts: agentKeys array + normalizeAgentKey() + defaults
  • persistence.ts: NewSessionAgentType includes new agents
  • ops.ts: SpawnSessionOptions.agent includes new types
  • AgentInput.tsx: agentType prop type
  • Session info: displays "Hermes" / "Crush" as provider names

Tests (31 new tests)

  • acpAgentConfig.test.ts — Updated to verify Hermes config resolution
  • hermes.test.ts — Hermes ACP config, args passthrough
  • CrushBackend.test.ts — All 19 crush event-to-message mappings
Test Files  3 passed (3)
     Tests  31 passed (31)

Usage

happy hermes    # Run Hermes agent (ACP)
happy crush     # Run Crush agent (HTTP server)
happy acp hermes  # Also works via generic ACP command

Design decisions

  • Hermes reuses the existing runAcp() infrastructure — only a config entry + CLI wiring needed
  • Crush uses a custom CrushBackend (like AgyBackend) since Crush doesn't support ACP
  • Event mapping extracted as static mapEvent() on CrushBackend for testability

💘 Generated with Crush

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

Add two new agent backends:

- Hermes (NousResearch): ACP-based agent via `hermes acp`, routed through
  the existing generic ACP runner (`runAcp`)
- Crush (Charmbracelet): HTTP server agent via `crush server`, using a
  custom `CrushBackend` that spawns the server and communicates via
  REST API + SSE streaming

Both agents are integrated across the monorepo:
- happy-cli: CLI subcommands (`happy hermes`, `happy crush`), daemon
  spawning, AgentId type, SpawnSessionOptions, BackendFlavor
- happy-app: Agent type selector, session info display, sync types,
  agent defaults, persistence

Hermes implementation is minimal — just a config entry in
KNOWN_ACP_AGENTS and CLI wiring. Crush follows the Agy pattern with a
custom AgentBackend implementation and runCrush session runner.

31 tests added covering ACP config resolution and Crush event mapping.

💘 Generated with Crush
@im47cn
im47cn force-pushed the feat/hermes-crush-support-monorepo branch from 9ed3fc6 to fcd642c Compare August 9, 2026 08:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant