Skip to main content
Use the Hermes adapter to run Nous Research Hermes Agent on the Charm platform. Hermes is a self-improving AI agent with built-in learning loops, cross-session memory (SQLite FTS5), and multi-provider LLM support.

Manifest

For always-on agents with persistent memory:

Best For

  • Agents that learn and improve across sessions.
  • Long-running daemon agents with persistent state.
  • Multi-provider LLM workflows (OpenRouter, OpenAI, Anthropic, local endpoints).
  • Agents needing built-in tools (terminal, browser, code search).

How It Works

The adapter bridges Hermes’s AIAgent class to the Charm Runner:
  1. Persistence — HERMES_HOME is redirected to CHARM_WORKSPACE_DIR/.hermes, so SQLite session databases, FTS5 search indexes, auto-generated skills, and memory files all persist across daemon restarts.
  2. Streaming — Hermes’s stream_delta_callback is wired to Charm’s SSE emitter for real-time token output in the Store frontend.
  3. Headless mode — The agent runs with quiet_mode=True to suppress TUI spinners and terminal chrome.
  4. Tool tracking — Hermes’s tool_start_callback and tool_complete_callback feed into Charm’s tool usage analytics.
  5. Threaded Streaming — Because Hermes executes synchronously, the adapter wraps run_conversation in a background thread and bridges stream_delta_callback to Charm Runner via a thread-safe Queue, ensuring real-time token output.
  6. Lazy Configuration — If entry_point points to a factory function, the adapter automatically injects environment variables like model (from CHARM_HERMES_MODEL) before instantiation.

Plugin Compatibility Notes

  • State and Memory Plugins: Hermes manages its own memory system natively using a localized SQLite FTS5 database (CHARM_WORKSPACE_DIR/.hermes/memory.db). It does not support and will completely ignore any custom memory plugins configured in charm.yaml (e.g., memory: { provider: "postgres" }).
  • Output Renderers (Custom UI): The adapter automatically parses _charm_render_type JSON objects outputted by Hermes, allowing you to render dynamic UI components in the Charm frontend.

Environment Variables

Runtime Image

For production, use the pre-built Hermes runtime image:
This image pre-installs Hermes and its system dependencies (git, ripgrep, ffmpeg, sqlite3) on top of the Charm base image.

Operational Notes

  • Use lifecycle: "daemon" for agents that need persistent memory across sessions.
  • Always set LLM API keys via charm.yaml environment_variables section, not hardcoded in source.
  • Test with charm validate before publishing.
  • The adapter is distributed as a separate pip package (charm-adapter-hermes). Install it in your runtime image or let the runner install it from requirements.txt.