Learn Hermes Agent v0.18: The Judgment Release Configuring MoA: Presets, Cost, and Performance

Configuring MoA: Presets, Cost, and Performance

Advanced 🕐 13 min Lesson 3 of 13
What you'll learn
  • Configure a named MoA preset in config.yaml with custom reference models and an aggregator
  • Apply reference_max_tokens to reduce per-turn latency without degrading aggregator quality
  • Use the hermes moa CLI to list, configure, and delete presets from the terminal

Presets Are the Unit of MoA Configuration

Hermes does not ask you to specify reference models and an aggregator every time you want to use ensemble reasoning. Instead, you define named presets in your config.yaml, and you select them by name in any interface — the model picker, the /model slash command, the TUI model switcher, or the dashboard. A preset is just a named configuration: a list of reference models, a choice of aggregator, and optional tuning parameters.

Hermes ships with a default preset. Its reference models are openai-codex:gpt-5.5 and openrouter:deepseek/deepseek-v4-pro. Its aggregator is openrouter:anthropic/claude-opus-4.8. This is the configuration that produced the benchmark results discussed in Lesson 2. It is a high-quality, relatively expensive preset — appropriate for the hardest decisions, not for everyday sessions.

Defining a Preset in config.yaml

Presets live under a moa: block in ~/.hermes/config.yaml. Here is the structure:

moa:
  presets:
    fast-ensemble:
      aggregator: openrouter:anthropic/claude-sonnet-4
      references:
        - model: openrouter:deepseek/deepseek-v4-flash
          reference_max_tokens: 600
        - model: openrouter:google/gemini-3.1-flash
          reference_max_tokens: 600
    deep-analysis:
      aggregator: openrouter:anthropic/claude-opus-4.8
      references:
        - model: openai-codex:gpt-5.5
          reference_max_tokens: 800
        - model: openrouter:deepseek/deepseek-v4-pro
          reference_max_tokens: 800

The preset name becomes the value you pass to /model <name> --provider moa. If the preset name exactly matches your configured value, the --provider moa flag is optional. You can define as many presets as you need and switch between them mid-session.

reference_max_tokens: The Most Important Tuning Parameter

Reference model generation dominates per-turn latency in an MoA configuration. Each reference model runs synchronously before the aggregator starts. If a reference model is allowed to generate 4,096 tokens of analysis, the aggregator waits for every one of those tokens before it produces its first output token.

The reference_max_tokens parameter caps reference model output per turn. The documentation recommends 600 tokens as a starting point for fast-ensemble configurations. At 600 tokens, each reference model produces roughly one to two paragraphs of focused analysis — enough for the aggregator to gain meaningful perspective, not so much that latency becomes noticeable.

Crucially, capping reference model output does not reduce the quality of the aggregator's response. The aggregator benefits from the core insight, not the length of the exposition. Reference models that are allowed to produce unlimited output often pad with caveats and hedge-clauses that add nothing. A 600-token cap forces conciseness and improves the signal-to-noise ratio of what the aggregator receives.

Prompt Cache Preservation

One of the more subtle design decisions in Hermes' MoA implementation is how it handles prompt caching. The main conversation has a stable cached prefix — the system prompt, earlier turns, and anything that has not changed since the last request. That cached prefix dramatically reduces costs for long sessions.

Reference model outputs, if inserted into the middle of the conversation, would invalidate that cache on every turn. Hermes avoids this by appending reference outputs at the tail of the conversation — below the stable cached prefix. The prefix remains intact. Both the reference model calls and the aggregator call cache normally. An MoA session costs less per token than you might expect because the caching architecture is designed to survive the added context.

The hermes moa CLI

You do not need to edit config.yaml directly to manage MoA presets. The hermes moa CLI provides three commands:

  • hermes moa list — shows all configured presets with their reference models, aggregators, and token caps
  • hermes moa configure [name] — interactive setup for a new or existing preset; walks you through model selection, token cap, and optional temperature pinning
  • hermes moa delete [name] — removes a preset from config.yaml

These commands write to config.yaml on your behalf. The changes take effect immediately — there is no need to restart a Hermes session after modifying presets.

Aggregator Restrictions and the enabled Flag

Two constraints on MoA configuration are worth knowing before you run into them:

Aggregators cannot be other MoA presets. Recursive ensemble structures — an MoA whose aggregator is itself an MoA — are blocked. Each aggregator must be a single model identifier, not a preset name. If you try to configure a recursive structure, Hermes rejects it at the configuration validation stage, not at runtime.

Credential failures on reference models do not abort turns. If one of your reference models returns an authentication error or a rate-limit response, the aggregator still runs — it just has fewer reference inputs. Hermes logs the failure but does not treat a partial ensemble as a reason to stop the session. This is the correct behavior for production use: a reference model outage should degrade quality gracefully, not halt the agent.

The enabled: false flag in a preset configuration disables reference model fan-out entirely without removing the preset. The aggregator runs alone. This is useful for temporarily reducing costs during long sessions while keeping your preset configuration intact for later use.

Selecting MoA in Different Interfaces

Once a preset is configured, selecting it works consistently across all Hermes interfaces. In the CLI or TUI, use /model <preset-name> --provider moa. In the TUI model picker, MoA appears as a selectable provider alongside OpenAI, Anthropic, and OpenRouter — expand it to see your named presets. In the dashboard, the model selector includes a MoA section. In the messaging gateway, you can set a default model that includes an MoA preset, so inbound messages from Telegram or Discord are automatically handled by your ensemble configuration.

Key takeaways
  • MoA presets live in ~/.hermes/config.yaml under a moa.presets block — each preset names an aggregator and one or more reference models, and is selected by name like any other model.
  • reference_max_tokens is the single most impactful tuning parameter — capping reference output at 600 tokens reduces latency and improves signal quality without meaningfully reducing aggregator performance.
  • Hermes appends reference outputs at the conversation tail rather than mid-conversation, preserving the stable prompt cache prefix and making MoA cost-efficient for long sessions.
  • hermes moa list, configure, and delete manage presets from the CLI without requiring manual config.yaml editing — changes take effect immediately without restarting.
  • Aggregators cannot be other MoA presets (recursive structures are blocked); reference model credential failures degrade quality gracefully without halting the turn; enabled: false suspends fan-out while keeping the preset intact.